History of AFNI updates  

|
November 29, 2022 10:12AM
Hi, Robin-

That EPI has a fair amount of brightness inhomogeneity. See how a lot of sulcal/gyral structures appear washed out and hard to see by the brightness around the edge.

To help deal with that, we created a new local unifizer that seems to really help with EPI-anatomical alignment of human FMRI datasets (*animal datasets have more external features, so still working on some special cases there, separately but relatedly). Anyways, can you try adding option this to your AP command:
-align_unifize_epi local \
(NB: this is *not* in place of anything there, but added separately.) Please let us know if that improves EPI-anatomical alignment.

Note: deobliquing the anat and EPI ahead of time makes a lot of sense. In your first chunk of code, this does deobliquing of the anatomical while preserving the location of the (x,y,z)=(0,0,0) part of the dataset:
3dcopy T1_$subject.nii tmp
3drefit -oblique_recenter tmp+orig
3drefit -deoblique tmp+orig 
3dcopy tmp+orig T1_do_$subject.nii
The subsequent 3dCM command then translates the dataset spatially so that its center-of-mass will sit at (x,y,z)=(0,0,0). Note that that might leave the EPI dataset behind, and relatively far away, because its coordinates were not reset---that appears to be the case, from the "initial overlap" images. What I might do instead would be to run, *assuming your EPI and anatomical were pretty well aligned to start*:
# deoblique the T1w volume, keeping coord origin
3dcopy T1_$subject.nii tmp
3drefit -oblique_recenter tmp+orig
3drefit -deoblique tmp+orig 
3dcopy tmp+orig T1_do_$subject.nii

# deoblique the EPI volume, keeping coord origin
3dcopy EPI_$subject.nii tmp
3drefit -oblique_recenter tmp+orig
3drefit -deoblique tmp+orig 
3dcopy tmp+orig EPI_do_$subject.nii

# translate the anatomical to have its CM match the template's CM,
# ... and bring along the EPI as a "child" dataset
@Align_Centers \
   -cm \
   -base MNI152_2009_template_SSW.nii.gz \
   -dset T1_do_$subject.nii \
   -child EPI_do_$subject.nii

# check anatomical-template overlap
@djunct_overlap_check \
    -ulay T1_do_${subject}_shft+orig \
    -olay MNI152_2009_template_SSW.nii.gz \
    -prefix img_olap_t1w_template

# check EPI-anatomical overlap
@djunct_overlap_check \
    -ulay T1_do_${subject}_shft+orig \
    -olay EPI_do_${subject}_shft+orig \
    -prefix img_olap_epi_t1w
... and see how those overlap images look? Can you try that for one subject?

Then, you would run SSW on the T1_do_${subject}_shft+orig, and use those results and the EPI_do_${subject}_shft+orig dset in your AP command.

--pt
Subject Author Posted

Poor aligment using scripts that have worked before Attachments

Robin November 29, 2022 09:31AM

Re: Poor aligment using scripts that have worked before Attachments

Robin November 29, 2022 09:32AM

Re: Poor aligment using scripts that have worked before

ptaylor November 29, 2022 10:12AM

Re: Poor aligment using scripts that have worked before Attachments

Robin November 30, 2022 07:29AM

Re: Poor aligment using scripts that have worked before

ptaylor November 30, 2022 08:15AM