ImFusion C++ SDK 4.5.0
ImFusion::CT::Eos2D3DRegistrationAlgorithm Class Reference

#include <ImFusion/CT/Eos2D3DRegistrationAlgorithm.h>

2D-3D registration algorithm for the EOS imaging system. More...

Inheritance diagram for ImFusion::CT::Eos2D3DRegistrationAlgorithm:

Detailed Description

2D-3D registration algorithm for the EOS imaging system.

Specialized version of XRay2D3DRegistrationAlgorithm for EOS biplanar imaging.

See also
https://www.eos-imaging.us/us/professionals/eos/eos

Public Member Functions

 Eos2D3DRegistrationAlgorithm (const SharedImageSet &shots, SharedImageSet &volumes)
 Constructor.
Public Member Functions inherited from ImFusion::CT::XRay2D3DRegistrationAlgorithm
 XRay2D3DRegistrationAlgorithm (SharedImageSet &shotsWithGeom, SharedImageSet &volumes)
 Constructor, compounds volumes if there are several.
 XRay2D3DRegistrationAlgorithm (std::unique_ptr< SharedImageSet > shotsWithGeom, SharedImageSet &volumes)
 This constructor takes ownership of shotsWithGeom.
 ~XRay2D3DRegistrationAlgorithm () override
 Destructor.
virtual bool initialize ()
 Calls algorithm to use for initialization.
virtual bool canInitialize ()
 Returns true if there is sufficient data to call initialize().
bool hasInitialized ()
const std::optional< ConeBeamGeometry > & lastInitializationResult ()
 Return the ConeBeamGeometry obtained after the last successful (i.e.
GeometryGeneratorlastGeomGenerator () const
 Return last geometry generator to restore the geometry in the manual initiation mode.
void compute () override
 Execute the algorithm.
OwningDataList takeOutput () override
 Returns a ConeBeamData object representing the owned shots; the pose of the volume is modified in place.
bool survivesDataDeletion (const Data *data) const override
 Indicates whether the algorithm can handle (partial) deletion of the specified data, by default this checks whether the data is in the input list.
void configure (const Properties *p) override
 Properties interface.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
void finalizeRegistration ()
 Finalizes Registration and moves matrix from m_shotsWithGeom to m_volumes and add a TransformationStash entry.
SharedImageSetshotsWithGeom ()
 Getter for m_shotsWithGeom.
const SharedImageSetshotsWithGeom () const
ConeBeamGeometryshotsWithGeomGeom ()
 Getter for the geometry of m_shotsWithGeom.
const ConeBeamGeometryshotsWithGeomGeom () const
SharedImageSetownedShotsWithGeom (int i=0)
 Getter for projections owned by this algorithm.
SharedImageSetownedVolumes ()
 Getter for m_ownedVolumes, i.e. the compounded input volumes in case multiple volumes where provided.
SharedImageSetvolumes ()
 Getter for m_volumes, i.e. either m_ownedVolumes.get() or the volume passed via the constructor if it was a single volume.
const SharedImageSetvolumes () const
ConeBeamGeometryAlgorithm * coneBeamGeomAlg ()
 Getter for a ConeBeamGeometryAlgorithm used internally.
Gl2D3DRegistrationnestedRegAlg (int i=0)
 Getter for a Gl2D3DRegistration used internally.
MaskEditormaskAlg ()
 Getter for a MaskEditor used internally.
int numShots () const
 Getter and setter methods, see the member variables for further documentation.
SharedImageSetvolumesIn ()
const SharedImageSetvolumesIn () const
vec3 rotationCenter ()
 Convenience methode to get rotation center, this is derived from the ConeBeamGeometry of resolution level 0.
void setRotationCenter (vec3 rotationCenter)
 Convenience methode to set rotation center, this is derived from the ConeBeamGeometry.
XRay2D3DRegistrationInitializationPointDirectioninitPointDirection ()
XRay2D3DRegistrationInitializationKeyPointsinitKeyPoints ()
XRay2D3DRegistrationInitializationcustomInitialization ()
void setCustomInitialization (std::unique_ptr< XRay2D3DRegistrationInitialization > &&customInit)
void updateMasks (std::optional< int > index={})
 This function updates masks of lower-resolution representations.
void saveOptimizationResult ()
 Propagates the ConeBeamGeometry from the current resolution level to other resolution levels.
std::deque< XRay2D3DRegistrationHistoryEntry > & history ()
int saveCurrentConfigurationToHistory (ComputationPhase computationPhase, const std::string &comment="")
 Save the current configuration to the history.
XRay2D3DRegistrationHistoryEntry currentConfigurationToHistoryEntry (ComputationPhase computationPhase, const std::string &comment="") const
bool loadHistory (int index)
 Revert geometry to specific history entry given by id (with petmitClearMasks=true).
bool loadHistory (const XRay2D3DRegistrationHistoryEntry &entry, bool permitClearMasks)
Public Member Functions inherited from ImFusion::Algorithm
 Algorithm ()
 Default constructor will registers a single "compute" action that calls compute() and returns status().
virtual void setProgress (Progress *progress)
 Sets a Progress interface the algorithm can use to notify observers about its computing progress.
Progressprogress () const
 Returns the progress interface if set.
virtual int status () const
 Indicates the status of the last call to compute().
const FactoryInfofactoryInfo () const
 Returns the record describing how this Algorithm was instantiated by the AlgorithmFactory.
void setFactoryInfo (const FactoryInfo &value)
 Sets the record describing how this Algorithm was instantiated by the AlgorithmFactory.
Status runAction (const std::string &id)
 Run the action with name id if it exists.
const std::vector< Action > & actions ()
 Get a mapping from Action id to Action as registered in this algorithm.
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
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Static Public Member Functions

static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 Check compatibility and optionally create algorithm instance.
Static Public Member Functions inherited from ImFusion::CT::XRay2D3DRegistrationAlgorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 If data is compatible with algorithm return true. If a is not zero, create algorithm with input data.
Static Public Member Functions inherited from ImFusion::Algorithm
static bool createCompatible (const DataList &data, Algorithm **a=nullptr)
 Factory function to check algorithm compatibility with input data and optionally instantiate it.

Additional Inherited Members

Public Types inherited from ImFusion::CT::XRay2D3DRegistrationAlgorithm
enum class  InitializationMode {
  Noop = 0 , PointDirection = 1 , KeyPoints = 2 , Custom = 3 ,
  Last = Custom
}
using ComputationPhase = XRay2D3DRegistrationHistoryEntry::ComputationPhase
Public Types inherited from ImFusion::Algorithm
enum  Status {
  Unknown = -1 , Success = 0 , Error = 1 , InvalidInput ,
  IncompleteInput , OutOfMemoryHost , OutOfMemoryGPU , UnsupportedGPU ,
  UnknownAction , AbortedByUser , User = 1000
}
 Status codes. More...
Public Attributes inherited from ImFusion::CT::XRay2D3DRegistrationAlgorithm
Parameter< std::stringp_anatomyName = {"anatomyName", "", this}
 Name used for storing the registration matrices in the TransformationStashDataComponent of m_volumes (the prefix "eos2d3d_" will be added).
Parameter< int > p_numResolutionLevels = {"numResolutionLevels", 3, this}
 Support for multiple resolution levels.
Parameter< int > p_currentResolutionLevel = {"currentResolutionLevel", 1, this}
 Current resolution level e.g. shown in the controller.
Parameter< InitializationModep_initializationMode = {"initializationMode", InitializationMode::Noop, this}
 Options related to initialization.
Parameter< bool > p_initialized = {"initialized", false, this}
 Whether or not we have initialized the registration yet.
SubProperty< std::unique_ptr< GeometryAlgorithm > > p_geomAlg = {"geomAlg", nullptr, this}
 Nested geometry algorithm.
Signal signalGeometryChanged
 After making a change that affects the Cone-Beam-Geometry, emit this signal.
Signal< int > signalResolutionLevelChanged
 This signal is emitted by this algorithm whenever the resolution level has changed or the image pyramid is recomputed.
Signal signalMasksChanged
 This signal is emitted whenever the masks are changed.
Signal signalHistoryChanged
 This signal is emitted by this algorithm whenever the history is changed.
Public Attributes inherited from ImFusion::Algorithm
Signal signalOutputChanged
 Signal should be emitted by Algorithms when their output/result has changed.
Signal signalParametersChanged
 Signal should be emitted by Algorithms when their parameter configuration has changed.
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Member Functions inherited from ImFusion::Algorithm
void loadDefaults ()
void registerAction (const std::string &id, const std::string &guiName, const std::function< Algorithm::Status(void)> &action)
 Register an action to be run via runAction.
template<typename D>
void registerAction (const std::string &id, const std::string &guiName, Algorithm::Status(D::*action)(void))
 Template version of runAction that can be used with a pointer to a member function.
void registerAction (const Action &action)
 Register an action.
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
Protected Attributes inherited from ImFusion::CT::XRay2D3DRegistrationAlgorithm
Parameter< int > p_currentHistoryEntry = {"currentHistoryEntry", 0, this}
 Current history entry. Warning: including this in configure/configuration will cause the history to reset to that history entry.
int m_numShots
 How many shots we have, for most cases this is 2.
std::vector< std::unique_ptr< XRay2D3DRegistrationInitialization > > m_initializationAlgs
SharedImageSetm_volumesIn
 Input volumes.
SharedImageSetm_volumes
 Input volumes, compounded if neccessary.
mat4 m_relativePose = mat4::Identity()
 If we compound, this is the relative pose between m_volumesIn[0] and m_volumes, i.e.
std::unique_ptr< SharedImageSetm_ownedVolumes
 Contains compounded volumes if we need to create them.
std::unique_ptr< ConeBeamGeometryAlgorithm > m_coneBeamGeomAlg
 Nested ConeBeamGeometryAlgorithm.
std::unique_ptr< MaskEditorm_maskAlg
 Nested MaskEditor algorithm to set a mask (usually a CroppingMask) to the 2D shots.
std::vector< std::unique_ptr< ImagePyramid > > m_projectionsImagePyramid
 This holds the ImagePyramid instances used for computing representations of shots at lower resolution levels.
std::vector< std::unique_ptr< ImagePyramid > > m_weightsImagePyramid
 This holds the ImagePyramid instances used for computing representations of weights at lower resolution levels.
std::vector< std::unique_ptr< Gl2D3DRegistration > > m_nestedRegAlgs
 Nested 2D3D registration instances.
std::vector< std::unique_ptr< SharedImageSet > > m_ownedShotsWithGeom
 Owned projections.
SharedImageSetm_shotsWithGeom = nullptr
 Input shots.
std::optional< ConeBeamGeometrym_lastInitializationResult
Protected Attributes inherited from ImFusion::Algorithm
std::string m_name
 Algorithm name.
Progressm_progress = nullptr
 Non-owing pointer to a progress interface. May be a nullptr.
FactoryInfo m_factoryInfo = {}
 Record describing how this algorithm was instantiated by the AlgorithmFactory.
int m_status = Status::Unknown
 Algorithm status after last call to compute().
std::vector< Actionm_actions
 Map of key given by the id of the action, of the available actions of this algorithm.
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Constructor & Destructor Documentation

◆ Eos2D3DRegistrationAlgorithm()

ImFusion::CT::Eos2D3DRegistrationAlgorithm::Eos2D3DRegistrationAlgorithm ( const SharedImageSet & shots,
SharedImageSet & volumes )

Constructor.

Parameters
shotsEOS X-ray projection images
volumesVolume data for registration

Member Function Documentation

◆ createCompatible()

bool ImFusion::CT::Eos2D3DRegistrationAlgorithm::createCompatible ( const DataList & data,
Algorithm ** a = nullptr )
static

Check compatibility and optionally create algorithm instance.

Parameters
dataInput data list
aOptional output algorithm pointer
Returns
True if data is compatible

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