0

I have a 3D matrix in Matlab that was created using a volume MRI scan. I then use matlab toolbox iso2mesh (vol2surf) to convert this volume to a surface mesh and then extract the nodes/vertex coordinates and faces of this mesh.

However I find that this mesh is in the wrong coordinate system. I have tried to use the imrotate to rotate the matrix as well as rot90 to rotate the nodes matrix but it rotates the image only around the y-axis while I need rotation around both x and y axes.

Does anyone have any advice on what function I can use for this?

Thanks!

Maheen Siddiqui
  • 539
  • 8
  • 19
  • Do you happen to have the Image Processing Toolbox installed? If so, you can create an `affine3d` transform and then apply `transformPointsForward`. – beaker Mar 02 '16 at 23:14
  • @beaker yes I have it installed but I don't know the affine transformation matrix that I need to use... which is needed as input, right? – Maheen Siddiqui Mar 02 '16 at 23:16
  • Yes, you'll need the affine transformation. Do you have an example of the rotations you want to do? I'm trying to find a good reference for affine transformation matrices. – beaker Mar 02 '16 at 23:31
  • You can have a look at the [wikipedia page](https://en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions), but they use a different convention for the ordering of the multiplication than MATLAB does, so your rotations may seem to come out backwards unless you transpose the matrices. – beaker Mar 03 '16 at 16:13

0 Answers0