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  

|
December 30, 2018 11:39PM
Hi, afni expert
I am using align_epi_anat and trying to add a weight dataset to adjust the contribution of the cost function. Basically, I have a skullstripped brainmask and want the alignment only consider the cost function that involves brain voxels. I used something like ''-Allineate_opts -weight brainmask.nii.gz". See the full command below

align_epi_anat.py -dset1 /home/stone-ext2/primatemri/site-princeton/sub-032114/ses-001/anat/sub-032114_ses-001_run-2_T1w.nii.gz -dset2 /home/stone-ext2/primatemri/site-princeton/sub-032114/ses-001/anat/sub-032114_ses-001_run-1_T1w.nii.gz -master_dset1 /home/stone-ext2/primatemri/site-princeton/sub-032114/ses-001/anat/sub-032114_ses-001_run-1_T1w.nii.gz -suffix _al.nii.gz -dset1to2 -output_dir /home/stone-ext2/primatemri/site-princeton/sub-032114/anatpp -giant_move -dset1_strip None -dset2_strip None -overwrite -rigid_body -Allineate_opts -weight /home/stone-ext2/primatemri/site-princeton/sub-032114/anatpp/sub-032114_ses-001_run-1_T1w_ssmask.nii.gz

However, it seems that align_epi_anat will automatically generate a brainmask and thus the -weight option will be double set. See the last part of the command output. Can I ask how to pass '-weight' to internal 3dAllineate function??

Thanks.


++ 3dbucket: AFNI version=AFNI_18.2.19 (Sep 27 2018) [64-bit] [0/1842]
#++ removing skull or area outside brain
#++ Computing weight mask
#Script is running (command trimmed):
3dBrickStat -automask -percentile 90.000000 1 90.000000 ./__tt_sub-032114_ses-001_run-1_T1w_ts+orig
#++ Applying threshold of 1158.000000 on /home/stone-ext2/primatemri/site-princeton/sub-032114/anatpp/__tt_sub-032114_ses-001_run-1_T1w_ts+orig
#Script is running (command trimmed):
3dcalc -datum float -prefix ./__tt_sub-032114_ses-001_run-1_T1w_ts_wt -a ./__tt_sub-032114_ses-001_run-1_T1w_ts+orig -expr 'min(1,(a/1158.000000))'
++ 3dcalc: AFNI version=AFNI_18.2.19 (Sep 27 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tt_sub-032114_ses-001_run-1_T1w_ts_wt+orig.BRIK
#++ Aligning dset1 data to dset2 data
#Script is running (command trimmed):
3dAllineate -lpa -wtprefix ./__tt_sub-032114_ses-001_run-2_T1w_al.nii.gz_wtal -weight ./__tt_sub-032114_ses-001_run-1_T1w_ts_wt+orig -source ./__tt_sub-032114_ses-001_run-2_T1w+orig -prefix ./sub-032114_ses-001_run-2_T1w_al.nii.gz -base ./__tt_sub-032114_ses-001_run-1_T1w_ts+orig -cmass -1Dmatrix_save ./sub-032114_ses-001_run-2_T1w_al.nii.gz_mat.aff12.1D -master /home/stone-ext2/primatemri/site-princeton/sub-032114/ses-001/anat/sub-032114_ses-001_run-1_T1w.nii.gz -weight ./sub-032114_ses-001_run-1_T1w_ssmask.nii.gz -twobest 11 -twopass -VERB -maxrot 45 -maxshf 40 -fineblur 1 -source_automask+2
++ 3dAllineate: AFNI version=AFNI_18.2.19 (Sep 27 2018) [64-bit]
++ Authored by: Zhark the Registrator
** FATAL ERROR: Can't have multiple -weight options sad smiley
** Program compile date = Sep 27 2018
** 3dAllineate failure
** ERROR - script failed
Subject Author Posted

add brainmask in align_epi_anat

ruyuanzhang December 30, 2018 11:39PM

Re: add brainmask in align_epi_anat

Daniel Glen December 31, 2018 12:27PM

Re: add brainmask in align_epi_anat

ruyuanzhang January 02, 2019 02:52PM

Re: add brainmask in align_epi_anat

Daniel Glen January 02, 2019 03:47PM

Re: add brainmask in align_epi_anat

ruyuanzhang January 10, 2019 05:24PM

Re: add brainmask in align_epi_anat

Daniel Glen January 10, 2019 05:29PM

Re: add brainmask in align_epi_anat

ruyuanzhang January 11, 2019 12:58AM