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  

|
August 10, 2018 07:38PM
Hello,

I am trying to use the -AddEdge option to check how good my EPI to anatomy alignment is. Here is my proc.py command that I used. I am using AFNI_17.1.09 on a MacOS.

afni_proc.py -subj_id ${subj}\
-script proc_${subj}.sh\
-out_dir ${top_dir}${subj}/${subj}.${group_id}.preprocessed\
-dsets ${func_dir}obj_test_run1.nii ${func_dir}obj_test_run2.nii ${func_dir}obj_test_run3.nii\
-blocks tshift despike align volreg mask blur scale regress\
-copy_anat ${struct_dir}anat_ns.nii\
-anat_has_skull no\
-tcat_remove_first_trs 0\
-tshift_opts_ts -tpattern alt+z\
-align_opts_aea -cost lpc+ZZ -giant_move -AddEdge\
-volreg_align_e2a\
-volreg_align_to MIN_OUTLIER\
-blur_size 2\
-regress_anaticor\
-regress_reml_exec\
-regress_stim_times\
${stim_times_dir}stimtimes.01.1D\
${stim_times_dir}stimtimes.02.1D\
${stim_times_dir}stimtimes.19.1D\
${stim_times_dir}stimtimes.20.1D\
-regress_stim_labels Obj_T_Hit Obj_T_M Lure_Obj_FA Lure_Obj_CR\
-regress_basis 'TENT(0,15,6)'\
-regress_local_times\
-regress_run_clustsim no\
-regress_est_blur_epits\
-regress_est_blur_errts\
-regress_censor_outliers 0.5\
-regress_censor_motion 1.0\
-regress_apply_mot_types demean deriv\
-regress_opts_3dD\
-GOFORIT 8\
-allzero_OK\
-num_glt 4\
-gltsym 'SYM: +Lure_Obj_FA[1..3]' -glt_label 1 'Lure_Obj_FA'\
-gltsym 'SYM: +Lure_Obj_CR[1..3]' -glt_label 2 'Lure_Obj_CR'\
-gltsym 'SYM: +0.5*Lure_Obj_FA[1..3] -0.5*Lure_Obj_CR' -glt_label 3 'LureFA_minus_CR'\
-gltsym 'SYM: +0.5*Lure_Obj_CR[1..3] -0.5*Lure_Obj_FA' -glt_label 4 'LureCR_minus_FA'\
-jobs 8\

After the computation finishes I get an "AddEdge" directory in my result folder, which contains several different files.
It looks like it contains
-several versions of the anatomical image, which is given the suffix _al_junk after align_epi_anat.py (as I am trying to align the epi to anat)
-several versions of the anatomical image (I suppose before the alignment)
- several versions of the EPI volume, which is the min_outlier volume

ae.ExamineList.log anat_ns_ns_ec+orig.BRIK
anat_ns_al_junk+orig.BRIK anat_ns_ns_ec+orig.HEAD
anat_ns_al_junk+orig.HEAD vr_base_min_outlier_ns+orig.BRIK
anat_ns_al_junk_rs+orig.BRIK vr_base_min_outlier_ns+orig.HEAD
anat_ns_al_junk_rs+orig.HEAD vr_base_min_outlier_ns_anat_ns_al_junk_rs_ec+orig.BRIK
anat_ns_al_junk_rs_e3+orig.BRIK vr_base_min_outlier_ns_anat_ns_al_junk_rs_ec+orig.HEAD
anat_ns_al_junk_rs_e3+orig.HEAD vr_base_min_outlier_ns_anat_ns_ns_ec+orig.BRIK
anat_ns_al_junk_rs_ec+orig.BRIK vr_base_min_outlier_ns_anat_ns_ns_ec+orig.HEAD
anat_ns_al_junk_rs_ec+orig.HEAD vr_base_min_outlier_ns_e3+orig.BRIK
anat_ns_ns+orig.BRIK vr_base_min_outlier_ns_e3+orig.HEAD
anat_ns_ns+orig.HEAD vr_base_min_outlier_ns_ec+orig.BRIK
anat_ns_ns_e3+orig.BRIK vr_base_min_outlier_ns_ec+orig.HEAD
anat_ns_ns_e3+orig.HEAD

As I aligned the EPI to the anatomical dataset, I would want to compare the EPI min outlier volume (before alignment) with the final anatomical image and the EPI min outlier volume (after alignment) with the final anatomical image. How do I have to change my command to get AddEdge make this comparison?

I then tried the following command to get the comparison I actually want:
@AddEdge anat_final.103+orig. vr_base_min_outlier+orig. final_epi_vr_base_min_outlier+orig.

I got an error message that the two EPI datasets don t match in size. I understand now that I need to bring them to the same grid. Would i need to use the 3dresample with the master option or only with the -dxyz option?
I mean, I don t think that I want to change the orientation of the min outlier EPI volume (before alignment) as this might then later not show the true overlap between the min outlier volume and anatomical image in AddEdge.

Sorry for this long message. And thank you very much in advance for your help!!
Carolin
Subject Author Posted

Problem with -AddEdge result

carolin31 August 10, 2018 07:38PM