![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/CT/XRay2D3DRegistrationInitialization.h>
Abstract interface for custom 2D-3D registration initialization methods. More...
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 ®Alg) | |
| virtual std::optional< InitializationResult > | initialize (ConeBeamGeometry &geom, SharedImageSet &shots, const SharedImageSet &volume, MaskEditor *maskAlgorithm)=0 |
| Initialize the registration. | |
| virtual std::optional< InitializationResult > | initialize (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. | |
| XRay2D3DRegistrationAlgorithm * | regAlg () |
| 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 | |
| XRay2D3DRegistrationAlgorithm * | m_regAlg |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_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. | |
|
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()).
| shots | is 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. |
Implemented in ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints, and ImFusion::CT::XRay2D3DRegistrationInitializationPointDirection.
|
pure virtual |
Check if all required parameters are set and the initialization can be performed.
Implemented in ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints, and ImFusion::CT::XRay2D3DRegistrationInitializationPointDirection.
|
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.