Package that provides tools for brain MRI Deep Learning pre-processing.
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.
- brainprep.spatial.apply_affine(imfile, targetfile, regfile, affines, interp='spline', check_pkg_version=False)[source]¶
Apply affine transformations to an image.
Note
This function is based on FSL.
- Parameters:
imfile : nibabel.Nifti1Image
the input image.
targetfile : nibabel.Nifti1Image
the target image.
regfile : str
the registered file.
affines : str or list of str
the affine transforms to be applied. If multiple transforms are specified, they are first composed.
interp : str, default ‘spline’
Choose the most appropriate interpolation method: ‘trilinear’, ‘nearestneighbour’, ‘sinc’, ‘spline’.
check_pkg_version : bool, default False
optionally check the package version using dpkg.
- Returns:
regfile, trffile : str
the generated files.
Follow us