Model Registration Developer Guide
Model registration aligns template meshes to patient surfaces and masks. The
supported high-level entry point is
monai_physio.WorkflowFitStatisticalModelToPatient.
Recommended Entry Point
import itk
import pyvista as pv
from monai_physio import WorkflowFitStatisticalModelToPatient
workflow = WorkflowFitStatisticalModelToPatient(
template_model=pv.read("template_heart.vtu"),
)
result = workflow.process(
patient_models=[pv.read("lv.vtp"), pv.read("rv.vtp")],
patient_image=itk.imread("patient_ct.nii.gz"),
)
Lower-Level Classes
The workflow composes these lower-level registration classes:
Use these directly only when developing or testing a specific registration stage. Their constructors and return dictionaries are documented in Model Registration Modules.
All four share monai_physio.RegisterModelsBase. The fixed model (and,
for distance maps, the reference grid) is given to the constructor; options
such as the transform type have set_* methods; register(moving_model)
runs the subclass’s registration_method hook and returns
registered_model, moving_to_fixed_transform and
fixed_to_moving_transform, also kept as attributes.
from monai_physio import RegisterModelsICP
registrar = RegisterModelsICP(fixed_model=patient_surface)
registrar.set_transform_type("Similarity")
result = registrar.register(template_surface)
RegisterModelsPCA deforms its own template, tied to its eigenvectors, so
its register() takes no moving model; its transforms come from
compute_pca_transforms.
Development Notes
Prefer PyVista mesh objects at the public Python boundary.
Convert volumetric meshes to surfaces before surface registration when needed.
Treat ITK/PyVista coordinate transforms as high-risk and add focused tests.
Keep synthetic test meshes small and deterministic.
RegisterModelsPCAreturnsmoving_to_fixed_transform/fixed_to_moving_transform. These are point transforms; see Transform Direction Conventions before applying them to images or meshes.