itk_dreg.block.dask¶

Module Contents¶

Functions¶

rechunk_to_physical_block

Rechunk the given array/image so that the physical size of each block approximately matches the physical size of chunks in the reference array/image.

API¶

itk_dreg.block.dask.rechunk_to_physical_block(array: dask.array.core.Array, array_image: itk.Image, reference_array: dask.array.core.Array, reference_image: itk.Image) dask.array.core.Array¶

Rechunk the given array/image so that the physical size of each block approximately matches the physical size of chunks in the reference array/image.

Parameters:
  • array – The Dask array to rechunk.

  • array_image – The image or image view to reference to map from physical space to the Dask array voxel space.

  • reference_array – The Dask array reference with chunk sizes to match.

  • reference_image – The image or image view to reference to map from the reference Dask array voxel space to physical space.

Returns:

The input dask.array.Array rechunked to approximately match physical chunk sizes with the reference array.