itk_dreg.elastix.util¶
Module Contents¶
Functions¶
Compute the initial overlap transform as the translation to sample from the center of the target image to the center of the source image. |
|
Convert Elastix registration results to an ITK composite transform stack of known, corresponding types. |
|
Return a series of transform parameter results from Elastix registration. |
|
Recursively flatten an |
|
Internal implementation detail for flattening composite transforms. |
Data¶
API¶
- itk_dreg.elastix.util.logger¶
‘getLogger(…)’
- itk_dreg.elastix.util.ParameterObjectType¶
None
- itk_dreg.elastix.util.ParameterMapType¶
None
- itk_dreg.elastix.util.SerializableParameterMapType¶
None
- itk_dreg.elastix.util.SerializableParameterObjectType¶
None
- itk_dreg.elastix.util.compute_initial_translation(source_image: itk.Image, target_image: itk.Image) itk.TranslationTransform[itk.D, 3]¶
Compute the initial overlap transform as the translation to sample from the center of the target image to the center of the source image.
Assumes content is centered in source and target images.
- Parameters:
source_image – The image serving as the starting point for translation. I.e., the “fixed” image to register.
target_image – The image serving as the endpoint for translation. I.e., the “moving” image to register.
- itk_dreg.elastix.util.get_elx_itk_transforms(registration_method: itk.ElastixRegistrationMethod, itk_transform_types: List[itk.Transform]) itk.CompositeTransform¶
Convert Elastix registration results to an ITK composite transform stack of known, corresponding types.
- Parameters:
registration_method – The Elastix registration method previously used for registration computation.
itk_transform_types – Ordered list of
itk.Transformtypes corresponding to Elastix transform parameter object outputs.Noneindicates that the given Nth transform should be ignored, such as in the case where an advanced initial transform is provided to Elastix.
- Returns:
An
itk.CompositeTransformrepresenting Elastix results mapping from fixed image to moving image space.
- itk_dreg.elastix.util.get_elx_parameter_maps(registration_method: itk.ElastixRegistrationMethod) List[itk.ParameterObject]¶
Return a series of transform parameter results from Elastix registration.
- Parameters:
registration_method – The Elastix registration method previously used to compute registration.
- Returns:
A list of Elastix transform parameter objects from Elastix registration.
- itk_dreg.elastix.util.flatten_composite_transform(transform: itk.Transform) itk.CompositeTransform[itk.D, 3]¶
Recursively flatten an
itk.CompositeTransformthat may containitk.CompositeTransformmembers so that the output represents a single layer of non-composite transforms.- Parameters:
transform – A transform to flatten. If the transform is not an
itk.CompositeTransformthen the result will be a simple one-levelitk.CompositeTransformwrapping the input transform.- Returns:
An
itk.CompositeTransformrepresentation of the input that is guaranteed to not contain anyitk.CompositeTransformmembers.