mdreg.skimage.coreg_series#

mdreg.skimage.coreg_series(moving: ndarray | Array, fixed: ndarray | Array, parallel=True, progress_bar=False, path=None, name='coreg', **kwargs)[source]#

Coregister two series of 2D images or 3D volumes.

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

  • fixed (numpy.ndarray | zarr.Array) – The fixed target image or volume, in the same dimensions as the moving image.

  • parallel (bool) – Set to True to parallelize the computations. Defaults to True.

  • progress_bar (bool) – Show a progress bar during the computation. This keyword is ignored if parallel = True. Defaults to False.

  • 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.

  • kwargs (dict) – Any keyword argument accepted by skimage.registration.optical_flow_tvl1.

Returns:

  • coreg (numpy.ndarray | zarr.Array) – Coregistered series with the same dimensions as the moving image.

  • defo (numpy.ndarray | zarr.Array) – The deformation field with the same dimensions as moving, and one additional dimension for the components of the vector field. If moving has dimensions (x,y,t) and (x,y,z,t), then the deformation field will have dimensions (x,y,t,2) and (x,y,z,t,3), respectively. The displacement vectors are measured in voxel units.