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.applyaffine¶
- brainprep.interfaces.fsl.applyaffine(image_file, template_file, transform_file, output_dir, entities, interpolation='spline')[source]¶
Apply an affine transformation to a BIDS-compliant image file using FSL’s flirt.
- Parameters:
- image_fileFile
Path to the input image file.
- template_file: File
Path to the image file defining the template space.
- transform_fileFile
Path to the affine transformation file.
- output_dirDirectory
Directory where the aligned image will be saved.
- entitiesdict
A dictionary of parsed BIDS entities including modality.
- interpolation: str
The interpolation method: ‘trilinear’, ‘nearestneighbour’, ‘sinc’, or ‘spline’. Default ‘spline’.
- Returns:
- commandlist[str]
Alignment command-line.
- outputstuple[File]
aligned_image_file : File - Aligned input image file.