1

I referred to this link on how to make intermediate slice in a 3D volume images using interp3 in Matlab. However, my stacked 2D MRI images have a specific image coordinates in 3D space as shown in the figure. enter image description here I know I can interpolate intermediate slices between my MRI volume first, then plot it in the 3D space with the image coordinates I have. However, I want to directly interpolate intermediate slices in this 3D space. That is, the mesh grid should be the image coordinates of these stacked MRI images. My Image coordinates are in the form of 256x256x3 showing the coordinates of each pixel, where the third dimension is the x,y,z, i.e. imagecoords(:,:,1) is the x-coordinates of all pixels in an image, imagecoords(:,:,2) is the y-coordinates of all pixels in an image, imagecoords(:,:,3) is the z-coordinates of all pixels in an image. How do make this into a meshgrid? Can anyone guide me how to do this?

If my question is not clear, do let me know, I will update my question again. Thanks!

Community
  • 1
  • 1
Leong Chen Onn
  • 71
  • 1
  • 1
  • 6
  • Just do the same thing for the coordinates as you do for the images. – Ander Biguri Feb 13 '17 at 14:52
  • @Ander My Image coordinates are in the form of 256x256x3 showing the coordinates of each pixel, where the third dimension is the x,y,z, i.e. imagecoords(:,:,1) is the x-coordinates of all pixels in an image, imagecoords(:,:,2) is the y-coordinates of all pixels in an image, imagecoords(:,:,3) is the z-coordinates of all pixels in an image. How do make this into a meshgrid? – Leong Chen Onn Feb 14 '17 at 01:11
  • You dont need to. To solve this problem, assume you have `4` images per slice. 1 of them gives you the pixel value, the other one the `x` value, the next the `y` value and the last the `z` value. Just forget what they are, and apply the exact same operation to each of these. You mention you already do it to the image, thus just do it for the coordinates also. It will work – Ander Biguri Feb 14 '17 at 10:35
  • I think I get what you meant already. Thanks!! – Leong Chen Onn Feb 15 '17 at 06:36

0 Answers0