fsl.wrappers.flirt

This module provides wrapper functions for the FSL FLIRT tool, and other related tools.

flirt

Wrapper for the flirt command.

makerot

Wrapper for the makerot command.

applyxfm

Convenience function which runs flirt -applyxfm ....

applyxfm4D

Wrapper for the applyxfm4D command.

invxfm

Use convert_xfm to invert an affine.

concatxfm

Use convert_xfm to concatenate two affines.

fixscaleskew

Use convert_xfm to fix the skew scale of an affine.

mcflirt

Wrapper for the mcflirt command.

standard_space_roi

Wrapper for the standard_space_roi command.

fsl.wrappers.flirt.flirt(src, ref, **kwargs)[source]

Wrapper for the flirt command.

The twod argument may be used in place of the 2D command line option.

fsl.wrappers.flirt.applyxfm(src, ref, mat, out, interp='spline', **kwargs)[source]

Convenience function which runs flirt -applyxfm .... Note that the default value for -interp is spline, which differs from the command-line default.

fsl.wrappers.flirt.applyxfm4D(src, ref, out, mat, **kwargs)[source]

Wrapper for the applyxfm4D command.

fsl.wrappers.flirt.invxfm(inmat, omat)[source]

Use convert_xfm to invert an affine.

fsl.wrappers.flirt.concatxfm(atob, btoc, atoc)[source]

Use convert_xfm to concatenate two affines. Note that the order of the input matrices is the opposite of the order expected by convert_xfm.

Parameters:
  • atob – Input matrix, transforming from “A” to “B”.

  • btoc – Input matrix, transforming from “B” to “C”.

  • atoc – Output matrix, transforming from “A” to “C”.

fsl.wrappers.flirt.fixscaleskew(inmat1, inmat2, omat)[source]

Use convert_xfm to fix the skew scale of an affine. Note that the order of the input matrices is the opposite of the order expected by convert_xfm.

Parameters:
  • inmat1 – Input matrix to fix.

  • inmat2 – Matrix to scale the skew to.

  • omat – Output matrix.

fsl.wrappers.flirt.mcflirt(infile, **kwargs)[source]

Wrapper for the mcflirt command.

fsl.wrappers.flirt.standard_space_roi(input, output, **kwargs)[source]

Wrapper for the standard_space_roi command.

Refer to the standard_space_roi command-line help for details on all arguments.

fsl.wrappers.flirt.makerot(theta, **kwargs)[source]

Wrapper for the makerot command.

fsl.wrappers.flirt.midtrans(output, *transforms, **kwargs)[source]

Wrapper for the midtrans command.