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!

4
  • Do you happen to have the Image Processing Toolbox installed? If so, you can create an affine3d transform and then apply transformPointsForward. Commented Mar 2, 2016 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? Commented Mar 2, 2016 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. Commented Mar 2, 2016 at 23:31
  • You can have a look at the wikipedia page, 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. Commented Mar 3, 2016 at 16:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.