fast::ProcessObject class

Abstract base class for all process objects.

Base classes

class AttributeObject

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 ApplyColormap
Applies a colormap on an image to create a new image.
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 ColorToGrayscale
class Concatenate
Concatenate two images or two tensors.
class Dilation
Perform binary dilation with disk structuring element.
class EmptyProcessObject
class EnvelopeAndLogCompressor
Performs normalized envelope detection and log compression on IQ data.
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 GrayscaleToColor
class HounsefieldConverter
Converts input image to Hounsefield units (if needed)
class ImageAdd
Add two images.
class ImageCaster
Cast image to another data type.
class ImageChannelConverter
Remove and/or reverse channels from an image.
class ImageCropper
Process object from cropping an image.
class ImageFlipper
Flip images.
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 ImagePyramidLevelExtractor
Extract a level of an image pyramid as an image.
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 ImageTransposer
Transpose images.
class ImageWeightedMovingAverage
Temporal smoothing of image using weighted moving average.
class Importer
Abstract base class for Importers.
class IntensityClipping
Clips the pixel intensities of an image to specific values.
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
Synchronize multiple process objects This PO takes in N input connections and creates N output connections. It keeps the last frame of every connection, and every time a connection has a new data frame, it send out the latest frame to all output connections.
class Plotter
class RegionProperties
Calculate properties, such as area, contour and centroid, for every segmentation region.
class Renderer
Abstract base class for Renderers.
class RenderToImage
Render to an image.
class RidgeTraversalCenterlineExtraction
Extract 3D centerline by following ridge.
class RunLambda
Run a C++ lambda in a FAST pipeline.
class RunUntilFinished
Calls run on parent PO until output is marked as last frame.
class ScanConverter
Scan convert beamspace image.
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 StartTimer
class StopTimer
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
Convert a tensor to a set of bounding boxes.
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 VertexTensorToSegmentation
Convert a tensor of vertex positions (graph) to a segmentation.
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.
class ZeroMeanUnitVariance
Normalize intensities of an image to have zero mean and unit variance.

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
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, int64_t executeToken = -1) -> std::shared_ptr<DataType>
auto runAndGetOutputData(uint portID = 0, int64_t executeToken = -1) -> std::shared_ptr<DataObject>
void run(int64_t 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
auto attributesToString() -> std::string virtual
Convert attributes to string.
auto hasReceivedLastFrameFlag() const -> bool
Whether this PO has received input data with last frame flag set.

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 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::map<uint, bool> mRequiredInputs
std::map<uint, std::vector<uint>> mInputDevices
std::map<uint, ExecutionDevice::pointer> mDevices
std::map<uint, DeviceCriteria> mDeviceCriteria
std::map<uint, DataChannel::pointer> mInputConnections
std::map<uint, std::vector<std::weak_ptr<DataChannel>>> mOutputConnections
std::map<uint, InputPort> mInputPorts
std::map<uint, OutputPort> mOutputPorts
std::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::string> m_frameData
std::unordered_set<std::string> m_lastFrame
int m_maximumNrOfFrames
bool m_executeOnLastFrameOnly
std::mutex m_mutex

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.