FAST
3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
|
#include <FileStreamer.hpp>
Public Member Functions | |
void | setFilenameFormat (std::string str) |
void | setFilenameFormats (std::vector< std::string > strings) |
void | setStartNumber (uint startNumber) |
void | setStepSize (uint step) |
void | setZeroFilling (uint digits) |
void | setNumberOfReplays (uint replays) |
void | setMaximumNumberOfFrames (uint nrOfFrames) |
void | setTimestampFilename (std::string filepath) |
void | enableLooping () |
void | disableLooping () |
void | setSleepTime (uint milliseconds) |
int | getNrOfFrames () |
void | setUseTimestamp (bool use) |
~FileStreamer () | |
virtual std::string | getNameOfClass () const |
void | loadAttributes () override |
![]() | |
Streamer () | |
virtual | ~Streamer () |
virtual void | stop () |
virtual void | setMaximumNrOfFrames (int maximumNrOfFrames) |
![]() | |
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 |
std::shared_ptr< Attribute > | getAttribute (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< DataType > | updateAndGetOutputData (uint portID=0) |
![]() | |
Object () | |
virtual | ~Object () |
Reporter & | getReporter () |
Protected Member Functions | |
virtual DataObject::pointer | getDataFrame (std::string filename)=0 |
std::string | getFilename (uint i, int currentSequence) const |
void | generateStream () override |
FileStreamer () | |
void | execute () |
![]() | |
virtual void | waitForFirstFrame () |
virtual void | startStream () |
virtual void | frameAdded () |
![]() | |
ProcessObject () | |
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< DataType > | getInputData (uint portID=0) |
template<class DataType > | |
std::shared_ptr< DataType > | getOutputData (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) |
![]() | |
Reporter & | reportError () |
Reporter & | reportWarning () |
Reporter & | reportInfo () |
ReporterEnd | reportEnd () const |
Protected Attributes | |
bool | mLoop |
int | mNrOfReplays |
uint | mZeroFillDigits |
int | mStartNumber |
int | mNrOfFrames |
int | mMaximumNrOfFrames |
uint | mSleepTime |
uint | mStepSize |
bool | mUseTimestamp = true |
std::vector< std::string > | mFilenameFormats |
std::string | mTimestampFilename |
![]() | |
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 |
![]() | |
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::pointer > | mDevices |
std::unordered_map< uint, DeviceCriteria > | mDeviceCriteria |
std::unordered_map< uint, DataChannel::pointer > | mInputConnections |
std::unordered_map< uint, std::vector< std::weak_ptr< DataChannel > > > | mOutputConnections |
std::unordered_map< uint, bool > | mInputPorts |
std::unordered_set< uint > | mOutputPorts |
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 |
![]() | |
std::weak_ptr< Object > | mPtr |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< Streamer > | pointer |
![]() | |
typedef std::shared_ptr< ProcessObject > | pointer |
![]() | |
typedef std::shared_ptr< Object > | pointer |
![]() | |
static std::string | getStaticNameOfClass () |
![]() | |
static std::string | getStaticNameOfClass () |
![]() | |
static std::string | getStaticNameOfClass () |
Abstract FileStreamer class
fast::FileStreamer::~FileStreamer | ( | ) |
|
protected |
void fast::FileStreamer::disableLooping | ( | ) |
void fast::FileStreamer::enableLooping | ( | ) |
|
protectedvirtual |
Implements fast::ProcessObject.
|
overrideprotectedvirtual |
The function producing the data stream
Implements fast::Streamer.
|
protectedpure virtual |
Implemented in fast::ImageFileStreamer, and fast::MeshFileStreamer.
|
protected |
|
inlinevirtual |
Implements fast::Streamer.
int fast::FileStreamer::getNrOfFrames | ( | ) |
|
overridevirtual |
Reimplemented from fast::ProcessObject.
void fast::FileStreamer::setFilenameFormat | ( | std::string | str | ) |
void fast::FileStreamer::setFilenameFormats | ( | std::vector< std::string > | strings | ) |
void fast::FileStreamer::setMaximumNumberOfFrames | ( | uint | nrOfFrames | ) |
void fast::FileStreamer::setNumberOfReplays | ( | uint | replays | ) |
void fast::FileStreamer::setSleepTime | ( | uint | milliseconds | ) |
Set a sleep time after each frame is read
void fast::FileStreamer::setStartNumber | ( | uint | startNumber | ) |
void fast::FileStreamer::setStepSize | ( | uint | step | ) |
void fast::FileStreamer::setTimestampFilename | ( | std::string | filepath | ) |
void fast::FileStreamer::setUseTimestamp | ( | bool | use | ) |
Enable or disable the use of timestamps when streaming files.
use |
void fast::FileStreamer::setZeroFilling | ( | uint | digits | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |