[MINC-users] Issue with itk_convert_xfm

Vladimir S. FONOV vladimir.fonov at gmail.com
Thu Jan 14 16:39:13 EST 2016


antsApplyTransforms is basically equivalent to mincresample
-invert_transformation

On Thu, Jan 14, 2016 at 3:18 PM, Andrew Wood <andrew at biospective.com> wrote:

> Hi all,
>
> I came across a set of transforms generated by ANTs which I've been trying
> to convert and use on minc volumes. There seems to be a bug in one or more
> of the tools I'm using, where applying the transforms to nifti volumes does
> not give the same result as applying them to minc volumes.
>
> Likely culprits:
> - itk_convet_xfm
> - mnc2nii or nii2mnc
> - antsApplyTransforms
> - mincresample
>
> Somewhere along the way, several components of the transforms get inverted.
> Here is an example:
>
> $ make_phantom phantom.mnc
> $ param2xfm -translation 10 10 10 trans.xfm
>
> # Apply the xfm
> $ mincresample -use_input_sampling -transform trans.xfm phantom.mnc out.mnc
>
> # Do the same transform in nifti space
> $ itk_convert_xfm trans.xfm trans.mat
> $ mnc2nii phantom.mnc phantom.nii
> $ antsApplyTransforms --input phantom.nii \
> --transform trans.mat \
> --output out.nii \
> --reference-image phantom.nii
>
> # Open result in a minc+nifti-friendly viewer, or convert back to minc
> $ nii2mnc out.nii thru_nifti.mnc
> $ register out.mnc thru_nifti.mnc
>
> The result of this for me is that the z component of the transform was
> inverted, but the x and y components are OK.
>
> From experimenting with various simple transforms, it seems that the
> following components are inverted:
>    - z translation
>    - z rotation
>    - x,y,z scale
>    - x shear
>
> Has anybody else noticed or dealt with this before?
>
> Thanks,
> Andrew
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>



-- 
Best regards,

 Vladimir S. Fonov ~ vladimir <dot> fonov <at> gmail <dot> com


More information about the MINC-users mailing list