fast::ProcessObject class

Abstract base class for all process objects.

Base classes

class Object
Base class for all FAST objects.

Derived classes

class ConvertToMeters
class AddTransformation
Add transformations to spatial data objects.
class AirwaySegmentation
Segment airways from CT using seeded region growing with explosion control.
class BinaryThresholding
Segmentation using a threshold value.
class BlockMatching
Block matching tracking of an image stream.
class BoundingBoxSetAccumulator
Accumulate a stream of bounding box sets to a single large bounding box set.
class CenterlineExtraction
Extract centerline from 3D image segmentation.
class ClassificationToText
class CoherentPointDrift
Abstract base class for Coherent Point Drift (CPD) registration.
class Dilation
Perform binary dilation with disk structuring element.
class EmptyProcessObject
class Erosion
Perform binary erosion with disk structuring element.
class EulerGradientVectorFlow
Gradient vector flow using Euler method.
class Exporter
Abstract base class for exporters.
class GaussianSmoothing
Smoothing by convolution with a Gaussian mask.
class HounsefieldConverter
Converts input image to Hounsefield units (if needed)
class ImageChannelConverter
Remove and/or reverse channels from an image.
class ImageCropper
Process object from cropping an image.
class ImageGradient
Calculate image gradient using central finite difference method.
class ImageInverter
Invert the intensity of an image.
class ImageMovingAverage
Temporal smoothing of image using moving average.
class ImageMultiply
Multiply two images.
class ImagePyramidPatchImporter
Loads an image pyramid from a set of image patches stored in a folder.
class ImageResampler
Resample an image to a given spatial resolution.
class ImageResizer
Process object for resizing an image.
class ImageSlicer
Slice a 3D image using a defined plane.
class ImagesToSequence
Process object for converting a stream of images to a Sequence data object.
class ImageWeightedMovingAverage
Temporal smoothing of image using weighted moving average.
class Importer
Abstract base class for Importers.
class IntensityNormalization
Normalize intensities of an image to a 0-1 or custom range.
class InverseGradientSegmentation
Perform segmentation by following inverse direction of gradient vector field.
class IterativeClosestPoint
Registration of two meshes using ICP algorithm.
template<class TImage>
class ITKImageExporter
Export a FAST Image to an ITK image.
template<class TImage>
class ITKImageImporter
Imports and ITK image.
class KalmanFilterModelSegmentation
Kalman filter deformable model segmentation.
class LabelModifier
Change labels in a segmentation image.
class LaplacianOfGaussian
Calculate image gradient using Laplacian of Gaussian method.
class LevelSetSegmentation
Level set image segmentation.
class LungSegmentation
Segment the lung, airways and blood vessels from a CT using seeded region growing and morpohology.
class MeshToSegmentation
Converts a line (2D) or triangle (3D) mesh to a segmentation image.
class MultigridGradientVectorFlow
Gradient vector flow using the multigrid method.
class NeuralNetwork
Neural network process object.
class NonLocalMeans
Multiscale Non-Local Means (NLM) smoothing.
class NonMaximumSuppression
Non-maximum suppression of bounding box sets.
class PatchStitcher
Stitch a stream of processed patches from the PatchGenerator.
class PipelineSynchronizer
class Plotter
class RegionProperties
Calculate properties, such as area, contour and centroid, for every segmentation region.
class Renderer
Abstract base class for Renderers.
class RidgeTraversalCenterlineExtraction
Extract 3D centerline by following ridge.
class RunLambda
Run a C++ lambda in a FAST pipeline.
class SeededRegionGrowing
Segmentation by seeded region growing.
class SegmentationVolumeReconstructor
Reconstruct a stream of 2D segmentation images into a 3D segmentation image.
class SetTransformation
Set transformations to spatial data objects.
class Skeletonization
Extract the skeleton of 2D segmentation as a 2D image.
class Streamer
Abstract base class for all Streamers.
class StreamToFileExporter
Write a stream of Mesh or Image data as a sequence of files.
class SurfaceExtraction
Extract triangle mesh from a 3D Image (volume)
class TemplateMatching
Match a template image to an image.
class TensorToBoundingBoxSet
class TensorToImage
Converts a Tensor with shape HxWxC to a FAST Image.
class TensorToSegmentation
A process object which converts a Tensor to a Segmentation object.
class TissueSegmentation
Segment tissue from a WSI.
class Tracking
class TubeSegmentationAndCenterlineExtraction
Segmentation and centerline extraction of tubular structures.
class UltrasoundImageCropper
Automatic cropping of an ultrasound scanner image.
class UltrasoundImageEnhancement
Apply a color map and reject on an ultrasound image.
class VectorMedianFilter
Apply median filter on vector field to reduce noise.
class View
class VTKImageExporter
Export a FAST Image to an VTK image.
class VTKImageImporter
Loads a VTK image to FAST.
class VTKMeshExporter
Export a FAST Mesh to an VTK PolyData object.

Public types

using pointer = std::shared_ptr<ProcessObject>

Public static functions

static auto getStaticNameOfClass() -> std::string

Constructors, destructors, conversion operators

~ProcessObject() virtual
ProcessObject() protected

Public functions

void update(int executeToken = -1)
Update/Run the pipeline up to this process object.
auto getRuntime() -> RuntimeMeasurement::pointer
auto getRuntime(std::string name) -> RuntimeMeasurement::pointer
auto getAllRuntimes() -> RuntimeMeasurementsManager::pointer
auto getRuntimeManager() -> RuntimeMeasurementsManager::pointer
void enableRuntimeMeasurements()
void disableRuntimeMeasurements()
void setMainDevice(ExecutionDevice::pointer device)
void setMainDeviceCriteria(const DeviceCriteria& citeria)
auto getMainDevice() const -> ExecutionDevice::pointer
void setDevice(uint deviceNumber, ExecutionDevice::pointer device)
void setDeviceCriteria(uint deviceNumber, const DeviceCriteria& criteria)
auto getDevice(uint deviceNumber) const -> ExecutionDevice::pointer
auto getOutputPort(uint portID = 0) -> DataChannel::pointer virtual
auto getInputPort(uint portID = 0) -> DataChannel::pointer 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) virtual
auto getOutputData(uint portID = 0) -> DataObject::pointer
template<class DataType>
auto getOutputData(uint portID = 0) -> std::shared_ptr<DataType>
auto getNrOfInputConnections() const -> int
auto getNrOfOutputPorts() const -> int
auto getNrOfInputPorts() const -> int
auto getNameOfClass() const -> std::string pure virtual
void loadAttributes() virtual
auto getAttribute(std::string id) -> std::shared_ptr<Attribute>
auto getAttributes() -> std::unordered_map<std::string, std::shared_ptr<Attribute>>
void setAttributes(std::vector<std::shared_ptr<Attribute>> attributes)
void stopPipeline()
Stop a pipeline.
void setModified(bool modified)
Mark this process object as modified or not. A modified PO will execute next time it is updated.
template<class DataType>
auto updateAndGetOutputData(uint portID = 0) -> std::shared_ptr<DataType>
template<class DataType>
auto runAndGetOutputData(uint portID = 0) -> std::shared_ptr<DataType>
auto runAndGetOutputData(uint portID = 0) -> std::shared_ptr<DataObject>
void run(int executeToken = -1)
auto connect(std::shared_ptr<ProcessObject> parentProcessObject, uint outputPortID = 0) -> std::shared_ptr<ProcessObject>
auto connect(uint inputPortID, std::shared_ptr<ProcessObject> parentProcessObject, uint outputPortID = 0) -> std::shared_ptr<ProcessObject>
auto connect(std::shared_ptr<DataObject> inputDataObject) -> std::shared_ptr<ProcessObject>
auto connect(uint inputPortID, std::shared_ptr<DataObject> inputDataObject) -> std::shared_ptr<ProcessObject>
auto getLastExecuteToken() const -> int
void setExecuteOnLastFrameOnly(bool executeOnLastFrameOnly)
auto getExecuteOnLastFrameOnly() const -> bool

Protected types

struct InputPort
struct OutputPort

Protected functions

void execute() pure virtual
void preExecute() virtual
void postExecute() virtual
void createInputPort(uint portID, std::string name = "", std::string description = "", bool required = true)
void createOutputPort(uint portID, std::string name = "", std::string description = "")
template<class DataType>
void createInputPort(uint portID, bool required = true)
template<class DataType>
void createOutputPort(uint portID)
template<class DataType>
auto getInputData(uint portID = 0) -> std::shared_ptr<DataType>
void addOutputData(DataObject::pointer data, bool propagateLastFrameData = true, bool propagateFrameData = true)
void addOutputData(uint portID, DataObject::pointer data, bool propagateLastFrameData = true, bool propagateFrameData = true)
auto hasNewInputData(uint portID) -> bool
void waitToFinish() virtual
void createOpenCLProgram(std::string sourceFilename, std::string name = "")
auto getOpenCLProgram(std::shared_ptr<OpenCLDevice> device, std::string name = "", std::string buildOptions = "") -> cl::Program
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)
auto getFloatAttribute(std::string id) -> float
auto getIntegerAttribute(std::string id) -> int
auto getBooleanAttribute(std::string id) -> bool
auto getStringAttribute(std::string id) -> std::string
auto getFloatListAttribute(std::string id) -> std::vector<float>
auto getIntegerListAttribute(std::string id) -> std::vector<int>
auto getBooleanListAttribute(std::string id) -> std::vector<bool>
auto getStringListAttribute(std::string id) -> std::vector<std::string>
void changeDeviceOnInputs(uint deviceNumber, ExecutionDevice::pointer device)
void validateInputPortExists(uint portID)
void validateOutputPortExists(uint portID)

Protected variables

bool mIsModified
int m_lastExecuteToken
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, InputPort> mInputPorts
std::unordered_map<uint, OutputPort> 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
bool m_executeOnLastFrameOnly

Function documentation

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

Update/Run the pipeline up to this process object.

executeToken Negative value means that the execute token is disabled.

Do update on this PO, which will trigger update on all connected POs thus running the entire pipeline.

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.

DataObject::pointer fast::ProcessObject::getOutputData(uint portID = 0)


Get current output data for a given port

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


Get current output data for a given port

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

Mark this process object as modified or not. A modified PO will execute next time it is updated.


void fast::ProcessObject::setExecuteOnLastFrameOnly(bool executeOnLastFrameOnly)


If set to true, this will only trigger this PO to execute if one of its inputs is marked as being "last frame". This is useful if one want to export the results of a PatchStitcher, but only when it is complete.