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  

|
September 29, 2017 09:31PM
Hello, just want to preface this post by saying that I am very new to AFNI and fMRI data processing in general so if I omit any relevant information to my question then please let me know and ill do my best to provide the information.

That said, I am having issues with coregistration of my individual subjects that are propagating into group analyis. Specifically I am having voxels that are part of larger clusters appearing outside of the anatomical brain volume. The degree of this problem varies from subject to subject but also continues and worsens as I do group analysis. The attached images, (example, a single subject) and (example3, from group analysis) illustrate the problem I am having. My initial preprocessing involved consolidating the dicom files and deobliquing the epi files. After applying the 3dWarp deoblique process there was still some pretty poor alignments so I used the nudge function to provide as best a fit as I could manage. From there I created my processing script, which is utilizing the Lpc-ZZ cost function as it so far has provided the best results by a good margin. functions like giant and ginourmous move have provided worse results with both the original obliqued EPI's and deobliqued EPI's. Here are portions of the script that has proved best so far.
align:
align_epi_anat.py -anat2epi -anat ${subj}_anat_nudge+orig \
-save_skullstrip -suffix _al_junk \
-epi vr_base_min_outlier+orig -epi_base 0 \
-epi_strip 3dAutomask \
-cost lpc+ZZ \
-volreg off -tshift off

tlrc:
@auto_tlrc -base TT_N27+tlrc -input ${subj}_anat_nudge_ns+orig -no_ss

# store forward transformation matrix in a text file
cat_matvec ${subj}_anat_nudge_ns+tlrc::WARP_DATA -I > warp.anat.Xat.1

volreg:
# verify that we have a +tlrc warp dataset
if ( ! -f ${subj}_anat_nudge_ns+tlrc.HEAD ) then
echo "** missing +tlrc warp dataset: ${subj}_anat_nudge_ns+tlrc.HEAD"
exit
endif

# register and warp
foreach run ( $runs )
# register each volume to the base
3dvolreg -verbose -zpad 1 -base vr_base_min_outlier+orig \
-1Dfile dfile.r$run.1D -prefix rm.epi.volreg.r$run \
-cubic \
-1Dmatrix_save mat.r$run.vr.aff12.1D \
pb00.$subj.r$run.tcat+orig

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

# catenate volreg/epi2anat/tlrc xforms
cat_matvec -ONELINE \
${subj}_anat_nudge_ns+tlrc::WARP_DATA -I \
${subj}_anat_nudge_al_junk_mat.aff12.1D -I \
mat.r$run.vr.aff12.1D > mat.r$run.warp.aff12.1D

# apply catenated xform: volreg/epi2anat/tlrc
3dAllineate -base ${subj}_anat_nudge_ns+tlrc \
-input pb00.$subj.r$run.tcat+orig \
-1Dmatrix_apply mat.r$run.warp.aff12.1D \
-mast_dxyz 3 \
-prefix rm.epi.nomask.r$run

# warp the all-1 dataset for extents masking
3dAllineate -base ${subj}_anat_nudge_ns+tlrc \
-input rm.epi.all1+orig \
-1Dmatrix_apply mat.r$run.warp.aff12.1D \
-mast_dxyz 3 -final NN -quiet \
-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

# make a single file of registration params
cat dfile.r*.1D > dfile_rall.1D

Would love to hear some feedback on what could improve what I am doing, as I said Im very new to this. Thanks in advance and please let me know if any information I left out could help further.
Attachments:
open | download - example3.jpg (12 KB)
open | download - example.jpg (10 KB)
Subject Author Posted

coregistration issues Attachments

Lordbyron001 September 29, 2017 09:31PM

Re: coregistration issues

Daniel Glen September 30, 2017 09:22AM