RAS to MNI Coordinate Conversion in fMRIPrep Output

I have a question regarding the conversion of RAS (native) coordinates to MNI using the fMRIPrep anatomical output, specifically the file …from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5.

I used the ANTs command provided below, but the output coordinates are not as expected. While the RAS coordinate appears to be located in the cerebellum in native space, the corresponding MNI coordinate does not appear to be in the cerebellum in MNI space. Therefore, I believe the conversion process is not effective.

Could you please recommend any solutions or point out what I might be doing wrong?

Command:
antsApplyTransformsToPoints -d 3 -i RAS_coord_sub-11584.csv -o mni_coord_sub-11584.csv -t sub-11584_ses-24401_run-01_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5

Thanks
Halil Aziz

Have you tried ti use the inverse transformation? I think I read something like that when trasnforming points and not images with ANTs.

Apply transforms to points.

Description

Apply a transform list to map a pointset from one domain to another. In registration, one computes mappings between pairs of domains. These transforms are often a sequence of increasingly complex maps, e.g. from translation, to rigid, to affine to deformation. The list of such transforms is passed to this function to interpolate one image domain into the next image domain, as below. The order matters strongly and the user is advised to familiarize with the standards established in examples. Importantly, point mapping goes the opposite direction of image mapping, for both reasons of convention and engineering.

https://rdrr.io/github/stnava/ANTsR/man/antsApplyTransformsToPoints.html

Hi Julien,
Thank you for your help.
I tried to run inverse transformation, the whole command is below. Basically I am getting Segmentation fault (core dumped) error.

antsApplyTransformsToPoints -d 3 -i RAS_coord_sub-11584.csv -o mni_coord_sub-11584.csv -t [sub-11584_ses-24401_run-01_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5, 1]

Maybe this example will guide you toward the solution?

it looks like they use -d 2