Transforming fiducials between standard spaces

Hi all,

I’m not sure if this post belongs in this forum but I’m not sure where else I would post it. I’m wondering if there’s commonly used transformation matrices for transforming between different standard spaces (ex: mni305, mni152, fsLR, mni15nonlinasym, colin27 etc.). I have fiducials from multiple datasets that I’d like to compare in these different spaces but don’t have the original subject volumes to compute the transformations (I know this isn’t ideal but it’s what I’m working with). Freesurfer wiki lists how to transform points between mni305 and mni152 with a given transformation matrix so I’m looking for something similar with these other standard spaces. If anyone knows if these exist and can point me to them I’d be very appreciative. As a bonus, does anyone know if some of these volumetric standard spaces have available freesurfer reconstructions? I found one for MNI152nonlimasymc but it would be nice if those exist for others. If anyone knows of these please let me know when you get the chance.

Have a good day,

Noah

Hello,

I have the same question, and I have diffuculty finding the proper way to register my data in one space to one other space. In my case, it’s passing from Colin27 to MNINLin2009cAsym.
Best
Tolema

In AFNI, we have a couple ways to do this.

  1. With the standard whereami (afni_whereami) command, one can use a command like
whereami -lpi -calc_chain TT_N27 MNI_2009c_asym  \
    -xform_xyz_quiet 10 4 1 

That computes transformations among known spaces using precomputed “standard” transformations that can include affine, 12-piece, 2-piece and identity transformations. Importantly, it does not include nonlinear transformations, so it’s of more limited use for your application because the differences between the N27 and the MNI 2009c brains are similar with effectively only a nonlinear transformation between the two spaces.

  1. For nonlinear transformations, given an alignment between two spaces like MNI_N27 and MNI_2009c_asym, then there will be a pair of datasets - the affine transformation (…aff12.1D) and a nonlinear warp dataset (…WARP.nii). To transform coordinates, one can use a command like this
3dNwarpXYZ -nwarp 'anatQQ.WARP.nii anatQQ.aff12.1D'  [-iwarp] testxyz.1D

where the nonlinear warp, an affine transformation and a list of coordinates are provided in DICOM (RAI) order. The transformations can come from the result of aligning one template to another - maybe with sswarper2, auto_warp.py or 3dQwarp. Transformations can be concatenated (chained together) to go back and forth among multiple spaces, but direct transformations are better. The transformation and WARP directions are important, and you may need to invert and reverse the warp components with ‘INV(…WARP.nii.gz)’ or just use -iwarp.

For this case, I ran a simple 3dQwarp to create the WARP file here.

3dQwarp -prefix N27_to_MNI2009c.nii.gz  \
   -base ~/abin/MNI152_2009_template.nii.gz \
   -source ~/abin/MNI_caez_N27+tlrc. -resample

https://osf.io/sjqhm/files/osfstorage

For the case of transforming the coordinates from N27 to the MNI 2009c asymmetric space, you should be able to do this:

3dNwarpXYZ -nwarp 'N27_to_MNI2009c_WARP.nii.gz'  -iwarp testxyz.1D

For more info, see these links:
https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dNwarpXYZ.html

https://discuss.afni.nimh.nih.gov/t/maintain-crosshair-in-gui-when-switching-between-views-tlrc-to-orig/6969/4

https://github.com/afids/afids-macaca/blob/master/registration/nl_coords_transform.py

Other related projects use underlying ANTs transformations. These can be applied similarly with ANTS commands.

https://www.templateflow.org/
https://prime-re.github.io/templates_and_atlases/rhemap.html

1 Like