Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.interfaces.fsl.affine

brainprep.interfaces.fsl.affine(anatomical_file, template_file, output_dir, entities, rigid=False, quick=False)[source]

Affinely register a BIDS-compliant anatomical image to a template file using FSL’s flirt.

Parameters:
anatomical_fileFile

Path to the input image file.

template_file: File

Path to the image file defining the template space.

output_dirDirectory

Directory where the affine transformation will be saved.

entitiesdict

A dictionary of parsed BIDS entities including modality.

rigidbool

Estimate a 6 DOF transformation that maintains the original size and shape of the brain. By default a 9 DOF transformation allows for additional scaling in the x, y, and z directions, adjusting the size and shape of the brain during the alignment process. Default False.

quickbool

Restricted rotation search range to +/-30° on all three axes. Default False.

Returns:
commandlist[str]

Registration command-line.

outputstuple[File]
  • aligned_anatomical_file : File - Aligned input image file.

  • transform_file : File - The affine transformation file.