MATLAB: Interpolation of a 2D image series at specific slice locations

dicomimagesinterpolationreslice

I have imported a series of 2D DICOM files containing 14 MR images. The resolution of the image data matrix is 512x512x14. These MR slices are located in the axial plane at real world slice locations -40.063mm to 11.937mm in 4mm intervals. I want to reslice this series along the same axis to have slice locations at xx.466mm in 1mm intervals such that I end up with a new data matrix with resolution 512x512x52 (slice locations from -39.466mm to 11.534mm). Should trilinear interpolation be applied in this case? Could someone help me with this interpolation problem? Also, the voxel resolution is (0.3516 x 0.3516 x 4)mm/pixel.
Many thanks in advance!

Best Answer

You should use interp1, and a little bit of reshaping:
zold=linspace(-40.063, +11.937, 14).';
znew=linspace(-39.466 , 11.534, 52).';
array=reshape(MRvolume,[],14).';
new=interp1(zold,array,znew).';
result=reshape(new, [512,512,52] );