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 the first movable object (a volume, mask, surface, volume mesh, or primitive) to a fixed target object and applies the resulting transformation to every movable 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:

ParameterTypeDescription
movableObjectslistList of objects as api.GlobalRegistrationObject to transform. Each object is identified by name and type. The first object is the one registered to the fixed object.
fixedObjectGlobalRegistrationObjectThe fixed target object that movable objects will be registered to. Create using api.GlobalRegistrationObject().
surfaceParamsSurfaceRegistrationParamsParameters for surface-based registration (used when applicable). Create using api.SurfaceRegistrationParams().
imageParamsImageRegistrationParamsParameters for image-based registration (used for volume-to-volume). Create using api.ImageRegistrationParams().
calculateRMSEboolIf 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. The rigid transformation that maps the movable landmarks onto the fixed landmarks is applied to every movable object. Optionally performs global registration of the first movable object to the fixed object 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:

ParameterTypeDescription
movableObjectslistList of objects as api.GlobalRegistrationObject to transform. The first object is the one fine-tuned against the fixed object.
fixedObjectGlobalRegistrationObjectThe fixed target object. Create using api.GlobalRegistrationObject().
movableLandmarkslistList of landmark points on movable objects [x, y, z] in world coordinates.
fixedLandmarkslistList of corresponding landmark points on fixed object [x, y, z] in world coordinates, in the same order.
surfaceParamsSurfaceRegistrationParamsParameters for global registration fine-tuning (if enabled). Create using api.SurfaceRegistrationParams().
imageParamsImageRegistrationParamsParameters for image-based global registration (if applicable). Create using api.ImageRegistrationParams().
performGlobalRegistrationboolIf true, performs global registration after landmark alignment.
calculateRMSEboolIf true, calculates RMSE values.

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


See Also​