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.register_affine(imfile, targetfile, regfile, mask=None, cost='normmi', bins=256, interp='spline', dof=9, check_pkg_version=False)[source]¶
Register the MRI image to a target image using an affine transform with 9 dofs.
Note
This function is based on FSL.
- Parameters:
imfile : str
the input image.
targetfile : str
the target image.
regfile : str
the registered file.
mask : str, default None
the white matter mask image needed by the bbr cost function.
cost : str, default ‘normmi’
Choose the most appropriate metric: ‘mutualinfo’, ‘corratio’, ‘normcorr’, ‘normmi’, ‘leastsq’, ‘labeldiff’, ‘bbr’.
bins : int, default 256
Number of histogram bins
interp : str, default ‘spline’
Choose the most appropriate interpolation method: ‘trilinear’, ‘nearestneighbour’, ‘sinc’, ‘spline’.
dof : int, default 9
Number of affine transform dofs.
check_pkg_version : bool, default False
optionally check the package version using dpkg.
- Returns:
regfile, trffile : str
the generated files.
Follow us