OrsChannelRegistration

Manages registering a dataset against others

author:

Dragonfly Team

contact:

https://dragonfly.comet.tech

email:

support.dragonfly@comet.tech

organization:

Comet Technologies Canada Inc.

address:

460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7

copyright:

Comet Technologies Canada Inc. All rights reserved 2023.

date:

Feb 04 2016 17:25

dragonflyVersion:

3.0

UUID:

f7187e82760f11e7b3a1448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsChannelRegistration.OrsChannelRegistration.OrsChannelRegistration(*args, **kwargs)
cleanup()

Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.

classmethod getMainFormClass()

Gets the class of the main form

Returns:

output

classmethod getROIFromVisualShape(maskVisualShape, fixedChannel)

Note a temp ROI object is create, don’t forget to delete it !

classmethod importAllLoggingClasses()

This method is called to make any class extension available for macro playing. It should:

  1. import all class extension;

  2. return a list of classes where logging is supported.

Returns:

output (list of classes) – list of classes where logging is supported by the current plugin

openWidget(name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1, show=True)

Instantiates the widget with the provided name. This is done only if it is not already instantiated.

Parameters:
  • name (str) – name of the widget to instantiate

  • dock (str) – docking location in the main window (left, right, top, bottom, center, floating)

  • tab (str) – name of the tab to dock in

  • x (int) – position of top left corner of window in x. Use -1 for default value.

  • y (int) – position of top left corner of window in y. Use -1 for default value.

  • w (int) – width of window. Use -1 for default value.

  • l (int) – height of window. Use -1 for default value.

  • order (int.) – position of widget in docking location. Use -1 to put at the end.

  • show (bool) – if True, the form is also shown after being instantiated. If the form already exists, a “raise” is done. If False, no call to show the form is made.

interfacemethod register(fixedChannel: Channel, mobileChannel: Channel, useScale: bool, useRotation: bool, useTranslation: bool, xScaleInitial: float, yScaleInitial: float, zScaleInitial: float, xRotationInitial: float, yRotationInitial: float, zRotationInitial: float, xTranslationInitial: float, yTranslationInitial: float, zTranslationInitial: float, xScaleSmallest: float, yScaleSmallest: float, zScaleSmallest: float, xRotationSmallest: float, yRotationSmallest: float, zRotationSmallest: float, xTranslationSmallest: float, yTranslationSmallest: float, zTranslationSmallest: float, nearestInterpolationMethod: bool, mutualInfoRegistrationMethod: bool, xSampling: int, ySampling: int, zSampling: int, mask: Union[ROI, VisualShape3D] = None, useMultiScale: bool = True) Tuple[Matrix4x4, float]

Register a mobile dataset with a fixed dataset.

Deprecated since version 2023.1.

Parameters:
  • fixedChannel (ORSModel.ors.Channel) – reference dataset (fixed in space).

  • mobileChannel (ORSModel.ors.Channel) – mobile dataset.

  • useScale (bool) – if True, the scale factor will be used.

  • useRotation (bool) – if True, the rotation factor will be used.

  • useTranslation (bool) – if True, the translation factor will be used.

  • xScaleInitial (float) – initial value for the scale factor in the X direction

  • yScaleInitial (float) – initial value for the scale factor in the Y direction

  • zScaleInitial (float) – initial value for the scale factor in the Z direction

  • xRotationInitial (float) – initial value for the rotation factor in the X direction

  • yRotationInitial (float) – initial value for the rotation factor in the Y direction

  • zRotationInitial (float) – initial value for the rotation factor in the Z direction

  • xTranslationInitial (float) – initial value for the translation factor in the X direction

  • yTranslationInitial (float) – initial value for the translation factor in the Y direction

  • zTranslationInitial (float) – initial value for the translation factor in the Z direction

  • xScaleSmallest (float) – final value for the scale factor in the X direction

  • yScaleSmallest (float) – final value for the scale factor in the Y direction

  • zScaleSmallest (float) – final value for the scale factor in the Z direction

  • xRotationSmallest (float) – final value for the rotation factor in the X direction

  • yRotationSmallest (float) – final value for the rotation factor in the Y direction

  • zRotationSmallest (float) – final value for the rotation factor in the Z direction

  • xTranslationSmallest (float) – final value for the translation factor in the X direction

  • yTranslationSmallest (float) – final value for the translation factor in the Y direction

  • zTranslationSmallest (float) – final value for the translation factor in the Z direction

  • nearestInterpolationMethod (bool) – if True, the nearest interpolation method will be used; if False, the linear interpolation will be used.

  • mutualInfoRegistrationMethod (bool) – if True, the mutual information registration algorithm will be used; if False, the SSD registration algorithm will be used.

  • xSampling (int) – sampling in the X direction for the similarity metric

  • ySampling (int) – sampling in the Y direction for the similarity metric

  • zSampling (int) – sampling in the Z direction for the similarity metric

  • mask (ORSModel.ors.ROI, ORSModel.ors.VisualShape3D) – Visual Shape 3D or ROI that mask pixels of fixed dataset to make a scored registration.

  • useMultiScale (bool) – Use a multiscale step in the registration

Returns:
  • transformationMatrix (ORSModel.ors.Matrix4x4) – transformation matrix to go from the original location of the mobile dataset to the final location of the mobile dataset

  • metricSimilarity (float) – value of the similarity obtained by the registration