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  

|
July 27, 2020 11:11PM
Hello,
I am trying to do a diffeomorphic warp for an analysis. We are trying to use the non-linear warp to more accurately map out an area of hypersignal. The script I used was to take an aligned T2 set (pic attached) and output a non-linear warp. What resulted is the second pic, which doesn't look quite right. What am I doing wrong? The script is as follows:
if ( ! -f ${dset_pre}_WARP.nii.gz ) then
		echo "running nonlinear alignment with auto_warp for $subj"
		auto_warp.py -base $template -affine_input_xmat ID -qworkhard 0 2 \
		-input ${dset_pre}_aff${templateview} -overwrite \
		-output_dir awpy_${dset_pre} -qw_opts -iwarp
	
		cp awpy_${dset_pre}/anat.un.qw_WARP.nii ${dset_pre}_WARP.nii
		cp awpy_${dset_pre}/anat.un.qw_WARPINV.nii ${dset_pre}_WARPINV.nii
	
		gzip -f ${dset_pre}_WARP.nii ${dset_pre}_WARPINV.nii
	else
		echo "nonlinear alignment done for $subj"
	endif
	
	# combine nonlinear and affine warps for dataset warped to standard template space
	if ( ! -f ${dset_pre}_warp2std.nii.gz ) then
		echo "combining nonlinear and affine warps to warp original dataset to NMT space for $subj"
		3dNwarpApply -prefix ${dset_pre}_warp2std.nii.gz \
		-nwarp "${dset_pre}_WARP.nii.gz ${dset_pre}_al2std_mat.aff12.1D" \
		-source ${dset_pre}${dset_view} -master $template
	else
		echo "nonlinear and affine warps applied to original dataset for $subj"
	endif


Thank you for your help!



Edited 1 time(s). Last edit at 07/28/2020 09:02AM by ptaylor.
Attachments:
open | download - aligned2std.PNG (275 KB)
open | download - warp2std.PNG (129 KB)
Subject Author Posted

Help with diffeomorphic warping script Attachments

jreyelts July 27, 2020 11:11PM

Re: Help with diffeomorphic warping script

ptaylor July 28, 2020 09:10AM

Re: Help with diffeomorphic warping script

jreyelts July 28, 2020 01:39PM

Re: Help with diffeomorphic warping script

ptaylor July 28, 2020 02:46PM

Re: Help with diffeomorphic warping script

Daniel Glen July 29, 2020 05:37PM

Re: Help with diffeomorphic warping script

jreyelts July 29, 2020 11:33PM

Re: Help with diffeomorphic warping script

ptaylor July 30, 2020 09:29AM

Re: Help with diffeomorphic warping script

jreyelts August 08, 2020 07:33PM

Re: Help with diffeomorphic warping script

Daniel Glen August 09, 2020 08:48AM

Re: Help with diffeomorphic warping script

ptaylor August 10, 2020 02:54PM