mdreg.ants.coreg#

mdreg.ants.coreg(moving: ndarray, fixed: ndarray, return_transfo=True, **kwargs)[source]#

Coregister two 2D images or 3D volumes.

Parameters:
  • moving (np.ndarray) – The moving 2D or 3D image.

  • fixed (np.ndarray) – The fixed target image with the same shape as the moving image.

  • return_transfo (bool) – is True, return the transformations as paths to files on disk. If this is set to False, only the coregistered image is returned and the transformations are deleted on disk. Defaults to True.

  • kwargs – Any keyword argument accepted by ants.registration. Note that array arguments need to be provided as numpy arrays rather than ants’s own data type.

Returns:

np.ndarray

The registered moving image.

transfostr | list

path or paths of parameter files encoding the transformation from moving to coregistered image

Return type:

coreg