Hi,@effigies . I’m sorry to bother you
I used fMRIPrep to do preprocess with “output-spaces T1w”
But I checked the output of fMRIPrep. The functional images seems not in the T1 space—— they have differenet affine matrix.
Is this right? or I’m mistaken.
Can I use the antsApplyTransforms and .sub-*_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 to tranform the 1st analysis results into MNI space?
Here is a general answer: do not worry, you should not expect the same affine matrix for those two images as they don’t have the same resolution nor Field-Of-View. You can still verify in a viewer that they are correctly aligned, meaning that the bold-to-T1w registration worked correctly.
If you wanted to have the same affine matrix for both images, you could use a resampling tool to resample the bold image to the resolution and field of view of the T1w image but you would get a much bigger image which would occupy a lot more(!) disk space on your computer for no benefits.
To go deeper in those details, you can look for instance at this page:
Yes, this transformation is to go from the T1w space to the MNI space and you can use it to bring your results from T1w space into MNI space.
For instance, such command should work:
antsApplyTransforms --float --default-value 0 \
--input sub-060_task-game1_run-1_space-T1w_desc-yourBOLDresults.nii.gz -d 3 -e 3 \
--interpolation LanczosWindowedSinc \
--output sub-060_task-game1_run-1_space-MNI152NLin2009cAsym_desc-yourBOLDresults.nii.gz \
--reference-image $TEMPLATE_DIR/tpl-MNI152NLin2009cAsym_res-02_T1w.nii \
Thanks！It is very helpful!
I seem to get it a bit.
Can I understand the concept as such:
So the affine matrix we get from flirt(or other registration/alignment tools）contain two parts of information. One of parts contains aligment information. Another parts contains resampling information——what is the difference in their shapes(resolution or FOV).
But most of time, we only need the apply the former affine matrix to functional images. So the affine matrix of functional images is not the same as the affine matrix of T1w image, even they are already in the same space.
The resampling information is given by the reference image which is passed to the transformation command.
Be aware that the transformation from T1w to MNI is not an affine matrix as it involves a non-linear transformation.
I think the behavior with an affine transformation is different: if you have images with different FOV/orientation, applying an affine transformation matrix will give a different result to each of them.To understand this, you can imagine that the rotations will be applied to the center of the image, and if the image have different centers, the the rotations will have different effects to the object position.
I don’t know if this explanation is clear?
It is quite a tricky subject, and to make things trickier, different image registration software have their own way to save the transformation matrices and you may need to convert the transformation matrices when using a different registration software.
It is very clear. Thanks.