FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
fast::RandomAccessStreamer Class Referenceabstract

#include <RandomAccessStreamer.hpp>

+ Inheritance diagram for fast::RandomAccessStreamer:
+ Collaboration diagram for fast::RandomAccessStreamer:

Public Member Functions

virtual void setPause (bool pause)
 
virtual bool getPause ()
 
virtual int getCurrentFrameIndex ()
 
virtual void setCurrentFrameIndex (int index)
 
virtual int getCurrentFrameIndexAndUpdate ()
 
virtual int getFramerate () const
 
virtual void setFramerate (int framerate)
 
virtual int getNrOfFrames ()=0
 
virtual void stop () override
 
void setLooping (bool loop)
 
void frameAdded () override
 
- Public Member Functions inherited from fast::Streamer
 Streamer ()
 
virtual ~Streamer ()
 
virtual std::string getNameOfClass () const =0
 
virtual void setMaximumNrOfFrames (int maximumNrOfFrames)
 
- Public Member Functions inherited from fast::ProcessObject
virtual ~ProcessObject ()
 
void update (int executeToken=-1)
 
RuntimeMeasurement::pointer getRuntime ()
 
RuntimeMeasurement::pointer getRuntime (std::string name)
 
RuntimeMeasurementsManager::pointer getAllRuntimes ()
 
void enableRuntimeMeasurements ()
 
void disableRuntimeMeasurements ()
 
void setMainDevice (ExecutionDevice::pointer device)
 
void setMainDeviceCriteria (const DeviceCriteria &citeria)
 
ExecutionDevice::pointer getMainDevice () const
 
void setDevice (uint deviceNumber, ExecutionDevice::pointer device)
 
void setDeviceCriteria (uint deviceNumber, const DeviceCriteria &criteria)
 
ExecutionDevice::pointer getDevice (uint deviceNumber) const
 
virtual DataChannel::pointer getOutputPort (uint portID=0)
 
virtual DataChannel::pointer getInputPort (uint portID=0)
 
virtual void setInputConnection (DataChannel::pointer port)
 
virtual void setInputConnection (uint portID, DataChannel::pointer port)
 
virtual void setInputData (DataObject::pointer data)
 
virtual void setInputData (uint portID, DataObject::pointer data)
 
int getNrOfInputConnections () const
 
int getNrOfOutputPorts () const
 
virtual void loadAttributes ()
 
std::shared_ptr< AttributegetAttribute (std::string id)
 
std::unordered_map< std::string, std::shared_ptr< Attribute > > getAttributes ()
 
void setAttributes (std::vector< std::shared_ptr< Attribute >> attributes)
 
void stopPipeline ()
 
void setModified (bool modified)
 
template<class DataType >
std::shared_ptr< DataTypeupdateAndGetOutputData (uint portID=0)
 
- Public Member Functions inherited from fast::Object
 Object ()
 
virtual ~Object ()
 
ReportergetReporter ()
 

Protected Member Functions

virtual void waitForUnpause ()
 
- Protected Member Functions inherited from fast::Streamer
virtual void waitForFirstFrame ()
 
virtual void startStream ()
 
virtual void generateStream ()=0
 
- Protected Member Functions inherited from fast::ProcessObject
 ProcessObject ()
 
virtual void execute ()=0
 
virtual void preExecute ()
 
virtual void postExecute ()
 
template<class DataType >
void createInputPort (uint portID, bool required=true)
 
template<class DataType >
void createOutputPort (uint portID)
 
template<class DataType >
std::shared_ptr< DataTypegetInputData (uint portID=0)
 
template<class DataType >
std::shared_ptr< DataTypegetOutputData (uint portID=0)
 
void addOutputData (uint portID, DataObject::pointer data)
 
bool hasNewInputData (uint portID)
 
virtual void waitToFinish ()
 
void createOpenCLProgram (std::string sourceFilename, std::string name="")
 
cl::Program getOpenCLProgram (std::shared_ptr< OpenCLDevice > device, std::string name="", std::string buildOptions="")
 
void createFloatAttribute (std::string id, std::string name, std::string description, float initialValue)
 
void createIntegerAttribute (std::string id, std::string name, std::string description, int initialValue)
 
void createBooleanAttribute (std::string id, std::string name, std::string description, bool initialValue)
 
void createStringAttribute (std::string id, std::string name, std::string description, std::string initialValue)
 
float getFloatAttribute (std::string id)
 
int getIntegerAttribute (std::string id)
 
bool getBooleanAttribute (std::string id)
 
std::string getStringAttribute (std::string id)
 
std::vector< float > getFloatListAttribute (std::string id)
 
std::vector< int > getIntegerListAttribute (std::string id)
 
std::vector< bool > getBooleanListAttribute (std::string id)
 
std::vector< std::string > getStringListAttribute (std::string id)
 
void changeDeviceOnInputs (uint deviceNumber, ExecutionDevice::pointer device)
 
void validateInputPortExists (uint portID)
 
void validateOutputPortExists (uint portID)
 
- Protected Member Functions inherited from fast::Object
ReporterreportError ()
 
ReporterreportWarning ()
 
ReporterreportInfo ()
 
ReporterEnd reportEnd () const
 

Protected Attributes

int m_framerate
 
bool m_pause = false
 
bool m_pauseAfterOneFrame = false
 
std::mutex m_playbackMutex
 
std::mutex m_pauseMutex
 
std::condition_variable m_pauseCV
 
int m_currentFrameIndex
 
bool m_loop
 
- Protected Attributes inherited from fast::Streamer
bool m_firstFrameIsInserted = false
 
bool m_streamIsStarted = false
 
bool m_stop = false
 
std::mutex m_firstFrameMutex
 
std::mutex m_stopMutex
 
std::unique_ptr< std::thread > m_thread
 
std::condition_variable m_firstFrameCondition
 
- Protected Attributes inherited from fast::ProcessObject
bool mIsModified
 
int m_lastExecuteToken = -1
 
RuntimeMeasurementsManager::pointer mRuntimeManager
 
std::unordered_map< uint, bool > mRequiredInputs
 
std::unordered_map< uint, std::vector< uint > > mInputDevices
 
std::unordered_map< uint, ExecutionDevice::pointermDevices
 
std::unordered_map< uint, DeviceCriteriamDeviceCriteria
 
std::unordered_map< uint, DataChannel::pointermInputConnections
 
std::unordered_map< uint, std::vector< std::weak_ptr< DataChannel > > > mOutputConnections
 
std::unordered_map< uint, bool > mInputPorts
 
std::unordered_set< uintmOutputPorts
 
std::unordered_map< uint, std::pair< DataObject::pointer, uint64_t > > mLastProcessed
 
std::unordered_map< std::string, std::shared_ptr< OpenCLProgram > > mOpenCLPrograms
 
std::unordered_map< std::string, std::shared_ptr< Attribute > > mAttributes
 
std::unordered_map< std::string, std::string > m_frameData
 
std::unordered_set< std::string > m_lastFrame
 
int m_maximumNrOfFrames = -1
 
- Protected Attributes inherited from fast::Object
std::weak_ptr< ObjectmPtr
 

Additional Inherited Members

- Public Types inherited from fast::Streamer
typedef std::shared_ptr< Streamerpointer
 
- Public Types inherited from fast::ProcessObject
typedef std::shared_ptr< ProcessObjectpointer
 
- Public Types inherited from fast::Object
typedef std::shared_ptr< Objectpointer
 
- Static Public Member Functions inherited from fast::Streamer
static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::ProcessObject
static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::Object
static std::string getStaticNameOfClass ()
 

Detailed Description

A streamer in which any frame can be accessed at any time through an integer index and playbacked can be paused.

Member Function Documentation

◆ frameAdded()

void fast::RandomAccessStreamer::frameAdded ( )
overridevirtual

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

Reimplemented from fast::Streamer.

◆ getCurrentFrameIndex()

virtual int fast::RandomAccessStreamer::getCurrentFrameIndex ( )
virtual

◆ getCurrentFrameIndexAndUpdate()

virtual int fast::RandomAccessStreamer::getCurrentFrameIndexAndUpdate ( )
virtual

◆ getFramerate()

virtual int fast::RandomAccessStreamer::getFramerate ( ) const
virtual

◆ getNrOfFrames()

virtual int fast::RandomAccessStreamer::getNrOfFrames ( )
pure virtual

Implemented in fast::UFFStreamer.

◆ getPause()

virtual bool fast::RandomAccessStreamer::getPause ( )
virtual

◆ setCurrentFrameIndex()

virtual void fast::RandomAccessStreamer::setCurrentFrameIndex ( int  index)
virtual

◆ setFramerate()

virtual void fast::RandomAccessStreamer::setFramerate ( int  framerate)
virtual

◆ setLooping()

void fast::RandomAccessStreamer::setLooping ( bool  loop)

◆ setPause()

virtual void fast::RandomAccessStreamer::setPause ( bool  pause)
virtual

◆ stop()

virtual void fast::RandomAccessStreamer::stop ( )
overridevirtual

Stop the stream

Reimplemented from fast::Streamer.

◆ waitForUnpause()

virtual void fast::RandomAccessStreamer::waitForUnpause ( )
protectedvirtual

Member Data Documentation

◆ m_currentFrameIndex

int fast::RandomAccessStreamer::m_currentFrameIndex
protected

◆ m_framerate

int fast::RandomAccessStreamer::m_framerate
protected

◆ m_loop

bool fast::RandomAccessStreamer::m_loop
protected

◆ m_pause

bool fast::RandomAccessStreamer::m_pause = false
protected

◆ m_pauseAfterOneFrame

bool fast::RandomAccessStreamer::m_pauseAfterOneFrame = false
protected

◆ m_pauseCV

std::condition_variable fast::RandomAccessStreamer::m_pauseCV
protected

◆ m_pauseMutex

std::mutex fast::RandomAccessStreamer::m_pauseMutex
protected

◆ m_playbackMutex

std::mutex fast::RandomAccessStreamer::m_playbackMutex
protected

The documentation for this class was generated from the following file: