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  

|
February 07, 2017 05:30PM
Thanks for the advice. I've tried the following, and maybe I'm just having trouble getting this right conceptually. I've added this @Align_Centers block but it doesn't seem to help.

# --------------------------------
# Align centers of datasets to template
@Align_Centers -base MNI152_T1_2009c+tlrc            \
    -dset anat_mprage_unif+orig                      \
    -child pb02.$subj.r01.tshift+orig.HEAD           \
    pb02.$subj.r02.tshift+orig.HEAD                  \
    pb02.$subj.r03.tshift+orig.HEAD                  \
    pb02.$subj.r04.tshift+orig.HEAD                  \
    pb02.$subj.r05.tshift+orig.HEAD                  \
    pb02.$subj.r06.tshift+orig.HEAD                  \
    pb02.$subj.r07.tshift+orig.HEAD                  \
    pb02.$subj.r08.tshift+orig.HEAD                  \
    pb02.$subj.r09.tshift+orig.HEAD                  \

# --------------------------------
# extract volreg registration base
3dbucket -prefix vr_base pb02.$subj.r01.tshift_shft+orig"[2]"


# ================================= align ==================================
# for e2a: compute anat alignment transformation to EPI registration base
# (new anat will be intermediate, stripped, anat_mprage_ns+orig)
align_epi_anat.py -anat2epi -anat anat_mprage_unif_shft+orig  \
       -suffix _al_keep                             \
	   -epi vr_base+orig -epi_base 0                \
	   -epi_strip 3dAutomask                        \
	   -volreg off -tshift off						\
	   -cost lpc+zz


# ================================== tlrc ==================================
# warp anatomy to standard space
auto_warp.py -base MNI152_T1_2009c+tlrc -input anat_mprage_unif_shft_al_keep+orig \
             -skull_strip_input no -unifize_input no

# move results up out of the awpy directory
# (NL-warped anat, affine warp, NL warp)
# (use typical standard space name for anat)
# (wildcard is a cheap way to go after any .gz)
3dbucket -prefix anat_mprage_unif_shft_al_keep                           \
    awpy/anat_mprage_unif_shft_al_keep.aw.nii*
mv awpy/anat.aff.Xat.1D .
mv awpy/anat.aff.qw_WARP.nii .


# ================================= volreg =================================
# align each dset to base volume
foreach run ( $runs )
    # register each volume to the base
    3dvolreg -verbose -zpad 1 -base vr_base+orig                         \
             -1Dfile dfile.r$run.1D -prefix pb03.$subj.r$run.volreg      \
             -cubic                                                      \
             pb02.$subj.r$run.tshift_shft+orig
end

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

# compute motion magnitude time series: the Euclidean norm
# (sqrt(sum squares)) of the motion parameter derivatives
1d_tool.py -infile dfile_rall.1D -set_nruns 9                            \
           -derivative  -collapse_cols euclidean_norm                    \
           -write motion_${subj}_enorm.1D

# create an anat_final dataset, aligned with stats
3dcopy anat_mprage_unif_shft_al_keep+orig anat_final.$subj

# -----------------------------------------
# warp anat follower datasets (non-liner)
3dNwarpApply -source anat_mprage_unif_shft+orig                              \
             -master anat_final.$subj+orig                               \
             -ainterp wsinc5 -nwarp anat.aff.qw_WARP.nii anat.aff.Xat.1D \
             anat_mprage_unif_shft_al_keep_mat.aff12.1D                      \
             -prefix anat_w_skull_warped
Subject Author Posted

Fatal error using 3dNwarpApply

nlanderson9 February 03, 2017 03:22PM

Re: Fatal error using 3dNwarpApply

Daniel Glen February 04, 2017 10:23PM

Re: Fatal error using 3dNwarpApply

nlanderson9 February 07, 2017 05:30PM

Re: Fatal error using 3dNwarpApply

nlanderson9 February 09, 2017 01:39PM

Re: Fatal error using 3dNwarpApply

Daniel Glen February 09, 2017 04:05PM

Re: Fatal error using 3dNwarpApply

nlanderson9 February 14, 2017 10:45AM