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  

|
January 06, 2015 04:00PM
I've worked out some of the problems recently, so I'm hoping this helps. There are a few ways to warp from the template space to the original native space (your B0 space). One important consideration is the overlapping of the grids. Bob has done a lot of work to make this work properly, but you have to use 3dNwarpApply to concatenate the warps; otherwise, transformations aren't defined outside the grid with the other methods of concatenating nonlinear warps (3dNwarpCat and 3dNwarpCalc), partly because there is no "master" dataset. Inverting the nonlinear warp transformation in-line gives the equivalent of using the pre-made one out 3dQwarp , but it's slower if you have to do this more than once.

# good way
3dNwarpApply -prefix T2_template_al2sub_nwapply -nwarp 'T2_sub_shft_inv.aff12.1D awpy/anat.un.aff.qw_WARPINV.nii' \
-source T2_template.nii -master T2_subject_shft.nii

# maybe good, but not off-grid
3dNwarpCat -prefix T2_template_al2subWARPINV -overwrite -warp2 'awpy/anat.un.aff.qw_WARPINV.nii' -warp1 T2_sub_shft_inv.aff12.1D
3dNwarpApply -prefix T2_template_al2sub_nwcat2 -nwarp T2_template_al2subWARPINV+tlrc \
-source T2_template.nii -master T2_subject_shft.nii

# also maybe good, but not off-grid
cat_matvec T2_subject_shft_al2T2template_mat.aff12.1D -I > T2_sub_inv_matrix.1D
3dNwarpCalc "&readwarp(awpy/anat.un.aff.qw_WARPINV.nii)" "&read4x4(T2_sub_inv_matrix.1D)" \
"&compose" "&write(T2_template_al2sub_nwcalc_WARPINV)"
3dNwarpApply -prefix T2_template_al2sub_nwcalc -nwarp T2_template_al2sub_nwcalc_WARPINV+tlrc. \
-source T2_template.nii -master T2_subject_shft.nii



Edited 1 time(s). Last edit at 01/06/2015 04:01PM by Daniel Glen.
Subject Author Posted

3dNwarpApply and 3dNwarpCat question: different results

ptaylor January 06, 2015 08:16AM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Peter Molfese January 06, 2015 09:51AM

Re: 3dNwarpApply and 3dNwarpCat question: different results

ptaylor January 06, 2015 10:21AM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Emperor Zhark January 06, 2015 02:04PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Emperor Zhark January 06, 2015 02:07PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

ptaylor January 06, 2015 02:49PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Isaac Schwabacher January 06, 2015 03:37PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Daniel Glen January 06, 2015 04:00PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

Emperor Zhark January 06, 2015 04:16PM

Re: 3dNwarpApply and 3dNwarpCat question: different results

ptaylor January 06, 2015 04:39PM