Automated Image Registration (AIR)

class sbl.sabre.interfaces.air.Reslice(command=None, **inputs)

Inverts input_transformation of image A to B to transform_toACPC B to A.

Input attributes:

Parameters:
  • input_image – Input image as an existing file name
  • input_transform – Input transformation as an existing file name
  • model – Interpolation model (1=trilinear) as 0 <= an integer <= 13 (optional; default=1)
  • keep_voxdims – Keep voxel dimensions same as those of target space? as a boolean (optional; default=False)
  • overwrite – Overwrite existing output? as a boolean (optional; default=True)
  • output_image – Output image as a file name (optional; mutually exclusive with output_image_suffix)
  • output_image_suffix – Output suffix as a string (optional; mutually exclusive with output_image; default=_resliced)

Output attributes:

Parameters:output_image – Resliced image as an existing file name

Example:

>>> reslice = Reslice()
>>> reslice.input_image = '{session}_T1.nii.gz'
>>> reslice.input_transformation = '{session}_T1_toACPC.air'
>>> reslice.output_image_suffix = '_inACPC'
>>> reslice.model = 0 # Nearest-neighbour interpolation
>>> reslice.keep_voxdims = True
>>> reslice.cmdline
'reslice {session}_T1_toACPC.air {session}_T1_inACPC.nii.gz -a {session}_T1.nii.gz -o'
>>> reslice.run() 
cmdline None

Generate command line for 8-bit or 16-bit version of AIR depending on input data type

class sbl.sabre.interfaces.air.InvertTransformation(command=None, **inputs)

Inverts input_transformation of image A to B to transform_toACPC B to A.

Input attributes:

Parameters:
  • input_transform – Input transformation as an existing file name
  • overwrite – Overwrite existing output? as a boolean (default=True)
  • output_transform – Output transformation as a file name (optional; mutually exclusive with output_transform_suffix)
  • output_transform_suffix – Output suffix as a string (optional; mutually exclusive with output_transform; default=_inverse)

Output attributes:

Parameters:output_transform – Output transformation as an existing file name

Example:

>>> invert = InvertTransformation()
>>> invert.input_transform = '{session}_T1_toACPC.air'
>>> invert.cmdline
'invert_air {session}_T1_toACPC.air {session}_T1_toACPC_inverse.air y'
>>> invert.run() 

Previous topic

FLEX

Next topic

Utilities

This Page