![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Stream/ImageStreamData.h>
Image data streamed from a streaming device. More...
Image data streamed from a streaming device.
Can contain one or more images, each represented by a SharedImage.
If multiple images are present, they are assumed to be from the same acquisition time and represent two different views, e.g. two images from a stereo camera, or a B-Mode and color Doppler image from an ultrasound device.
Public Member Functions | |
ImageStreamData (Stream *stream) | |
Creates an empty ImageStreamData object with the given stream. | |
ImageStreamData (Stream *stream, SharedImageSet &&imageSet) | |
Moves the images and (possibly per element) components into the newly created object. | |
ImageStreamData (Stream *stream, std::unique_ptr< SharedImage > &&img) | |
Moves the single image into the newly created object. | |
ImageStreamData (Stream *stream, const std::shared_ptr< SharedImage > &img) | |
Shallow-copies the single image into the newly created object. | |
ImageStreamData (Stream *stream, const std::shared_ptr< const SharedImage > &img) | |
Shallow-copies the single image into the newly created object. | |
ImageStreamData (Stream *stream, MemImage *img) | |
Deprecated constructor. Creates an ImageStreamData object with the given stream and image. | |
virtual void | setImageSet (const SharedImageSet &imageSet) |
Sets the images and (possibly per element) components into this object, replacing all existing images and components. | |
virtual void | setImages (const std::vector< std::shared_ptr< const SharedImage > > &sharedImages) |
Sets the images into this object, replacing all existing images. Does not modify components. | |
virtual std::vector< std::shared_ptr< const SharedImage > > | images2 () const |
Return all images contained in sample. | |
std::shared_ptr< SharedImageSet > | shallowCloneToSharedImageSet () const |
Return all images and (possibly per element) DataComponents contained in sample. | |
std::unique_ptr< StreamData > | clone () const override |
int | size () const |
Return the number of images in the stream data. | |
bool | containsGlImage () const |
Returns whether any of the images contains an OpenGL image and thus requires synchronization if moved to a thread different from the signaling thread. | |
const DataComponentList & | components (int i) const |
Returns the DataComponents associated to the element with that index. | |
const DataComponentList & | components () const |
Returns the list of DataComponents for this data. | |
DataComponentList & | components () |
Returns the list of DataComponents for 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 |
![]() | |
ElementwiseDataComponentList & | elementwiseComponents () |
Returns elementwise data component list. | |
const ElementwiseDataComponentList & | elementwiseComponents () const |
Returns elementwise data component list. | |
DataComponentList & | mutableComponents (int i) |
Returns the DataComponents associated to the element with that index, creating it if necessary. | |
const DataComponentList & | components (int i) const |
Returns the DataComponents associated to the element with that index. | |
Protected Attributes | |
std::vector< std::shared_ptr< const SharedImage > > | m_sharedImages |
![]() | |
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. | |
![]() | |
ElementwiseDataComponentList | m_elementwiseComponents |
Encodes elementwise data components. | |
Additional Inherited Members | |
![]() | |
StreamData (const StreamData &other)=default | |
StreamData (Stream *stream) | |
StreamData (Stream *stream, DataComponentList &&components) | |
ImageStreamData | ( | Stream * | stream, |
MemImage * | img ) |
Deprecated constructor. Creates an ImageStreamData object with the given stream and image.
|
virtual |
Sets the images and (possibly per element) components into this object, replacing all existing images and components.
Reimplemented in StereoImageStreamData.
|
virtual |
Sets the images into this object, replacing all existing images. Does not modify components.
Reimplemented in StereoImageStreamData.
|
overridevirtual |
Implements StreamData.
bool containsGlImage | ( | ) | const |
Returns whether any of the images contains an OpenGL image and thus requires synchronization if moved to a thread different from the signaling thread.
Cf. OpenGL Core Spec Chapter 5.3: "Shared Objects and Multiple Contexts > Propagating Changes to Objects".
OpenGl context synchronization example: