Skip to main content

RegistrationOperations

Operations

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, imageParams: ImageRegistrationParams, calculateRMSE: bool = False) -> GlobalRegistrationResult

Parameters:

ParameterTypeDescription
movableObjectsanyList of objects (api.GlobalRegistrationObject()) to transform. Each object is identified by name and type.
fixedObjectanyThe fixed target object that movable objects will be registered to. Use api.GlobalRegistrationObject().
surfaceParamsanyParameters for surface-based registration (used when applicable). Use api.SurfaceRegistrationParams().
imageParamsanyParameters for image-based registration (used for volume-to-volume). Use api.ImageRegistrationParams().
calculateRMSEanyIf true, calculates the Root Mean Square Error after registration.

Returns: GlobalRegistrationResult — 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, imageParams: ImageRegistrationParams, performGlobalRegistration: bool = False, calculateRMSE: bool = False) -> LandmarkRegistrationResult

Parameters:

ParameterTypeDescription
movableObjectsanyList of objects (api.GlobalRegistrationObject()) to transform.
fixedObjectanyThe fixed target object. Use api.GlobalRegistrationObject().
movableLandmarksanyList of landmark points on movable objects [x, y, z] in world coordinates.
fixedLandmarksanyList of corresponding landmark points on fixed object [x, y, z] in world coordinates.
performGlobalRegistrationanyIf true, performs global registration after landmark alignment.
surfaceParamsanyParameters for global registration fine-tuning (if enabled). Use api.SurfaceRegistrationParams().
imageParamsanyParameters for image-based global registration (if applicable). Use api.ImageRegistrationParams().
calculateRMSEanyIf true, calculates RMSE values.

Returns: LandmarkRegistrationResult — LandmarkRegistrationResult containing success status, RMSE values, and transformation matrices.


See Also