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  

|
Daniel Glen
February 04, 2009 12:15PM
One way to use a mask dataset would be to do the alignment with the mask datasets and apply the transformation to the original datasets.

#mask the anat dataset
3dcalc -a mask+orig -b anat+orig -expr 'a*b' -prefix masked_anat
# mask the epi (I'll just assume there's an epi dataset resampled to the same
# grid as the mask. Motion correction, slice timing correction has also already
# been done.)
3dcalc -a mask+orig -b epi_rs+orig -expr 'a*b' -prefix masked_anat
# now align the masked datasets and apply the transformation to original anat
align_epi_anat.py -anat masked_anat+orig -epi masked_epi+orig -epi_base 0 \
-anat_has_skull no -epi_strip None -prep_off -suffix "_al2mask" \
-child_anat anat+orig

This method requires the same mask to cover both datasets in roughly the same areas.

For the weight dataset, you can see that in the usual alignment procedure used by align_epi_anat.py a weight dataset is created normalizing the 0 to 90 percentile range from the representative epi_base dataset to have values from 0 to 1. You can replace this weight dataset in the call to 3dAllineate with another dataset. In your case, you might consider weighting the _wt dataset created with a greater weighting for the occipital cortex.

# do regular alignment and save datasets that would be input to
# 3dAllineate including computed weight dataset
align_epi_anat.py -save_Al_in -anat anat+orig -epi epi+orig -epi_base 0
# reweight with ROI
3dcalc -a epi_wt_in_3dAl_al+orig -b occipitalROI+orig \
-expr '0.5*(a+step(b))' -prefix new_wt
# align datasets using alternative weight dataset
3dAllineate -lpc -weight new_wt+orig -source anat_anat_in_3dAl_al+orig \
-prefix anat_al2newwt -base epi_epi_in_3dAl+orig -nocmass \
-1Dmatrix_save newwt_alline_mat.aff12.1D -master SOURCE \
-weight_frac 1.0 -maxrot 6 -maxshf 10 -VERB -warp aff \
-source_automask+4 -onepass
Subject Author Posted

align_epi_anat.py in lesioned brain

kazu February 02, 2009 03:33AM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 02, 2009 09:37AM

Re: align_epi_anat.py in lesioned brain

kazu February 02, 2009 10:32AM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 02, 2009 12:09PM

Re: align_epi_anat.py in lesioned brain

kazu February 02, 2009 06:22PM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 03, 2009 04:32PM

Re: align_epi_anat.py in lesioned brain

kazu February 04, 2009 04:49AM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 04, 2009 12:15PM

Re: align_epi_anat.py in lesioned brain

kazu February 04, 2009 11:04PM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 05, 2009 11:09AM

Re: align_epi_anat.py in lesioned brain

kazu February 08, 2009 05:10AM

Re: align_epi_anat.py in lesioned brain

Daniel Glen February 08, 2009 11:26AM