![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Stream/TrackingStreamData.h>
Tracking data streamed from a streaming device for spatial localization of tools, images, etc. More...
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< TrackingInstrument > | instruments () const |
Returns a vector containing all tracking instruments. | |
std::optional< TrackingInstrument > | instrument (const std::string &id) const |
Query for a specific tracking instrument by its ID (see TrackerID::ID()). | |
std::optional< TrackingInstrument > | instrumentByName (const std::string &name) const |
Query for a specific tracking instrument by its name (see TrackerID::name()). | |
std::unique_ptr< StreamData > | clone () const override |
TrackingStream * | trackingStream () const |
Returns the tracking stream object which updates this data. | |
![]() | |
virtual Stream * | stream () 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 DataComponentList & | components () const |
Returns the list of DataComponents for this data. | |
DataComponentList & | components () |
Returns the list of DataComponents for this data. | |
template<typename StreamDataClass> | |
const StreamDataClass * | typed () const |
Additional Inherited Members | |
![]() | |
StreamData (const StreamData &other)=default | |
StreamData (Stream *stream) | |
StreamData (Stream *stream, DataComponentList &&components) | |
![]() | |
Stream * | m_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. | |
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.
|
overridevirtual |
Implements StreamData.