Transformation

Hi MRtrix community,

I am new in the image registration. I need to use the same transformation that is applied in MRtrix between my imported ROI and 5tt_coreg in another programming environment such as Matlab.

Based on MRinfo, the transformation matrix is as follows:
[0.9999, 0.01036, -0.0008068, -74.4; -0.01037, 0.9999,-0.01142,-97.33; 0.0006884, 0.01143, 0.9999,-53.99; 0, 0, 0, 1]
This is not following the format of affine3d due to the following error I receive in Matlab: The final column of an affine transformation matrix must consist of zeroes, except for a one in the last row.
Also I tried rigid3d and is not working.

Could you please let me know how can I find more information about which type of registration is being used as I can’t find this information in the header.

Thank you.

1 Like

Could you please clarify what you are trying to achieve? Your error message indicates that the transformation is transposed but that might not be the only source of incompatibility wich affine3d. In general, transformations are typically specific to the software package.

You might find the following links helpful to get you started:
https://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html

Hi Max,

Thank you for your response. I could resolve the issue by using mrgrid command in MRtrix to resample my image. I didn’t have to apply affine transformation separately anymore.

Thanks,
Parand