FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fast::BlockMatching Class Reference

#include <BlockMatching.hpp>

+ Inheritance diagram for fast::BlockMatching:
+ Collaboration diagram for fast::BlockMatching:

Public Types

enum  MatchingMetric { MatchingMetric::NORMALIZED_CROSS_CORRELATION, MatchingMetric::SUM_OF_SQUARED_DIFFERENCES, MatchingMetric::SUM_OF_ABSOLUTE_DIFFERENCES }
 
- Public Types inherited from fast::ProcessObject
typedef std::shared_ptr< ProcessObjectpointer
 
- Public Types inherited from fast::Object
typedef std::shared_ptr< Objectpointer
 

Public Member Functions

void setMatchingMetric (MatchingMetric type)
 
void setBlockSize (int size)
 
void setSearchSize (int size)
 
void setIntensityThreshold (float value)
 
void setTimeLag (int timeLag)
 
void setForwardBackwardTracking (bool forwardBackward)
 
void setRegionOfInterest (Vector2i offset, Vector2i size)
 
void loadAttributes () override
 
- 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 std::string getNameOfClass () const =0
 
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 MatchingMetric stringToMetric (std::string name)
 
- Static Public Member Functions inherited from fast::ProcessObject
static std::string getStaticNameOfClass ()
 
- Static Public Member Functions inherited from fast::Object
static std::string getStaticNameOfClass ()
 

Additional Inherited Members

- Protected Member Functions inherited from fast::ProcessObject
 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< 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 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
 

Detailed Description

2D block matching on the GPU. Input is a stream of input images, output is a stream of images with 2 channels giving the x,y motion of each pixel.

Member Enumeration Documentation

◆ MatchingMetric

Enumerator
NORMALIZED_CROSS_CORRELATION 
SUM_OF_SQUARED_DIFFERENCES 
SUM_OF_ABSOLUTE_DIFFERENCES 

Member Function Documentation

◆ loadAttributes()

void fast::BlockMatching::loadAttributes ( )
overridevirtual

Reimplemented from fast::ProcessObject.

◆ setBlockSize()

void fast::BlockMatching::setBlockSize ( int  size)

Set size of the blocks to match. Has to be odd

Parameters
size

◆ setForwardBackwardTracking()

void fast::BlockMatching::setForwardBackwardTracking ( bool  forwardBackward)

Set whether to use forward-backward tracking or not. Disabled by default.

Parameters
forwardBackward

◆ setIntensityThreshold()

void fast::BlockMatching::setIntensityThreshold ( float  value)

Set an intensity threshold, do not do block matching on pixels where the mean of the block is below this threhsold.

Parameters
value

◆ setMatchingMetric()

void fast::BlockMatching::setMatchingMetric ( MatchingMetric  type)

Select which matching metric to use

Parameters
type

◆ setRegionOfInterest()

void fast::BlockMatching::setRegionOfInterest ( Vector2i  offset,
Vector2i  size 
)

Set a region of interest (ROI) to run the block matching in.

Parameters
offsetfrom origin to start the ROI in pixels
sizeof the ROI in pixels

◆ setSearchSize()

void fast::BlockMatching::setSearchSize ( int  size)

Set size of search grid around x,y. Has to be odd

Parameters
size

◆ setTimeLag()

void fast::BlockMatching::setTimeLag ( int  timeLag)

Set time lag of block matching. A time lag of 2 will use frame t, and t-2 for block matching. Default is 1

Parameters
timeLag

◆ stringToMetric()

static MatchingMetric fast::BlockMatching::stringToMetric ( std::string  name)
inlinestatic

Convert string of metric to type

Parameters
name
Returns
MatchingMetric

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