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

#include <ProcessObject.hpp>

Inherits fast::Object.

Inherited by fast::AddTransformation, fast::BlockMatching, fast::BoundingBoxSetAccumulator, fast::CenterlineExtraction, fast::ClassificationToText, fast::CoherentPointDrift, fast::Dilation, fast::Erosion, fast::EulerGradientVectorFlow, fast::FileExporter, fast::GaussianSmoothingFilter, fast::HDF5TensorExporter, fast::HDF5TensorImporter, fast::HounsefieldConverter, fast::ImageChannelConverter, fast::ImageCropper, fast::ImageExporter, fast::ImageFileExporter, fast::ImageFileImporter, fast::ImageGradient, fast::ImageInverter, fast::ImageMovingAverage, fast::ImageMultiply, fast::ImageResampler, fast::ImageResizer, fast::ImageSlicer, fast::ImagesToSequence, fast::ImageWeightedMovingAverage, fast::Importer, fast::InverseGradientSegmentation, fast::IterativeClosestPoint, fast::ITKImageExporter< TImage >, fast::ITKImageImporter< TImage >, fast::KalmanFilter, fast::LabelModifier, fast::LaplacianOfGaussian, fast::LevelSetSegmentation, fast::LungSegmentation, fast::MetaImageExporter, fast::MultigridGradientVectorFlow, fast::NeuralNetwork, fast::NonLocalMeans, fast::NonMaximumSuppression, fast::PatchStitcher, fast::PipelineSynchronizer, fast::Plotter, fast::RegionProperties, fast::Renderer, fast::RidgeTraversalCenterlineExtraction, fast::RunLambda, fast::ScaleImage, fast::SeededRegionGrowing, fast::SegmentationAlgorithm, fast::SegmentationVolumeReconstructor, fast::SetTransformation, fast::Skeletonization, fast::Streamer, fast::StreamExporter, fast::StreamToFileExporter, fast::SurfaceExtraction, fast::TemplateMatching, fast::TensorToSegmentation, fast::TubeSegmentationAndCenterlineExtraction, fast::UltrasoundImageCropper, fast::UltrasoundImageEnhancement, fast::UltrasoundVesselDetection, fast::UltrasoundVesselSegmentation, fast::VectorMedianFilter, fast::View, fast::VTKImageExporter, fast::VTKImageImporter, fast::VTKMeshExporter, and fast::WholeSlideImageImporter.

+ Collaboration diagram for fast::ProcessObject:

Public Types

typedef std::shared_ptr< ProcessObjectpointer
 
- Public Types inherited from fast::Object
typedef std::shared_ptr< Objectpointer
 

Public Member Functions

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 std::string getNameOfClass () const =0
 
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 ()
 

Static Public Member Functions

static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::Object
static std::string getStaticNameOfClass ()
 

Protected Member Functions

 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

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
 

Member Typedef Documentation

◆ pointer

typedef std::shared_ptr<ProcessObject> fast::ProcessObject::pointer

Constructor & Destructor Documentation

◆ ~ProcessObject()

virtual fast::ProcessObject::~ProcessObject ( )
virtual

◆ ProcessObject()

fast::ProcessObject::ProcessObject ( )
protected

Member Function Documentation

◆ addOutputData()

void fast::ProcessObject::addOutputData ( uint  portID,
DataObject::pointer  data 
)
protected

◆ changeDeviceOnInputs()

void fast::ProcessObject::changeDeviceOnInputs ( uint  deviceNumber,
ExecutionDevice::pointer  device 
)
protected

◆ createBooleanAttribute()

void fast::ProcessObject::createBooleanAttribute ( std::string  id,
std::string  name,
std::string  description,
bool  initialValue 
)
protected

◆ createFloatAttribute()

void fast::ProcessObject::createFloatAttribute ( std::string  id,
std::string  name,
std::string  description,
float  initialValue 
)
protected

◆ createInputPort()

template<class DataType >
void fast::ProcessObject::createInputPort ( uint  portID,
bool  required = true 
)
protected

◆ createIntegerAttribute()

void fast::ProcessObject::createIntegerAttribute ( std::string  id,
std::string  name,
std::string  description,
int  initialValue 
)
protected

◆ createOpenCLProgram()

void fast::ProcessObject::createOpenCLProgram ( std::string  sourceFilename,
std::string  name = "" 
)
protected

◆ createOutputPort()

template<class DataType >
void fast::ProcessObject::createOutputPort ( uint  portID)
protected

◆ createStringAttribute()

void fast::ProcessObject::createStringAttribute ( std::string  id,
std::string  name,
std::string  description,
std::string  initialValue 
)
protected

◆ disableRuntimeMeasurements()

void fast::ProcessObject::disableRuntimeMeasurements ( )

◆ enableRuntimeMeasurements()

void fast::ProcessObject::enableRuntimeMeasurements ( )

◆ execute()

virtual void fast::ProcessObject::execute ( )
protectedpure virtual

◆ getAllRuntimes()

RuntimeMeasurementsManager::pointer fast::ProcessObject::getAllRuntimes ( )

◆ getAttribute()

std::shared_ptr<Attribute> fast::ProcessObject::getAttribute ( std::string  id)

◆ getAttributes()

std::unordered_map<std::string, std::shared_ptr<Attribute> > fast::ProcessObject::getAttributes ( )

◆ getBooleanAttribute()

bool fast::ProcessObject::getBooleanAttribute ( std::string  id)
protected

◆ getBooleanListAttribute()

std::vector<bool> fast::ProcessObject::getBooleanListAttribute ( std::string  id)
protected

◆ getDevice()

ExecutionDevice::pointer fast::ProcessObject::getDevice ( uint  deviceNumber) const

◆ getFloatAttribute()

float fast::ProcessObject::getFloatAttribute ( std::string  id)
protected

◆ getFloatListAttribute()

std::vector<float> fast::ProcessObject::getFloatListAttribute ( std::string  id)
protected

◆ getInputData()

template<class DataType >
std::shared_ptr< DataType > fast::ProcessObject::getInputData ( uint  portID = 0)
protected

◆ getInputPort()

virtual DataChannel::pointer fast::ProcessObject::getInputPort ( uint  portID = 0)
virtual

◆ getIntegerAttribute()

int fast::ProcessObject::getIntegerAttribute ( std::string  id)
protected

◆ getIntegerListAttribute()

std::vector<int> fast::ProcessObject::getIntegerListAttribute ( std::string  id)
protected

◆ getMainDevice()

ExecutionDevice::pointer fast::ProcessObject::getMainDevice ( ) const

◆ getNameOfClass()

virtual std::string fast::ProcessObject::getNameOfClass ( ) const
pure virtual

◆ getNrOfInputConnections()

int fast::ProcessObject::getNrOfInputConnections ( ) const

◆ getNrOfOutputPorts()

int fast::ProcessObject::getNrOfOutputPorts ( ) const

◆ getOpenCLProgram()

cl::Program fast::ProcessObject::getOpenCLProgram ( std::shared_ptr< OpenCLDevice device,
std::string  name = "",
std::string  buildOptions = "" 
)
protected

◆ getOutputData()

template<class DataType >
std::shared_ptr< DataType > fast::ProcessObject::getOutputData ( uint  portID = 0)
protected

◆ getOutputPort()

virtual DataChannel::pointer fast::ProcessObject::getOutputPort ( uint  portID = 0)
virtual

Reimplemented in fast::OpenIGTLinkStreamer.

◆ getRuntime() [1/2]

RuntimeMeasurement::pointer fast::ProcessObject::getRuntime ( )

◆ getRuntime() [2/2]

RuntimeMeasurement::pointer fast::ProcessObject::getRuntime ( std::string  name)

◆ getStaticNameOfClass()

static std::string fast::ProcessObject::getStaticNameOfClass ( )
inlinestatic

◆ getStringAttribute()

std::string fast::ProcessObject::getStringAttribute ( std::string  id)
protected

◆ getStringListAttribute()

std::vector<std::string> fast::ProcessObject::getStringListAttribute ( std::string  id)
protected

◆ hasNewInputData()

bool fast::ProcessObject::hasNewInputData ( uint  portID)
protected

◆ loadAttributes()

virtual void fast::ProcessObject::loadAttributes ( )
virtual

◆ postExecute()

virtual void fast::ProcessObject::postExecute ( )
protectedvirtual

◆ preExecute()

virtual void fast::ProcessObject::preExecute ( )
protectedvirtual

◆ setAttributes()

void fast::ProcessObject::setAttributes ( std::vector< std::shared_ptr< Attribute >>  attributes)

◆ setDevice()

void fast::ProcessObject::setDevice ( uint  deviceNumber,
ExecutionDevice::pointer  device 
)

◆ setDeviceCriteria()

void fast::ProcessObject::setDeviceCriteria ( uint  deviceNumber,
const DeviceCriteria criteria 
)

◆ setInputConnection() [1/2]

virtual void fast::ProcessObject::setInputConnection ( DataChannel::pointer  port)
virtual

◆ setInputConnection() [2/2]

virtual void fast::ProcessObject::setInputConnection ( uint  portID,
DataChannel::pointer  port 
)
virtual

◆ setInputData() [1/2]

virtual void fast::ProcessObject::setInputData ( DataObject::pointer  data)
virtual

◆ setInputData() [2/2]

virtual void fast::ProcessObject::setInputData ( uint  portID,
DataObject::pointer  data 
)
virtual

◆ setMainDevice()

void fast::ProcessObject::setMainDevice ( ExecutionDevice::pointer  device)

◆ setMainDeviceCriteria()

void fast::ProcessObject::setMainDeviceCriteria ( const DeviceCriteria citeria)

◆ setModified()

void fast::ProcessObject::setModified ( bool  modified)

◆ stopPipeline()

void fast::ProcessObject::stopPipeline ( )

Used to stop a pipeline.

◆ update()

void fast::ProcessObject::update ( int  executeToken = -1)

Do update on this PO, which will trigger update on all connected POs. An optional executeToken can be used to synchronize updating to avoid duplicate execution for the same frames when using streaming. Increment the token for every timestep with a positive value.

Parameters
executeTokenNegative value means that the execute token is disabled.

◆ updateAndGetOutputData()

template<class DataType >
std::shared_ptr< DataType > fast::ProcessObject::updateAndGetOutputData ( uint  portID = 0)

◆ validateInputPortExists()

void fast::ProcessObject::validateInputPortExists ( uint  portID)
protected

◆ validateOutputPortExists()

void fast::ProcessObject::validateOutputPortExists ( uint  portID)
protected

◆ waitToFinish()

virtual void fast::ProcessObject::waitToFinish ( )
inlineprotectedvirtual

Reimplemented in fast::GaussianSmoothingFilter.

Member Data Documentation

◆ m_frameData

std::unordered_map<std::string, std::string> fast::ProcessObject::m_frameData
protected

◆ m_lastExecuteToken

int fast::ProcessObject::m_lastExecuteToken = -1
protected

◆ m_lastFrame

std::unordered_set<std::string> fast::ProcessObject::m_lastFrame
protected

◆ m_maximumNrOfFrames

int fast::ProcessObject::m_maximumNrOfFrames = -1
protected

◆ mAttributes

std::unordered_map<std::string, std::shared_ptr<Attribute> > fast::ProcessObject::mAttributes
protected

◆ mDeviceCriteria

std::unordered_map<uint, DeviceCriteria> fast::ProcessObject::mDeviceCriteria
protected

◆ mDevices

std::unordered_map<uint, ExecutionDevice::pointer> fast::ProcessObject::mDevices
protected

◆ mInputConnections

std::unordered_map<uint, DataChannel::pointer> fast::ProcessObject::mInputConnections
protected

◆ mInputDevices

std::unordered_map<uint, std::vector<uint> > fast::ProcessObject::mInputDevices
protected

◆ mInputPorts

std::unordered_map<uint, bool> fast::ProcessObject::mInputPorts
protected

◆ mIsModified

bool fast::ProcessObject::mIsModified
protected

◆ mLastProcessed

std::unordered_map<uint, std::pair<DataObject::pointer, uint64_t> > fast::ProcessObject::mLastProcessed
protected

◆ mOpenCLPrograms

std::unordered_map<std::string, std::shared_ptr<OpenCLProgram> > fast::ProcessObject::mOpenCLPrograms
protected

◆ mOutputConnections

std::unordered_map<uint, std::vector<std::weak_ptr<DataChannel> > > fast::ProcessObject::mOutputConnections
protected

◆ mOutputPorts

std::unordered_set<uint> fast::ProcessObject::mOutputPorts
protected

◆ mRequiredInputs

std::unordered_map<uint, bool> fast::ProcessObject::mRequiredInputs
protected

◆ mRuntimeManager

RuntimeMeasurementsManager::pointer fast::ProcessObject::mRuntimeManager
protected

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