![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/CT/XRay2D3DRegistrationInitializationKeyPoints.h>
2D-3D registration initialization using keypoint correspondences. More...
2D-3D registration initialization using keypoint correspondences.
Enables manual keypoint selection on shots and volumes for initialization. Uses Levenberg-Marquardt optimization to minimize reprojection errors.
Public Member Functions | |
| XRay2D3DRegistrationInitializationKeyPoints (XRay2D3DRegistrationAlgorithm &alg) | |
| void | configure (const Properties *p) override |
| Configurable interface. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
| std::optional< InitializationResult > | initialize (ConeBeamGeometry &geom, SharedImageSet &shots, const SharedImageSet &volume, MaskEditor *maskAlg) override |
| XRay2D3DRegistrationInitialization interface. | |
| std::optional< InitializationResult > | initialize (SharedImageSet &shots, const SharedImageSet &volume, MaskEditor *maskAlg) override |
| bool | canInitialize () const override |
| Check if all required parameters are set and the initialization can be performed. | |
| void | unsetShotKeyPoint (int shotNum, const std::string &key) |
| Methods for setting/removing keypoints. | |
| void | setShotKeyPoint (int shotNum, const std::string &key, vec3 value) |
| const Parameter< vec3 > * | p_shotKeyPoint (int shotNum, const std::string &key) |
| const std::deque< std::unordered_map< std::string, std::unique_ptr< Parameter< vec3 > > > > & | shotKeyPoints () |
| The following is a deque instead of a vector so that it compiles on VisualStudio. | |
| Parameter< vec3 > & | p_volumeKeyPoint (const std::string &key) |
| Emulate the properties interface for volume key points. | |
| void | setVolumeKeyPoint (const std::string &key, vec3 value) |
| void | unsetVolumeKeyPoint (const std::string &key) |
| const std::unordered_map< std::string, std::unique_ptr< Parameter< vec3 > > > & | volumeKeyPoints () |
| std::optional< vec2 > | forwardProjection (const std::string &key, int frame) |
| Convenience function for calculating forward-projection of a volume keypoint onto image coordinates in frame. | |
| void | updateEpipolarLines (int shotIndex, std::string key) |
| Update all of the epipolar lines that are computed for each target point on each shot. | |
| void | unsetEpipolarLines (int shotIndex, std::string key) |
| const std::unordered_map< std::string, std::vector< std::vector< std::optional< Geometry::LineSegment > > > > & | epipolarLines () const |
| Public Member Functions inherited from ImFusion::CT::XRay2D3DRegistrationInitialization | |
| XRay2D3DRegistrationInitialization (XRay2D3DRegistrationAlgorithm ®Alg) | |
| virtual double | penalty (const ConeBeamGeometry &geom) |
| A multiplicative penalty function applied during optimization. | |
| XRay2D3DRegistrationAlgorithm * | regAlg () |
| Public Member Functions inherited from ImFusion::Configurable | |
| 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 | |
| std::deque< std::unordered_map< std::string, std::unique_ptr< Parameter< vec3 > > > > | m_shotKeyPoints |
| Internal storage of the Parameters for the key points. | |
| std::unordered_map< std::string, std::unique_ptr< Parameter< vec3 > > > | m_volumeKeyPoints |
| std::unordered_map< std::string, std::vector< std::vector< std::optional< Geometry::LineSegment > > > > | m_epipolarLines |
| Hashmap of target point keys and their mapped vectors of epipolar lines. | |
| Protected Attributes inherited from ImFusion::CT::XRay2D3DRegistrationInitialization | |
| 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. | |
|
overridevirtual |
Configurable interface.
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
XRay2D3DRegistrationInitialization interface.
Implements ImFusion::CT::XRay2D3DRegistrationInitialization.
|
overridevirtual |
Implements ImFusion::CT::XRay2D3DRegistrationInitialization.
|
overridevirtual |
Check if all required parameters are set and the initialization can be performed.
Implements ImFusion::CT::XRay2D3DRegistrationInitialization.
| void ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints::unsetShotKeyPoint | ( | int | shotNum, |
| const std::string & | key ) |
Methods for setting/removing keypoints.
Keypoints are indexed by a name
| key | in each case. |
Emulate properties interface for shot key points. The Parameter names in the properties are Shot{i}/keyPoint_{key_name} where i is the shot number and key_name is the name of the key.
| Parameter< vec3 > & ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints::p_volumeKeyPoint | ( | const std::string & | key | ) |
Emulate the properties interface for volume key points.
The Parameter names in the properties are Shot{i}/keyPoint_{key_name} where i is the shot number and key_name is the name of the key. These key points should be set in world coordinates.
| std::optional< vec2 > ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints::forwardProjection | ( | const std::string & | key, |
| int | frame ) |
Convenience function for calculating forward-projection of a volume keypoint onto image coordinates in frame.
| frame | Returns std::optional() if |
| key | is not present as volume key point. |
| void ImFusion::CT::XRay2D3DRegistrationInitializationKeyPoints::updateEpipolarLines | ( | int | shotIndex, |
| std::string | key ) |
Update all of the epipolar lines that are computed for each target point on each shot.
Epipolar lines are restricted with the image plane of X-ray shots.
|
protected |
Hashmap of target point keys and their mapped vectors of epipolar lines.
The order of indices for the target point "key": the shot with target point and the shot with annotation. e.g. m_epipolarLineAnnot["key"][0][1] means that the epipolar line is drawn on shot #1, the epipolar line is drawn from target point "key" which was set on the shot #0. Warning: The index order of XRay2D3DRegistrationInitializationKeyPoints::m_epipolarLines is not the same with XRay2D3DRegistrationInitializationKeyPointsController::m_epipolarLineAnnot.