EPR Imaging Toolbox collection user manual |
resample_plane Resample 2D image to different boundaries given by new image corners. [IMfinal, xp, yp] = resample_plane(IM, corners, ncolumns, nrows) Resamples 2D image to different boundaries given by image corners. New boundaries may be rotated relative to the original boundaries. IM - an image (float, 2D) corners - coordinates of new image corners (float 4x3, 3rd coordinate is ignores) corner's order: upper left, upper right, lower right, lower left, see generate_slice_coordinates ncolumns - number of points along X direction (int) nrows - number of points along Y direction (int) IMfinal - resulting image (float, NxM, N = ncolumns, M = nrows) xp - voxel coordinates of new image in IM coordinate frame (float, 1xN, N = ncolumns) yp - voxel coordinates of new image in IM coordinate frame (float, 1xM, M = nrows) |