internal use for warping images using CMTK