History of AFNI updates  

|
November 22, 2021 11:57PM
Hi all,

I have been experimenting with non-linear alignment to see if I can improve my alignment issue. Below is an image of the best I could get with ginormous move (see first post)

[ibb.co]

I used 3dQwarp following the suggestion for aligning epi to T1 (though with a small modification to make it an anat2epi alignment, not epi2anat as in the example)

It has done a great job of aligning around the medial part of the brain (near SI) where I was most concerned about. However, the first alignment step (with align_epi_anat.py) chops off the back of the anatomical - very back occipital cortex and some cerebellum. Thus, this step and the final 3dQwarp step fail badly on the back of the brain.

View 1/ epi threshold 1

[ibb.co]

View 2/ epi threshold 2

[ibb.co]

I tried avoiding this clipping by zpadding the epi, but this does not seem to work (makes the alignment go crazy)

Anyone have any ideas of how to improve this clipping/ poor alignment at the back of the brain issue. Or anything else to try?

Thank you,

Harriet

---------------------------------------

Code

# Pre-prep anat for skull strip by unifizing
3dUnifize -prefix {$anat}_uni {$anat}+orig

# Skull strip anat
3dSkullStrip -shrink_fac 0.4 -input {$anat}_uni+orig -prefix {$anat}_uni_SS

# Extracting just 0th sub-brick for registration purposes
3dbucket -prefix epi0 pb01.{$subj}.r0{$run}.despike+orig'[123]'

# Other attempt (from second pass) - try zpadding epi before removing sub-brick of interest (so as to avoid anat getting clipped)
# Zpad epi - so as not to clip anat
# set run = 5
# 3dZeropad -I 5 -S 5 -A 5 -P 5 -L 5 -R 5 \
# -prefix epi_padded+orig \
# pb01.{$subj}.r0{$run}.despike+orig

# Extracting just the 0th sub-brick for registration purposes
# FG: Use min outlier: run 05, TR 123
# 3dbucket -prefix epi0 epi_padded+orig'[123]'


# anat is aligned to the epi sub-brick and resampled to the epi grid
align_epi_anat.py \
-anat {$anat}_SS+orig \
-anat_has_skull no \
-epi $epi0+orig \
-epi_base 0 \
-partial_coverage \
-anat2epi \
-master_anat {$epi0}+orig \
-big_move

# anat is nonlinearly aligned ONLY using the global warping -- it is futile to try to align such dissimilar image types precisely.
# EPI = base (thing you align to) in 3dQwarp so that it provides the weighting, and so partial brain coverage (as long as it covers MOST of the brain) should not cause a problem
# Removed -blur 0 3
# Removed -iwarp
3dQwarp -source {$anat}_SS_al+orig.HEAD \
-base {$epi0}+orig \
-prefix {$anat}_SS_3dQ \
-lpc -maxlev 0 -verb
Subject Author Posted

Cannot get good alignment with align_epi_anat.py or 3dAllineate

hdempseyjones October 18, 2021 12:25AM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

Peter Molfese October 18, 2021 10:39AM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

hdempseyjones October 19, 2021 07:22PM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

Daniel Glen October 18, 2021 01:57PM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

hdempseyjones October 25, 2021 03:29AM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

ptaylor October 25, 2021 10:25AM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate Attachments

hdempseyjones October 25, 2021 09:57PM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

ptaylor October 26, 2021 08:23AM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

hdempseyjones November 22, 2021 11:57PM

Re: Cannot get good alignment with align_epi_anat.py or 3dAllineate

Daniel Glen November 23, 2021 10:34AM