mdreg.skimage.coreg#
- mdreg.skimage.coreg(moving: ndarray, fixed: ndarray, **kwargs) Tuple[ndarray, ndarray] [source]#
Coregister two 2D images or 3D volumes.
- Parameters:
moving (numpy.ndarray) – The moving image with dimensions (x,y) or (x,y,z).
fixed (numpy.ndarray) – The fixed target image with the same shape as the moving image.
kwargs (dict) – Any keyword argument accepted by
skimage.optical_flow_tvl1
.
- Returns:
coreg (numpy.ndarray) – Coregistered image in the same shape 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) and (x,y,z), then the deformation field will have dimensions (x,y,2) and (x,y,z,3), respectively. The displacement vectors are measured in voxel units. To retrieve displacements in physical units, the components defo[…,i] of the deformation field need to be multiplied with the voxel dimensions.