ImFusion C++ SDK 4.5.0
ImFusion::OpticalTrackingMarker Class Reference

#include <ImFusion/Navigation/OpticalTrackingMarker.h>

Represents a marker for optical tracking cameras. More...

Inheritance diagram for ImFusion::OpticalTrackingMarker:

Detailed Description

Represents a marker for optical tracking cameras.

This class stores the geometry of tracking markers used in optical tracking systems. Each marker consists of multiple fiducials (reflective spheres or active LEDs) whose 3D positions are defined relative to the marker's local coordinate system. These markers are typically attached to surgical tools or reference frames.

Example usage:

OpticalTrackingMarker marker{"Pointer", 123};
marker.addFiducialPosition(vec3(0, 0, 0));
marker.addFiducialPosition(vec3(40, 0, 0));
marker.addFiducialPosition(vec3(0, 60, 0));

Public Member Functions

 OpticalTrackingMarker (std::string name, std::optional< uint32_t > markerId={})
bool operator== (const OpticalTrackingMarker &other) const
bool operator!= (const OpticalTrackingMarker &other) const
void setName (const std::string &name)
 Sets the name for the marker.
const std::stringname () const
 Returns the marker name.
void setMarkerId (std::optional< uint32_t > markerId)
 Sets the optional marker ID to uniquely identify the marker.
std::optional< uint32_t > markerId () const
 Returns the marker ID if available, std::nullopt otherwise.
void setFiducialPositions (const std::vector< vec3 > &positions)
 Sets the fiducial positions in marker local coordinates (in millimeters).
const std::vector< vec3 > & fiducialPositions () const
 Returns the fiducial positions.
bool setFiducialNormals (const std::vector< vec3 > &normals)
 Sets the fiducial normals in marker local coordinates.
const std::vector< vec3 > & fiducialNormals () const
 Returns the fiducial normals.
bool hasNormals () const
 Checks if normals are defined for the fiducials.
void addFiducial (vec3 position, std::optional< vec3 > normal={})
 Adds a single fiducial position with its normal.
void clearFiducials ()
 Removes all fiducial positions and normals.
size_t fiducialCount () const
 Returns the number of fiducials in this marker.
bool isEmpty () const
 Checks if the marker has any fiducials.
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
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

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ setFiducialPositions()

void ImFusion::OpticalTrackingMarker::setFiducialPositions ( const std::vector< vec3 > & positions)

Sets the fiducial positions in marker local coordinates (in millimeters).

Parameters
positionsVector of 3D positions for each fiducial

◆ setFiducialNormals()

bool ImFusion::OpticalTrackingMarker::setFiducialNormals ( const std::vector< vec3 > & normals)

Sets the fiducial normals in marker local coordinates.

Parameters
normalsVector of 3D normal directions. Must be empty or same size as positions.
Returns
True if successful, false if size mismatch

◆ addFiducial()

void ImFusion::OpticalTrackingMarker::addFiducial ( vec3 position,
std::optional< vec3 > normal = {} )

Adds a single fiducial position with its normal.

Parameters
position3D position in marker local coordinates
normal3D normal direction

◆ configure()

void ImFusion::OpticalTrackingMarker::configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from ImFusion::Configurable.

◆ configuration()

void ImFusion::OpticalTrackingMarker::configuration ( Properties * p) const
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.

See also
configure() for the inverse functionality

Reimplemented from ImFusion::Configurable.


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