ImFusion C++ SDK 4.4.0
ImFusion::TrackingStreamData Class Reference

#include <ImFusion/Stream/TrackingStreamData.h>

Tracking data streamed from a streaming device for spatial localization of tools, images, etc. More...

Inheritance diagram for ImFusion::TrackingStreamData:

Detailed Description

Tracking data streamed from a streaming device for spatial localization of tools, images, etc.

Can contain poses for one or more tracking targets, each represented by a TrackingInstrument.

Public Member Functions

 TrackingStreamData (Stream *stream, std::vector< TrackingInstrument > instruments)
 Sets the instrument vector.
void update (const TrackingStreamData *other)
 Updates the instance with the data from other, including cloning all data components.
void updateComponents (const DataComponentList &other)
 Clones all data components from other, deleting all previously existing ones.
std::vector< TrackingInstrumentinstruments () const
 Returns a vector containing all tracking instruments.
std::optional< TrackingInstrumentinstrument (const std::string &id) const
 Query for a specific tracking instrument by its ID (see TrackerID::ID()).
std::optional< TrackingInstrumentinstrumentByName (const std::string &name) const
 Query for a specific tracking instrument by its name (see TrackerID::name()).
std::unique_ptr< StreamData > clone () const override
TrackingStreamtrackingStream () const
 Returns the tracking stream object which updates this data.
Public Member Functions inherited from ImFusion::StreamData
virtual Streamstream () const
 Returns the stream object which updates this data.
virtual unsigned long long timestampDevice () const
 Timestamp in milliseconds. Set by the streaming device.
virtual void setTimestampDevice (unsigned long long time)
 Set timestamp provided by the streaming device, in milliseconds.
virtual unsigned long long timestampArrival () const
 Timestamp in milliseconds. Based on message's arrival time.
virtual void setTimestampArrival (std::chrono::system_clock::time_point time)
 Set the system time when this streamData was arrived. It will be stored in milliseconds relative to epoch time.
virtual void setTimestampArrival (unsigned long long time)
 Set arrival timestamp manually, in milliseconds.
const DataComponentListcomponents () const
 Returns the list of DataComponents for this data.
DataComponentListcomponents ()
 Returns the list of DataComponents for this data.
template<typename StreamDataClass>
const StreamDataClass * typed () const

Additional Inherited Members

Protected Member Functions inherited from ImFusion::StreamData
 StreamData (const StreamData &other)=default
 StreamData (Stream *stream)
 StreamData (Stream *stream, DataComponentList &&components)
Protected Attributes inherited from ImFusion::StreamData
Streamm_stream
 The stream object which updates this data.
unsigned long long m_timestampDevice
 Timestamp of the streaming device, in milliseconds.
unsigned long long m_timestampArrival
 Timestamp when the data is received in ImFusion framework, in milliseconds.
DataComponentList m_dataComponentList
 The list of DataComponents for this StreamData.

Constructor & Destructor Documentation

◆ TrackingStreamData()

ImFusion::TrackingStreamData::TrackingStreamData ( Stream * stream,
std::vector< TrackingInstrument > instruments )

Sets the instrument vector.

Also sets the device timestamp to the timestamp of the first instrument, if instruments not empty.

Member Function Documentation

◆ clone()

std::unique_ptr< StreamData > ImFusion::TrackingStreamData::clone ( ) const
overridevirtual

Implements ImFusion::StreamData.


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