lta_convert
convert_convert [options]
This program converts different transformation formats. Some formats may require you to pass an image if the geometry information is missing form the transform file format.
Argument | Explanation |
---|---|
--inlta <in.lta> | input transform of LTA type |
--infsl <in.fslmat> | input transform of FSL type |
--inmni <in.xfm> | input transform of MNI / XFM type |
--inreg <inreg.dat> | input transform of TK REG type (deprecated format) |
--inniftyreg <inniftyreg.dat> | input transform of Nifty Reg type (inverse RAS2RAS) |
Argument | Explanation |
---|---|
--outlta <out.lta> | output linear transform (LTA Freesurfer format) |
--outfsl <out.mat> | output transform in FSL format |
--outmni <out.xfm> | output transform in mni/xfm format |
--outreg <reg.dat> | output transform in reg dat format |
Argument | Explanation |
---|---|
--invert | inverts transform |
--ltavox2vox | (with --ltaout) output type VOX2VOX (default RAS2RAS) |
Argument | Explanation |
---|---|
--src | specify src image geometry (mov volume for TKREG/register.dat) |
--trg | specify trg image geometry |
--trgconform | conform trg image geometry (COR standard). Will be done before inversion, if specified. |
Convert FSL transform to LTA (FreeSurfer):
lta_convert --infsl fsl.mat --outlta my.lta --src src.nii --trg trg.nii
converts FSL matrix to FreeSurfer LTA, adding missing src and target geometry info.
Invert transform:
lta_convert --inlta in.lta --outlta out-inverse.lta --invert
Reads in.lta, inverts it and saves it as out-inverse.lta
Conform target geometry:
lta_convert --inlta in.lta --outlta out-conform.lta --trgconform
Reads in.lta, conforms trg geometry and saves it as out-conform.lta
Create transform from header geometries only:
lta_convert --inlta identity.nofile --src src.nii --trg trg.nii --outlta out.lta
Creates LTA from SRC and TRG header geometies, e.g. to convert SPM results to LTA (SPM stores its transforms in the header). Similarly you can create a lta for conform reslicing when specifying --trgconform instead of --trg trg.nii.
Report bugs to <freesurfer@nmr.mgh.harvard.edu>
mri_concatenate_lta (to concatenate or invert LTA transforms).
or mri_convert -at or -ait to apply transforms to an image.