The problem: fmriprep and ciftify space-T1w nifti images are beautifully aligned (when you open them in more viewers) but they have different underlying sforms. This means that you can't just reslice one to the other using FLIRT (ident.mat) OR concatenate the ident.mat with the ciftify MNI transform to atlas transform the functionals from FMRIPREP.
Solution, (I think) is to use nilearn's nilearn.image.resample_to_image to do the reslicing (this seems to work/not be affected by the underlying different sforms). To get a FLIRT .mat file that also does this, I register the FMRIPREP func file to the nilearn resliced func file...
Will build this as a default behaviour of ciftitify_subject_fmri...also will switch the reg target to be the first image rather than the mean image.
The current plan, which we think works,
The problem: fmriprep and ciftify space-T1w nifti images are beautifully aligned (when you open them in more viewers) but they have different underlying sforms. This means that you can't just reslice one to the other using FLIRT (ident.mat) OR concatenate the ident.mat with the ciftify MNI transform to atlas transform the functionals from FMRIPREP.
Solution, (I think) is to use nilearn's nilearn.image.resample_to_image to do the reslicing (this seems to work/not be affected by the underlying different sforms). To get a FLIRT .mat file that also does this, I register the FMRIPREP func file to the nilearn resliced func file...
Will build this as a default behaviour of ciftitify_subject_fmri...also will switch the reg target to be the first image rather than the mean image.