RegistrationOperations
Provides global and landmark registration operations for aligning project objects. The RegistrationOperations class enables users to register and align multiple objects (volumes, masks, surfaces, volume meshes, markups, and primitives) to a fixed target. It supports both surface-based registration (using ICP, feature matching, or combined methods) and image-based registration (for volume-to-volume alignment). Key features include global registration of multiple objects to a fixed target, surface-based registration using point matching (ICP), feature matching, or combined algorithms, and image-based registration for volume-to-volume alignment with rigid (6DOF) or affine (12DOF) transformations. The class also supports landmark-based registration with optional global registration refinement, RMSE calculation for assessing registration quality, and outputs transformation matrices for further processing.
Import
import ScriptingApi as api
# Access via Application
app = api.Application()
ops = app.get_registration_operations()
Methods
Properties
global_registration
Performs global registration to align multiple objects to a fixed target. Registers movable objects (volumes, masks, surfaces, volume meshes, or primitives) to a fixed target object. The appropriate registration method (surface-based or image-based) is automatically selected based on the object types. Surface-based registration is used when both objects have surface geometry; image-based registration is used only for volume-to-volume alignment. Supported combinations: - Surface/Mask/VolumeMesh/Primitive to Surface/Mask/VolumeMesh/Primitive: Surface registration - Volume to Volume: Image registration
Signature:
global_registration(movableObjects: list, fixedObject: GlobalRegistrationObject, surfaceParams: SurfaceRegistrationParams = SurfaceRegistrationParams(), imageParams: ImageRegistrationParams = ImageRegistrationParams(), calculateRMSE: bool = False) -> GlobalRegistrationResult
Parameters:
| Parameter | Type | Description |
|---|---|---|
movableObjects | any | List of objects as api.GlobalRegistrationObject to transform. Each object is identified by name and type. |
fixedObject | any | The fixed target object that movable objects will be registered to. Create using api.GlobalRegistrationObject(). |
surfaceParams | any | Parameters for surface-based registration (used when applicable). Create using api.SurfaceRegistrationParams(). |
imageParams | any | Parameters for image-based registration (used for volume-to-volume). Create using api.ImageRegistrationParams(). |
calculateRMSE | any | If true, calculates the Root Mean Square Error after registration. |
Returns: GlobalRegistrationResult — The api.GlobalRegistrationResult containing success status, RMSE (if calculated), and transformation matrix.
landmark_registration
Performs landmark-based registration with optional global registration fine-tuning. Aligns objects using corresponding landmark points placed on the movable and fixed objects. Requires at least 3 matching landmark point pairs. Optionally performs global registration afterward to fine-tune the alignment.
Signature:
landmark_registration(movableObjects: list, fixedObject: GlobalRegistrationObject, movableLandmarks: list, fixedLandmarks: list, surfaceParams: SurfaceRegistrationParams = SurfaceRegistrationParams(), imageParams: ImageRegistrationParams = ImageRegistrationParams(), performGlobalRegistration: bool = False, calculateRMSE: bool = False) -> LandmarkRegistrationResult
Parameters:
| Parameter | Type | Description |
|---|---|---|
movableObjects | any | List of objects as api.GlobalRegistrationObject to transform. |
fixedObject | any | The fixed target object. Create using api.GlobalRegistrationObject(). |
movableLandmarks | any | List of landmark points on movable objects [x, y, z] in world coordinates. |
fixedLandmarks | any | List of corresponding landmark points on fixed object [x, y, z] in world coordinates. |
surfaceParams | any | Parameters for global registration fine-tuning (if enabled). Create using api.SurfaceRegistrationParams(). |
imageParams | any | Parameters for image-based global registration (if applicable). Create using api.ImageRegistrationParams(). |
performGlobalRegistration | any | If true, performs global registration after landmark alignment. |
calculateRMSE | any | If true, calculates RMSE values. |
Returns: LandmarkRegistrationResult — The api.LandmarkRegistrationResult containing success status, RMSE values, and transformation matrices.