Finish hDVF computation code