how to get the position from mrtrix3?

Hello Everyone, I just face a problem while deal with the voxel index to position, base on the command [mrinfo] -transform: the transformation from image coordinates [mm] to scanner / real world coordinates [mm]. so I follow the equation : (x, y, z )T = transform_R * (i, j ,k)T + transform_T, where (x, y, z ) stand for the position and (i,j,k) stand for voxel index, transform_R and transform_T all from transform, but the result I calculate can’t fix with the result in mrtrix. Please correct me if I understand something wrong, or any other convenient way to get the position.
thanks a lot!

The relevant documentation can be found at Images and other data — MRtrix 3.0 documentation.

What I think is missing in your equation is the voxel size, as explained in this excerpt from the page linked above:

In MRtrix3, the transform shown always corresponds to the transformation from image coordinates in millimeters to scanner coordinates in millimeters - the voxel size is not taken into account, and the image axes are always normalised to unit amplitude. This may differ from other packages.

The first figure in Registration, transformation, regridding: concepts might be useful.

1 Like