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 08, 2009 04:38PM
I think there is a bug with the post_matrix option in the align_epi_anat.py script. I kept getting an error with the subroutine 'align_epi2anat' that said 'str' object had no input attribute, when it was trying to apply the concatenated transformation to the epi, so I changed it starting at line 1637 from :

if(ps.tlrc_apar!=""):
tlrc_dset = afni_name("%s_tlrc%s" % (self.epi.out_prefix(), suf))
tlrc_dset.view = '+tlrc'
if tlrc_dset.exist():
tlrc_dset.delete(ps.oexec)
atlrcpost = tlrc_dset
self.info_msg("Applying transformation of epi to anat tlrc parent")

else:
tlrc_orig_dset = afni_name("%s_post%s" % (self.epi.out_prefix(), suf))
tlrc_orig_dset.view = '+orig'
if tlrc_orig_dset.exist():
tlrc_orig_dset.delete(ps.oexec)
atlrcpost = tlrc_orig_dset
self.info_msg("Applying post transformation matrix to epi");

com = shell_com( \
"3dAllineate -base %s -1Dmatrix_apply %s " \
"-prefix %s -input %s -verb %s" % \
( ps.tlrc_apar.input(), epi_mat, atlrcpost.input(), e.input(),\
ps.master_tlrc_option), ps.oexec)
com.run()

to instead:

if(ps.tlrc_apar!=""):
tlrc_dset = afni_name("%s_tlrc%s" % (self.epi.out_prefix(), suf))
tlrc_dset.view = '+tlrc'
if tlrc_dset.exist():
tlrc_dset.delete(ps.oexec)
atlrcpost = tlrc_dset
self.info_msg("Applying transformation of epi to anat tlrc parent")
com = shell_com( \
"3dAllineate -base %s -1Dmatrix_apply %s " \
"-prefix %s -input %s -verb %s" % \
( ps.tlrc_apar.input(), epi_mat, atlrcpost.input(), e.input(),\
ps.master_tlrc_option), ps.oexec)

else:
tlrc_orig_dset = afni_name("%s_post%s" % (self.epi.out_prefix(), suf))
tlrc_orig_dset.view = '+orig'
if tlrc_orig_dset.exist():
tlrc_orig_dset.delete(ps.oexec)
atlrcpost = tlrc_orig_dset
self.info_msg("Applying post transformation matrix to epi");
com = shell_com( \
"3dAllineate -1Dmatrix_apply %s " \
"-prefix %s -input %s -verb %s" % \
( epi_mat, atlrcpost.input(), e.input(),\
ps.master_tlrc_option), ps.oexec)

com.run()

so that it wouldn't try to use any talairach base set in the 3dAllineate step, if you were just doing a post_matrix transformation, and that worked.

Matt
Subject Author Posted

align_epi_anat.py bug with post matrix option

Matt September 08, 2009 04:38PM

Re: align_epi_anat.py bug with post matrix option

Matt September 08, 2009 04:39PM

Re: align_epi_anat.py bug with post matrix option

Daniel Glen September 08, 2009 05:25PM

Re: align_epi_anat.py bug with post matrix option

Matt September 09, 2009 06:10PM