Open lisajeschke opened 5 months ago
Please take a look at https://github.com/ANTsX/ANTs/wiki/How-does-ANTs-handle-qform-and-sform-in-NIFTI-1-images%3F which explains how ITK/ANTs handles the coordinate systems in NIFTI imaging data.
I cannot provide a reference for how SPM handles things, but I suspect the answer is "differently". Either SPM will have to be adjusted to read things by the same conventions, or you will have to do post processing on the ANTs images to provide metadata in a convention SPM can use.
I recommend never using statistical images to evaluate image processing quality. Look at the actual data in the template space.
There are two main issues I'm aware of:
SPM might be OK with an image that is properly resampled into MNI space, with the sform indicating an identity transform, but
This man page might be helpful to figure out what the reference space is
https://github.com/spm/spm12/blob/03ac9473cad402407b6472228377c0167fdc54b8/spm_templates.man#L499
BTW, ITK does not correctly write the temporal units of NIFTI images (the xyzt_units field), and has some issues with scaling of nonstandard units. I'm working on a fix https://github.com/InsightSoftwareConsortium/ITK/pull/4595.
I don't know if this has anything to do with this issue.
@lisajeschke, when you say
The warping works fine and the output looks anatomically and qualitatively correct.
Does it look correct with an ITK viewer or in SPM? What is the MNI template image for this visualization?
I work with fmri BOLD data of a brain slab and currently encounter problems when I calculate GLMs in SPM after I have warped them into mni space using ANTs.
The warping works fine and the output looks anatomically and qualitatively correct. However, in contrast to native space images, my warped images cause SPM to display my results very frizzy/noisy, such as if my significant clusters would be very small and frizzy. I have attached two example images of my "normal" (native space, 1st image) output and the "distorted" issue (mni space with ants; 2nd image). The resolution and smoothing kernel are the same in both spaces.
Has anyone dealt with that problem before? Is it just a displaying problem?
Is there some header issue or something else that would need to be changed before I use SPM on the warped data?