fast::Streamer class

Abstract base class for all Streamers.

All Streamers must inherit from this class.

Base classes

class ProcessObject
Abstract base class for all process objects.

Derived classes

class CameraStreamer
Stream images from a (web)camera.
class ClariusStreamer
Stream ultrasound images from a Clarius scanner.
class FileStreamer
Abstract file streamer class.
class ImageToBatchGenerator
Converts a stream of images into stream of Batch data objects.
class KinectStreamer
Streams data RGB and depth data from a kinect device.
class ManualImageStreamer
class MovieStreamer
Stream movie files.
class OpenIGTLinkStreamer
Stream image or transforms from an OpenIGTLink server.
class PatchGenerator
Generates a stream of patches from an ImagePyramid or 3D Image.
class RandomAccessStreamer
Abstract class of streamer in which any frame can be accessed at any time through an integer index and playbacked can be paused.
class RealSenseStreamer
Streams data RGB and depth data from an Intel RealSense camera.
class TransformFileStreamer

Public types

using pointer = std::shared_ptr<Streamer>

Public static functions

static auto getStaticNameOfClass() -> std::string

Constructors, destructors, conversion operators

Streamer()
~Streamer() virtual

Public functions

auto getNameOfClass() const -> std::string pure virtual
void stop() virtual
void setMaximumNrOfFrames(int maximumNrOfFrames) virtual
void setStreamingMode(StreamingMode mode)
auto getStreamingMode() const -> StreamingMode

Protected functions

void waitForFirstFrame() virtual
void startStream() virtual
void frameAdded() virtual
void generateStream() pure virtual

Protected variables

bool m_firstFrameIsInserted
bool m_streamIsStarted
bool m_stop
StreamingMode m_streamingMode
std::mutex m_firstFrameMutex
std::mutex m_stopMutex
std::unique_ptr<std::thread> m_thread
std::condition_variable m_firstFrameCondition

Function documentation

void fast::Streamer::stop() virtual

Stop the stream

void fast::Streamer::waitForFirstFrame() virtual protected

Block until the first data frame has been sent using a condition variable

void fast::Streamer::startStream() virtual protected

Starts the stream if it is not already started

void fast::Streamer::frameAdded() virtual protected

Signal that a frame was added. Necessary for unlocking the block in waitForFirstFrame

void fast::Streamer::generateStream() pure virtual protected

The function producing the data stream