ImFusion C++ SDK 4.5.0
ImFusion::CT::XRay2D3DRegistrationInitialization Class Referenceabstract

#include <ImFusion/CT/XRay2D3DRegistrationInitialization.h>

Abstract interface for custom 2D-3D registration initialization methods. More...

Inheritance diagram for ImFusion::CT::XRay2D3DRegistrationInitialization:

Detailed Description

Abstract interface for custom 2D-3D registration initialization methods.

Implement this interface to create custom initialization strategies for XRay2D3DRegistrationAlgorithm. Parameters (target points, etc.) are passed via configurable interface in world coordinates.

Configurable interface: The sub-properties "Volume", "Shot0","Shot1",...,"Shotn" are copied from the configuration of XRay2D3DRegistrationAlgorithm as the latter uses them to configure masks. Configuration is shared between initialization algorithms, so you should not use the parameters "targetPoints" and "secondDirectionPoints" as these are used by the point-direction initialization. Also, do not use parameters that start with the string "keyPoint" as this is used by the keypoint initialization.

Classes

struct  InitializationResult

Public Member Functions

 XRay2D3DRegistrationInitialization (XRay2D3DRegistrationAlgorithm &regAlg)
virtual std::optional< InitializationResultinitialize (ConeBeamGeometry &geom, SharedImageSet &shots, const SharedImageSet &volume, MaskEditor *maskAlgorithm)=0
 Initialize the registration.
virtual std::optional< InitializationResultinitialize (SharedImageSet &shots, const SharedImageSet &volume, MaskEditor *maskAlgorithm)=0
virtual bool canInitialize () const =0
 Check if all required parameters are set and the initialization can be performed.
virtual double penalty (const ConeBeamGeometry &geom)
 A multiplicative penalty function applied during optimization.
XRay2D3DRegistrationAlgorithmregAlg ()
Public Member Functions inherited from ImFusion::Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 Configurable (const Configurable &rhs)
 Configurable (Configurable &&rhs) noexcept
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Protected Attributes

XRay2D3DRegistrationAlgorithmm_regAlg
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Member Function Documentation

◆ initialize()

virtual std::optional< InitializationResult > ImFusion::CT::XRay2D3DRegistrationInitialization::initialize ( ConeBeamGeometry & geom,
SharedImageSet & shots,
const SharedImageSet & volume,
MaskEditor * maskAlgorithm )
pure virtual

Initialize the registration.

You can use this to set the initial pose of the volume being registered (to the CBCT images) from which the optimization then proceeds. Return std::optional<InitializationResult>() on failure. Return wrapped InitializationResult object on success. Here the member relativeTransformation is transformation matrix from the output pose of the volume being registered to the current pose of volume. Member rotationCenter sets center used for rotations in consequent optimization. i.e. if T is this transformation matrix, then volume.setMatrixFromWorld(volumes.matrixFromWorld() * T.matrix();) gives the new pose. Here volume is a (potentially) compounded, (potentially) rotated + translated version of the input volume, Note: volume can differ from the volume passed to the XRay2D3DRegistrationAlgorithm (but is identical to m_alg->volumes()).

Parameters
shotsis not const to allow for changing the focus, it should otherwise not be modified. The initialization algorithm may also set masks (e.g. based on information available to it) when these are not set, it should do so using maskAlgorithm.
Deprecated
"Directly pass in the legacy ConeBeamGeometry is deprecated."

Implemented in ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints, and ImFusion::CT::XRay2D3DRegistrationInitializationPointDirection.

◆ canInitialize()

virtual bool ImFusion::CT::XRay2D3DRegistrationInitialization::canInitialize ( ) const
pure virtual

Check if all required parameters are set and the initialization can be performed.

Implemented in ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints, and ImFusion::CT::XRay2D3DRegistrationInitializationPointDirection.

◆ penalty()

virtual double ImFusion::CT::XRay2D3DRegistrationInitialization::penalty ( const ConeBeamGeometry & geom)
inlinevirtual

A multiplicative penalty function applied during optimization.

The prototypical use-case for this is the case where the initialization has some information about the pose, which should be used to constrain the optimization in the registration.


The documentation for this class was generated from the following file:
  • ImFusion/CT/XRay2D3DRegistrationInitialization.h
Search Tab / S to search, Esc to close