NAME

lta_convert

SYNOPSIS

convert_convert [options]

DESCRIPTION

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.

POSITIONAL ARGUMENTS

None.

REQUIRED-FLAGGED ARGUMENTS

Exactly one input is required:

ArgumentExplanation
--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)

At least one output is required:

ArgumentExplanation
--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

OPTIONAL-FLAGGED ARGUMENTS

ArgumentExplanation
--invertinverts transform
--ltavox2vox(with --ltaout) output type VOX2VOX (default RAS2RAS)

While LTA contains src and trg information, other file formats are missing this information and you need to explicitly pass it via --src and/or --trg. You can also use this if you want to inform the transform to reslice your image differently (i.e. to modify the geometry information without changing RAS coordinates). For TKREG/register.dat type matrices, src=mov and trg=ref/targ.

ArgumentExplanation
--srcspecify src image geometry (mov volume for TKREG/register.dat)
--trgspecify trg image geometry
--trgconformconform trg image geometry (COR standard). Will be done before inversion, if specified.

EXAMPLE 1

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.

EXAMPLE 2

Invert transform:

lta_convert --inlta in.lta --outlta out-inverse.lta --invert

Reads in.lta, inverts it and saves it as out-inverse.lta

EXAMPLE 3

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

EXAMPLE 4

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.

REPORTING

Report bugs to <freesurfer@nmr.mgh.harvard.edu>

SEE-ALSO

mri_concatenate_lta (to concatenate or invert LTA transforms).
or mri_convert -at or -ait to apply transforms to an image.