Autorotate at registration onset in ANTs


Perticularly in non-human brain imaging there are a lot of NIfTIs floating around with headers which have been messed up orientation-wise (most commonly 2 dimensions are swapped, or one axis is progressing negatively rather than positively) - Ideally I would like to autorotate them at registration onset. I know FLIRT can do this (via the “search” arguments) - can ANTs somehow also do it?


I do not quite understand the problem, but if you refer to a preliminary rigid/affine search to initialize registration (that implicitly compensates for axes swapping), then you may have a look into ANTs’ AffineInitializer and the new command antsAI.

However, (besides these two options) I would strongly recommend to keep track of the xform information in the nifti headers and make always sure that your pipeline does not modify them unintendedly. We are trying to incorporate this mechanism into nipype.


Note that there are competing coordinate systems for animals. For example Paxinos, Allen and Waxholm systems differ in reporting the not only the directions, but also the origin (Bregma versus anterior commissure). I agree that an unconstrained search should work often. However, I am not sure the various images are ‘messed up’, they are simply using different systems. If you can identify which coordinate system was user, you should be able to provide a pretty good starting estimate.