Open gdevenyi opened 8 years ago
Hi Gabriel,
As I recall the purpose of this was to dissociate the orientation and "registration" parts of the .mat file. SPM combines these so if you just convert the whole thing many of the MINC tools fail as rotations are more than 90deg. In effect you will always end up with a ZYX volume but the orientation might be sagittal via a rotation matrix. This was causing me problems so I set out to solve it.
The Heuristic I decided upon was that any rotations more than 90deg were to do with orientation and the rest was registration. So the >90deg parts would be mapped to ZYX->YXZ or something else as appropriate and the rest would be kept as a .xfm
Thus the major difference is all the xfm reduction code:
https://github.com/BIC-MNI/minc-tools/blob/master/conversion/ana2mnc/ana2mnc_xfm_reduce.pl#L659
Cool, I see what you mean by realign vs register.
I think perl got stricter about formatting between the writing of this code and now.
Paging @andrewjanke is this tool more reliable than ana2mnc for handling SPM files?