mdreg.elastix.transform_series#

mdreg.elastix.transform_series(moving, transfo, path=None, name='deform', spacing=1)[source]#

Transforms a series of images using a transformation produced by mdreg.elastix.coreg_series().

Parameters:
  • moving (numpy.ndarray | zarr.Array) – The moving image or volume, with dimensions (x,y,t) or (x,y,z,t).

  • transfo (list) – List of itk.elastixParameterObject with one transform per image in the series.

  • path (str, optional) – Path on disk where to save the results. If no path is provided, the results are not saved to disk. Defaults to None.

  • name (str, optional) – For data that are saved on disk, provide an optional filename. This argument is ignored if no path is provided.

  • spacing (array-like) – Pixel spacing in mm. This can be a single scalar if all dimensions are equal, or an array of 2 elements (for 2D data) or 3 elements ( for 3D data). Defaults to 1.

Returns:

numpy.ndarray

Return type:

The transformed image.