itk_dreg.base.image_block_interface¶

Module Contents¶

Classes¶

BlockRegStatus

Status codes indicating the registration outcome from a single block pair.

BlockInfo

Header information describing the position of a lazy dask subvolume (block) in voxel space with respect to a parent volume.

LocatedBlock

Combined header and data access to get a lazy dask volume with respect to a parent volume in voxel space.

BlockPairRegistrationResult

Encapsulate result of fixed-to-moving registration over one block pair.

LocatedBlockResult

Encapsules pairwise registration result information with contextual information describing how the fixed subimage in registration relates to the greater fixed image.

RegistrationTransformResult

Encapsulate result of fixed-to-moving registration over all block pairs.

RegistrationResult

Encapsulate result of fixed-to-moving registration over all block pairs.

API¶

class itk_dreg.base.image_block_interface.BlockRegStatus¶

Bases: enum.IntEnum

Status codes indicating the registration outcome from a single block pair.

TODO: Extend with more granular error codes for itk-dreg infrastructure.

Initialization

Initialize self. See help(type(self)) for accurate signature.

SUCCESS¶

0

Registration yielded at least a forward transform result.

FAILURE¶

1

Registration encountered an unspecified error.

class itk_dreg.base.image_block_interface.BlockInfo¶

Header information describing the position of a lazy dask subvolume (block) in voxel space with respect to a parent volume.

Accessors are in NumPy order: (K,J,I) where K is slowest, I is fastest

chunk_index: List[int]¶

None

The chunk position in the greater image volume in terms of chunk counts. For instance, if traversing 2x2x2 volume along the fastest axis first:

  • the 0th chunk would have chunk index (0,0,0),

  • the 1st chunk would have chunk index (0,0,1),

  • the 7th chunk would have chunk index (1,0,0)

array_slice: List[slice]¶

None

The chunk position in the greater image volume in terms of voxel access. For instance, if a 100x100x100 volume is evenly subdivided into 10x10x10 chunks, the first chunk would slice along [(0,10,1),(0,10,1),(0,10,1)].

property ndim: int¶
property shape: List[int]¶
class itk_dreg.base.image_block_interface.LocatedBlock¶

Combined header and data access to get a lazy dask volume with respect to a parent volume in voxel space.

Accessors are in NumPy order: (K,J,I) where K is slowest, I is fastest

loc: itk_dreg.base.image_block_interface.BlockInfo¶

None

The location of the block relative to the parent image voxel array.

arr: dask.array.core.Array¶

None

The dask volume for lazy voxel access.

class itk_dreg.base.image_block_interface.BlockPairRegistrationResult(status: itk_dreg.base.image_block_interface.BlockRegStatus, transform: Optional[itk_dreg.base.itk_typing.TransformType] = None, transform_domain: Optional[itk_dreg.base.itk_typing.ImageType] = None, inv_transform: Optional[itk_dreg.base.itk_typing.TransformType] = None, inv_transform_domain: Optional[itk_dreg.base.itk_typing.ImageType] = None)¶

Encapsulate result of fixed-to-moving registration over one block pair.

Initialization

Parameters:
  • status – Status code indicating registration success or failure.

  • transform – The forward transform registration result, if any. The forward transform maps from fixed to moving space. The forward transform is the result of a single registration stage and may be added to a previous initial transform to map from fixed to moving space.

  • transform_domain – Oriented representation of the domain over which the forward transform is valid. transform_domain has no voxel data and serves as a metadata representation of an oriented bounding box in physical space. transform_domain must be available if and only if transform is available.

  • inv_transform – The inverse transform registration result, if any. The inverse transform maps from moving to fixed space. If inv_transform is available then transform must also be available.

  • inv_transform_domain – Oriented representation of the domain over which the inverse transform is valid. inv_transform_domain has no voxel data and serves as a metadata representation of an oriented bounding box in physical space. inv_transform_domain must be available if and only if inv_transform is available.

__repr__() str¶
class itk_dreg.base.image_block_interface.LocatedBlockResult¶

Encapsules pairwise registration result information with contextual information describing how the fixed subimage in registration relates to the greater fixed image.

result: itk_dreg.base.image_block_interface.BlockPairRegistrationResult¶

None

The result of pairwise subimage registration. May include extended information for specific implementations.

fixed_info: itk_dreg.base.image_block_interface.BlockInfo¶

None

Oriented representation of the fixed image block over which pairwise registration was performed to produce the encapsulated registration result information.

class itk_dreg.base.image_block_interface.RegistrationTransformResult¶

Encapsulate result of fixed-to-moving registration over all block pairs.

transform: itk_dreg.base.itk_typing.TransformType¶

None

The forward transform resulting from block postprocessing. The forward transform maps from moving to fixed space.

inv_transform: Optional[itk_dreg.base.itk_typing.TransformType]¶

None

The inverse transform registration result from block postprocessing, if any. The inverse transform maps from fixed to moving space. If inv_transform is available then transform must also be available.

class itk_dreg.base.image_block_interface.RegistrationResult¶

Encapsulate result of fixed-to-moving registration over all block pairs.

transforms: itk_dreg.base.image_block_interface.RegistrationTransformResult¶

None

The forward and inverse transforms resulting from registration.

status: numpy.typing.ArrayLike¶

None

status is an ND array where each element reflects the status code output for block pair registration over the corresponding input fixed chunk.

status has the same shape as the fixed input array of chunks. That is, if the fixed input array is subdivided into 2 chunks x 3 chunks x 4 chunks, status will be an array of voxels with shape [2,3,4].