I am attempting to open a thresholded functional map of task-related activity on the MNI template. The analyses were run with the structural template from ANTs, Kirby (https://figshare.com/articles/ANTs_ANTsR_Brain_Templates/915436). The map I am trying to open contains all significant clusters after running 3dClustSim. Each cluster has an intensity across all voxels, in order from largest to smaller clusters.
In order to report coordinates, I used 3dAllineate to transform clusters that were in Kirby space into MNI space. I realize now the transformation changes the values of the clusters, and I am not able to distinguish which voxels belong to each thresholded cluster. Is there a way to register or transform the cluster map into MNI space without changing the values of the clusters?
I am bumping this to see if there is a way to preserve cluster information when transforming into a standard space from a non-standard space.
I think it would be useful to see the commands you are using; are you
- Using 3dAllineate to create a transformation between the Kirby template and the MNI template,
- Using 3dAllineate to apply that transformation to an atlas dataset (integer-valued, using each integer to define an ROI), moving the data from Kirby to MNI?
If so, in Step #2 you can include the option “-final NN”, so that nearest neighbor (NN) interpolation is applied to your dataset when putting into new grid. That will preserve integers. (But it might still be useful if you posted your commands, for clarity.)
I took a look at the Kirby templates at the link you posted. Here is an example of how you might want move the clusters around. I assumed the Kirby3 template was the template you wanted, but change it to any other template you are using. Here, I’m using a nonlinear warp along with an affine alignment, the nonlinear warp should be more accurate than just the affine transformation computed by 3dAllineate alone. As Paul mentioned, the main thing to note is that the “NN” nearest neighbor interpolation is likely what you want.
the Kirby templates are pretty far off a (0,0,0) coordinate and nowhere near the MNI template
align the center of the skullstripped Kirby template to the MNI 2009c template and transform other datasets with it like the unskullstripped template
and the clusters - change the name of the cluster dataset to match yours
@Align_Centers -cm -base ~/abin/MNI152_T1_2009c+tlrc. -dset S_template3_BrainCerebellum.nii.gz -child S_template3.nii.gz myclusters.nii.gz
this computes the alignment and reskullstrips on the shifted version of the template
@SSwarper -base ~/abin/MNI152_2009_template_SSW.nii.gz -input S_template3_shft.nii.gz -subid Kirby3 -odir ssw
apply the warp and affine transformation with nearest neighbor interpolation to put the shifted cluster in MNI space
add the out
3dNwarpApply -nwarp ‘ssw/anatQQ.Kirby3_WARP.nii ssw/anatQQ.Kirby3.aff12.1D’ -ainterp NN -prefix myclusters_MNI.nii.gz -source myclusters_shft.nii.gz
If you want to transform just a select set of coordinates to report them in MNI space, you can do this instead of the 3dNwarpApply command
3dNwarpXYZ -nwarp ‘anatQQ.Kirby3_WARP.nii anatQQ.Kirby3.aff12.1D’ -iwarp testxyz.1D
where testxyz.1D has a list of xyz coordinates in RAI (DICOM order - right to left, anterior to posterior, inferior to superior).
Thank you both so much for the help.
I tried both approaches although using @Align Centers (etc…) seemed to get the alignment closer.
When trying to open the myclusters_MNI.nii.gz, the clusters will not open on the MNI_T1_2009 template. Instead, the S_template_3.nii.gz automatically opens as the underlay.
I tried 3drefit -view tlrc -space MNI myclusters_MNI.nii.gz to see if that might fix it, but it did not.
I also tried everything listed above and reorienting the original cluster map (myclusters.nii.gz) to lpi to match MNI_T1_2009 template before running any commands. Originally, myclusters.nii.gz is in lai.
Attached is the picture I have of myclusters_MNI.nii.gz on S_template_3.nii.gz
Any suggestions on how I could keep troubleshooting?
I will also look into the coordinates suggestion as well, although for visualization am hoping for a figure on the MNI brain.
The command looks fine, but you will need to restart the GUI to see the clusters over the MNI template.