Model Registration Base

The contract every model registration class shares: the fixed model is given to __init__, optional settings have set_* methods, and register(moving_model) calls the subclass’s registration_method hook and returns registered_model, moving_to_fixed_transform and fixed_to_moving_transform. RegisterModelsPCA is the one exception: the model it deforms is its template, so its register() takes no moving model.

Class Reference

class monai_physio.RegisterModelsBase(fixed_model, log_level=20)[source]

Bases: MONAIPhysioBase

Base class for registering a moving model to a fixed model.

Subclasses implement registration_method(), which returns at least registered_model, moving_to_fixed_transform and fixed_to_moving_transform. register() stores those on the instance and returns them, with any further keys the hook adds.

fixed_model

Target model.

Type:

Optional[pv.DataSet]

moving_model

Model of the latest registration.

Type:

Optional[pv.DataSet]

registered_model

The moving model aligned to the fixed model.

Type:

Optional[pv.DataSet]

moving_to_fixed_transform

Result transform from the moving to the fixed side.

Type:

Optional[itk.Transform]

fixed_to_moving_transform

Result transform from the fixed to the moving side.

Type:

Optional[itk.Transform]

transform_tools

Transform utilities.

Type:

ProcessTransforms

__init__(fixed_model, log_level=20)[source]

Initialize the shared registration state.

Parameters:
  • fixed_model (Optional[DataSet]) – Target model the moving model is registered to.

  • log_level (int | str) – Logging level. Default: logging.INFO

set_fixed_model(fixed_model)[source]

Replace the target model and forget the previous results.

Parameters:

fixed_model (DataSet) – New target model.

Return type:

None

registration_method(moving_model)[source]

Register moving_model to the fixed model; implemented by subclasses.

Parameters:

moving_model (DataSet) – Model to align to the fixed model.

Return type:

dict[str, Any]

Returns:

Dictionary with at least registered_model, moving_to_fixed_transform and fixed_to_moving_transform.

Raises:

NotImplementedError – Always, in the base class.

register(moving_model)[source]

Register moving_model to the fixed model.

Calls registration_method() and keeps its standard results on the instance.

Parameters:

moving_model (DataSet) – Model to align to the fixed model.

Returns:

registered_model, moving_to_fixed_transform, fixed_to_moving_transform and any keys the subclass adds.

Return type:

The hook’s dictionary

Navigation

Model Registration Modules | ICP (Iterative Closest Point) | Distance Map Registration