OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WSegmentationAlgo Class Referenceabstract

A base class for segmentation alorithms. More...

#include <WSegmentationAlgo.h>

+ Inheritance diagram for WSegmentationAlgo:
+ Collaboration diagram for WSegmentationAlgo:

Public Types

typedef std::shared_ptr< WDataSetScalarDataSetPtr
 A conveniant typedef. More...
 

Public Member Functions

 WSegmentationAlgo ()
 Standard constructor. More...
 
virtual ~WSegmentationAlgo ()
 Destructor. More...
 
std::shared_ptr< WConditiongetCondition ()
 Return a condition that indicates changes to the properties. More...
 
virtual std::string getName ()=0
 Return the name of this algorithm. More...
 
virtual std::string getDescription ()=0
 Return a description of this algorithm. More...
 
void initProperties (WPropGroup group)
 Initialize all properties for this algorithm. More...
 
DataSetPtr segment (DataSetPtr dataset)
 This is called to trigger the actual segmentation in the segmentation module. More...
 
virtual bool propChanged ()=0
 Checks if any properties were changed. More...
 
void hideProperties (bool hide)
 Tell the property group to hide itself. More...
 

Protected Member Functions

virtual DataSetPtr applyOperation ()=0
 A virtual function that calls the correct segmentation operation. More...
 
virtual void properties ()=0
 Initialize your algorithms properties here. More...
 

Protected Attributes

WPropGroup m_properties
 The property group of this segmentation algorithm. More...
 
std::shared_ptr< WConditionm_propCondition
 The condition indicating changed to the properties. More...
 
DataSetPtr m_dataSet
 A pointer to the currently processed dataset. More...
 

Detailed Description

A base class for segmentation alorithms.

Definition at line 42 of file WSegmentationAlgo.h.

Member Typedef Documentation

◆ DataSetPtr

typedef std::shared_ptr< WDataSetScalar > WSegmentationAlgo::DataSetPtr

A conveniant typedef.

Definition at line 46 of file WSegmentationAlgo.h.

Constructor & Destructor Documentation

◆ WSegmentationAlgo()

WSegmentationAlgo::WSegmentationAlgo ( )

Standard constructor.

Definition at line 30 of file WSegmentationAlgo.cpp.

◆ ~WSegmentationAlgo()

WSegmentationAlgo::~WSegmentationAlgo ( )
virtual

Destructor.

Definition at line 37 of file WSegmentationAlgo.cpp.

Member Function Documentation

◆ applyOperation()

virtual DataSetPtr WSegmentationAlgo::applyOperation ( )
protectedpure virtual

A virtual function that calls the correct segmentation operation.

Returns
The resulting dataset.

Implemented in WSegmentationAlgoThreshold.

Referenced by segment().

+ Here is the caller graph for this function:

◆ getCondition()

std::shared_ptr< WCondition > WSegmentationAlgo::getCondition ( )

Return a condition that indicates changes to the properties.

Returns
The condition.

Definition at line 41 of file WSegmentationAlgo.cpp.

References m_propCondition.

◆ getDescription()

virtual std::string WSegmentationAlgo::getDescription ( )
pure virtual

Return a description of this algorithm.

Returns
A description.

Implemented in WSegmentationAlgoThreshold.

◆ getName()

virtual std::string WSegmentationAlgo::getName ( )
pure virtual

Return the name of this algorithm.

Returns
The name.

Implemented in WSegmentationAlgoThreshold.

◆ hideProperties()

void WSegmentationAlgo::hideProperties ( bool  hide)

Tell the property group to hide itself.

Parameters
hideIf true, the group will be hidden.

Definition at line 64 of file WSegmentationAlgo.cpp.

References m_properties.

◆ initProperties()

void WSegmentationAlgo::initProperties ( WPropGroup  group)

Initialize all properties for this algorithm.

This will call the respective properties() function.

Parameters
groupThe property group all new properties should be added to.

Definition at line 46 of file WSegmentationAlgo.cpp.

References m_properties, and properties().

+ Here is the call graph for this function:

◆ propChanged()

virtual bool WSegmentationAlgo::propChanged ( )
pure virtual

Checks if any properties were changed.

Returns
True, iff any properties were changed.

Implemented in WSegmentationAlgoThreshold.

◆ properties()

virtual void WSegmentationAlgo::properties ( )
protectedpure virtual

Initialize your algorithms properties here.

Implemented in WSegmentationAlgoThreshold.

Referenced by initProperties().

+ Here is the caller graph for this function:

◆ segment()

WSegmentationAlgo::DataSetPtr WSegmentationAlgo::segment ( DataSetPtr  dataset)

This is called to trigger the actual segmentation in the segmentation module.

Parameters
datasetThe input dataset for segmentation.
Returns
The segmentation result.

Definition at line 55 of file WSegmentationAlgo.cpp.

References applyOperation(), and m_dataSet.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_dataSet

DataSetPtr WSegmentationAlgo::m_dataSet
protected

A pointer to the currently processed dataset.

Definition at line 125 of file WSegmentationAlgo.h.

Referenced by WSegmentationAlgoThreshold::applyOperation(), WSegmentationAlgoThreshold::operator()(), and segment().

◆ m_propCondition

std::shared_ptr< WCondition > WSegmentationAlgo::m_propCondition
protected

The condition indicating changed to the properties.

Definition at line 122 of file WSegmentationAlgo.h.

Referenced by getCondition(), and WSegmentationAlgoThreshold::properties().

◆ m_properties

WPropGroup WSegmentationAlgo::m_properties
protected

The property group of this segmentation algorithm.

Definition at line 119 of file WSegmentationAlgo.h.

Referenced by hideProperties(), initProperties(), and WSegmentationAlgoThreshold::properties().


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