Package: itk-dreg
itk-dregA framework for distributed, large-scale image registration.OverviewThe ITK Distributed Registration module (itk-dreg) provides a framework based on the
Insight Toolkit (ITK) and thedask.distributedlibrary for the purpose of registering
large-scale images out of memory.Traditional image registration techniques in ITK and other libraries (Elastix, ANTs) require
in-memory processing, meaning those techniques load images fully in memory (RAM) during
registration execution. Meanwhile, large image datasets can occupy terabytes of data for a single
image on the cloud and far exceed available memory.itk-dregaddresses this issue as a
map-reduce problem where images are successivly subdivided into subimages, registered,
and then composed into a descriptive output. Multipleitk-dregregistration graphs may be
executed in succession to yield a pipeline for multiresolution image registration.itk-dregprovides three major components:Concepts to describe the map-reduce registration problem;A user-ready registration method to produceitk.DisplacementFieldTransforms from out-of-memory
registration with Dask scheduling and ITKElastix registration;A developer framework to extenditk-dregwith novel registration and reduction methods.Getting StartedTo useitk-dreg, clone the Git repository and install withflit.>python-mpipinstallflit>gitclonehttps://www.github.com/InsightSoftwareConsortium/itk-dreg.git>cditk-dreg/srcitk-dreg/src>python-mflitinstallSeveral Jupyter Notebook examples are available for getting started. To run locally:itk-dreg/src>python-mflitinstall--extrasitk-dreg/src>cd../examplesitk-dreg/examples>jupyternotebookUse Instructionsitk_dregprovides a framework to register a moving image onto a fixed image.
The output of a single run is anitk.Transformobject that can be used
to resample the moving image onto the fixed image. Multiple runs can be chained
to successively refine registration over multiple image resolutions and over
various registration and reduction methods.Useitk_dreg.register.register_imagesto assemble and run a task graph for distributed registration.my_initial_transform=...# registration method returns an update to the initial transformmy_registration_schedule=itk_dreg.register_images(fixed_chunk_size=(x,y,z),initial_transform=my_initial_transform,fixed_reader_ctor=my_construct_streaming_reader_method,moving_reader_ctor=my_construct_streaming_reader_method,block_registration_method=my_block_pair_registration_method_subclass,reduce_method=my_postprocess_registration_method_subclass,overlap_factors=[0.1,0.1,0.1])my_result=my_registration_schedule.registration_result.compute()final_transform=itk.CompositeTransform()final_transform.append_transform(my_initial_transform)final_transform.append_transform(my_result.transforms.transform)# we can use the result transform to resample the moving image to fixed image spaceinterpolator=itk.LinearInterpolateImageFunction.New(my_moving_image)my_warped_image=itk.resample_image_filter(my_moving_image,transform=final_transform,interpolator=interpolator,use_reference_image=True,reference_image=my_fixed_image)ComponentsCore Componentsitk_dregprovides the following core components:itk_dreg.registerdefines scheduling infrastructure and the main entry point into theitk_dregregistration framework.itk_dreg.basedefines common types and virtual interfaces for theitk_dregregistration framework.
Virtual interfaces initk_dreg.base.registration_interfaceserve as an entry point for
contributors to write their own registration and reduction methods.itk_dreg.blockdefines common methods to map between voxel and spatial subdomains.These components must be installed to use theitk_dregregistration framework.Extended Componentsitk_dregincludes a few common implementations to get started with image registration.
These components act as extensions and are not necessarily required for runningitk_dreg.itk_dreg.itkprovides ITK-based methods to aid in image streaming and dask chunk scheduling.itk_dreg.elastixadapts the ITKElastix registration routines for distributed
registration initk_dreg.itk_dreg.reduce_dfieldimplements a transform-reduction method to estimate a singleitk.DeformationFieldTransformfrom block registration results initk_dreg.itk_dreg.mockprovides mock implementations of common framework components for use in
testing and debugging.Alternate registration and transform reduction modules may be available in the future
either as part ofitk_dregor via community distributions.ContributingRefer toContributing documentationfor getting started withitk-dregdevelopment.
Please direct feature requests or bug reports to theitk-dregGitHub Issuesboard.Licenseitk-dregis distributed under theApache-2.0permissive license.Questions and Queriesitk-dregis part of the Insight Toolkit tools ecosystem for medical image processing. We encourage developers to
reach out to the ITK community with questions on theITK Discourse forums. Those
interested in custom or commercial development should reach out toKitwareto learn more.Acknowledgementsitk-dregwas developed in part by with support from:NIH NIMH BRAIN Initiativeunder award 1RF1MH126732.