![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Navigation/OpticalTrackingInterface.h>
Interface for optical tracking systems that support marker management. More...
Interface for optical tracking systems that support marker management.
This interface provides a generic abstraction for optical tracking systems that work with fiducial-based markers. It allows adding, retrieving, and optionally removing tracking markers from the tracking system.
Implementations should advertise their supported optional capabilities through the capabilities() method using the Capabilities flags.
Example usage:
Public Types | |
| enum | Capabilities { None = 0 , RemoveMarker = 1 << 0 , IndividualFiducials = 1 << 1 } |
| Hardware capabilities that an optical tracking system may support. More... | |
Public Member Functions | |
| virtual Flags< Capabilities > | capabilities () const =0 |
| Returns the hardware capabilities supported by this tracking system. | |
| virtual std::string | addTrackingMarker (std::unique_ptr< OpticalTrackingMarker > marker)=0 |
| Adds a tracking marker to the tracking system. | |
| virtual std::string | addTrackingMarker (const std::string &filepath, const std::string &name="") |
| Loads a tracking marker from file and adds it to the tracking system. | |
| virtual std::unique_ptr< OpticalTrackingMarker > | trackingMarker (const std::string &trackerId) const =0 |
| Returns a copy of the OpticalTrackingMarker for a given tracker ID. | |
| virtual bool | removeTrackingMarker (const std::string &trackerId) |
| Removes a tracking marker from the tracking system. | |
Hardware capabilities that an optical tracking system may support.
Use with Flags<Capabilities> to query or indicate supported capabilities.
| Enumerator | |
|---|---|
| None | No optional capabilities. |
| RemoveMarker | Supports removing markers after registration. |
| IndividualFiducials | Provides individual fiducial positions via the TrackingInstrumentFiducialsData data component. |
|
pure virtualthreadsafe |
Returns the hardware capabilities supported by this tracking system.
Can be called concurrently from any thread.
Implemented in ImFusion::AtracsysTrackingStreamBase, and ImFusion::NDIPolarisTrackingStream.
|
pure virtual |
Adds a tracking marker to the tracking system.
The marker geometry is registered with the tracking hardware, enabling the system to track objects that match this fiducial pattern.
| marker | The marker to add. Ownership is transferred. |
Implemented in ImFusion::AtracsysTrackingStreamBase, and ImFusion::NDIPolarisTrackingStream.
|
virtual |
Loads a tracking marker from file and adds it to the tracking system.
Convenience method using the OpticalTrackingMarkerIO functionality to load the marker. Equivalent to
| filepath | The filepath to load the marker from. Format is inferred from the file extension. |
| name | Optional name to be set to the optical tracking marker (empty name keeps the default one). |
|
pure virtual |
Returns a copy of the OpticalTrackingMarker for a given tracker ID.
| trackerId | The tracker ID as returned by addTrackingMarker(). |
Implemented in ImFusion::AtracsysTrackingStreamBase, and ImFusion::NDIPolarisTrackingStream.
|
virtual |
Removes a tracking marker from the tracking system.
An implementation of OpticalTrackingInterface must override this method if the tracking system supports marker removal (capabilities() contains flag Capabilities::RemoveMarker). The default implementation returns false without performing any action.
| trackerId | The tracker ID of the marker to remove. |
Reimplemented in ImFusion::AtracsysTrackingStreamBase, and ImFusion::NDIPolarisTrackingStream.