On Thursday, August 25, 2011 11:53:12 you wrote:
> To whom it may concern:
>
> I am trying to normalize the MNI152 T1 2mm template to the MNI152 T1 1mm
> template. I used the following commands to FLIRT and FNIRT the template:
>
> flirt -in MNI152_T1_2mm_brain.nii.gz -ref MNI152_T1_2mm_brain.nii.gz -omat
> my_linear_transform -out linear_transf_2mm_1mm fnirt
> --ref=MNI152_T1_1mm_brain.nii.gz --in=MNI152_T1_2mm_brain.nii.gz
> --aff=my_linear_transform.mat --cout=my_nonlinear_transform.mat
> --iout=nonlinear_transf_2mm_1mm
>
> Linear normalization worked, but FNIRT did not output the nonlinear
> transformation matrix specified by --cout
> (i.e.'my_nonlinear_transform.mat'). Instead it output an .nii.gz file
> labeled 'my_nonlinear_transform.mat.nii.gz'. I am not sure why this
> happened and would appreciate help figuring out how to get -cout to output
> the correct nonlinear transformation matrix so that I can apply the warp
> to a set of ROIs.
>
> Thanks in advance,
> Anna
Dear Anna,
My limited understanding is that fnirt does not --cout a transformation
matrix, but rather the coefficients of the warp field. If you think about it,
this makes sense -- an affine transformation matrix can't describe a nonlinear
transformation. If you open the .nii.gz file produced by fnirt --cout it
should contain three volumes, one for each warp field coefficient. To apply
the nonlinear transform to another file, pass it to the --warp option of
applywarp. ApplyXFM and flirt cannot do nonlinear transforms.
Benjamin
|