AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
October 18, 2015 04:58PM
For some reason, the registration between EPI and anatomical goes poorly for one of my participants and I can't seem to resolve this problem. My flip angle is 90 and, following recommendations elsewhere on this message board, I have tried nmi and lpa (and several other) cost functions. I've also tried using a two-step -big_move option. Nevertheless, my EPI PFC seems warped beyond the MPRAGE anatomical extents. Are there any other options I should try?

Using afni_proc.py, followed by a few minor modifications, I come up with the following bits of code for alignment:
# ================================= align ==================================
# for e2a: compute anat alignment transformation to EPI registration base
# (new anat will be intermediate, stripped, anat_mprage_skullstripped_ns+orig)
align_epi_anat.py -anat2epi -anat anat_mprage_skullstripped+orig \
-save_skullstrip -suffix _al_junk \
-epi pb01.$subj.r01.card+orig -epi_base 1 \
-epi_strip 3dAutomask \
-cost nmi \
-volreg off -tshift off -deoblique on

and for volume registration:
# ================================= volreg =================================
# align each dset to base volume, align to anat, warp to tlrc space
# *** changed $subj.r$run.tshift+orig to $subj.r$run.card+orig ***

# verify that we have a +tlrc warp dataset
if ( ! -f anat_mprage_skullstripped+tlrc.HEAD ) then
echo "** missing +tlrc warp dataset: anat_mprage_skullstripped+tlrc.HEAD"
exit
endif

# register and warp
foreach run ( $runs )
# register each volume to the base
3dvolreg -verbose -zpad 1 -base pb01.$subj.r01.card+orig'[2]' \
-1Dfile dfile.r$run.1D -prefix rm.epi.volreg.r$run \
-cubic \
-1Dmatrix_save mat.r$run.vr.aff12.1D \
pb01.$subj.r$run.card+orig

# create an all-1 dataset to mask the extents of the warp
3dcalc -overwrite -a pb01.$subj.r$run.card+orig -expr 1 \
-prefix rm.epi.all1

# catenate volreg, epi2anat and tlrc transformations
cat_matvec -ONELINE \
anat_mprage_skullstripped+tlrc::WARP_DATA -I \
anat_mprage_skullstripped_al_junk_mat.aff12.1D -I \
mat.r$run.vr.aff12.1D > mat.r$run.warp.aff12.1D

# apply catenated xform : volreg, epi2anat and tlrc
3dAllineate -base anat_mprage_skullstripped+tlrc \
-input pb01.$subj.r$run.card+orig \
-1Dmatrix_apply mat.r$run.warp.aff12.1D \
-mast_dxyz 4 \
-cost nmi \
-prefix rm.epi.nomask.r$run

# warp the all-1 dataset for extents masking
3dAllineate -base anat_mprage_skullstripped+tlrc \
-input rm.epi.all1+orig \
-1Dmatrix_apply mat.r$run.warp.aff12.1D \
-mast_dxyz 4 -final NN -quiet \
-cost nmi \
-prefix rm.epi.1.r$run

# make an extents intersection mask of this run
3dTstat -min -prefix rm.epi.min.r$run rm.epi.1.r$run+tlrc
end



Edited 1 time(s). Last edit at 10/18/2015 04:59PM by westbrok.
Subject Author Posted

registration mismatch

westbrok October 18, 2015 04:58PM

Re: registration mismatch

rick reynolds October 19, 2015 08:33AM

Re: registration mismatch

westbrok October 19, 2015 01:31PM