Many creators of NIFTI files don’t respect the qform and sform codes for the “space” the image is in. So, we get things like atlas / template images marked as original subject view. Even if they do, once used by lots of utilities, said codes get stripped at times. AFNI tends to get upset by this and won’t let you view underlay and overlay images of differing spaces / views.
Is there a way to force AFNI to say “yes, I know it thinks it’s an orig, but no it’s not” and just show X atop Y, throwing caution to the wind? That is, to remove the view checks? Yes, I have scripts to modify the nifti headers, but some times you just want to be allowed to do what the code thinks might be stupid.
Not at this time. I could consider adding it, but that would basically require forcing all datasets (internally in the GUI) to be coded as having the same “view”
Right - or if a flag is set, to ignore the dataset header info and assume it’s all “orig” view. Heck, one could imagine that, since AC-PC mode is rarely used anymore, that we have “orig”, “unconstrained” and “model-space” as the options there.
Now, of course, the real solution is to have anyone working with NIFTI really keep track of this info. Shouldn’t things like MNI-space atlases be distributed with sform codes of 4 (or at the very least 3) rather than 2 (or 0)? While at it, shouldn’t any program that is applying a set of transformations and writing NIFTI let you (or force you) to, at that point, specify the space the output image is in? It’s great to have transformations built into the header, but honestly, I don’t see that used much. Really using the sform code to say what space the image is in though is a great bit of housekeeping. As it stands, though, I find myself running nifti_tool and batch changing the qform and sform codes to either 0 or 3 on everything I’m working on (which one I choose is often a coin toss) just so I stop banging into conflicts (in effect, akin to chown -R a+rwx dirname). Sigh - sorry for the rant - time to grab some coffee.
I appreciate the rant actually. I had spent some significant time to get this all working, but it’s tricky to get all the many part of the GUI to handle spaces the way I would like. In the meantime, the AFNI_NIFTI_VIEW can make datasets that are marked with registered or unknown code be treated as tlrc or orig view equivalents.