![]() |
OpenWalnut
1.5.0dev
|
A very simple threshold segmentation working in two modi: If in LOWER_THRESHOLD mode than voxels that have a value smaller than the threshold are set to 0, while the rest of the voxels are set to 1 where as in UPPER_THRESHOLD mode the opposite applies. More...
#include <WSegmentationAlgoThreshold.h>
Inheritance diagram for WSegmentationAlgoThreshold:
Collaboration diagram for WSegmentationAlgoThreshold:Public Member Functions | |
| WSegmentationAlgoThreshold () | |
| Standard constructor. More... | |
| virtual | ~WSegmentationAlgoThreshold () |
| Destructor. More... | |
| virtual std::string | getName () |
| Return the name of this algorithm. More... | |
| virtual std::string | getDescription () |
| Return a description of this algorithm. More... | |
| virtual bool | propChanged () |
| Checks if any properties were changed. More... | |
| template<typename T > | |
| DataSetPtr | operator() (WValueSet< T > const *valueset) const |
| Implements the operation. More... | |
| template<typename T > | |
| WSegmentationAlgo::DataSetPtr | operator() (WValueSet< T > const *valueset) const |
| This function call operator can be called by a visitor. More... | |
Public Member Functions inherited from WSegmentationAlgo | |
| WSegmentationAlgo () | |
| Standard constructor. More... | |
| virtual | ~WSegmentationAlgo () |
| Destructor. More... | |
| std::shared_ptr< WCondition > | getCondition () |
| Return a condition that indicates changes to the properties. 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... | |
| void | hideProperties (bool hide) |
| Tell the property group to hide itself. More... | |
Private Member Functions | |
| virtual void | properties () |
| Initializes the algorithm's properties. More... | |
| virtual DataSetPtr | applyOperation () |
| A virtual function that calls the correct segmentation operation. More... | |
Private Attributes | |
| WPropDouble | m_low_threshold |
| The lower threshold in %. More... | |
| WPropDouble | m_upp_threshold |
| The upper threshold in %. More... | |
| WPropBool | m_binarize |
| Whether the values inside range of thresholds should be keept, or resulting images should contain only 0 or 1 values (binarized). More... | |
Additional Inherited Members | |
Public Types inherited from WSegmentationAlgo | |
| typedef std::shared_ptr< WDataSetScalar > | DataSetPtr |
| A conveniant typedef. More... | |
Protected Attributes inherited from WSegmentationAlgo | |
| WPropGroup | m_properties |
| The property group of this segmentation algorithm. More... | |
| std::shared_ptr< WCondition > | m_propCondition |
| The condition indicating changed to the properties. More... | |
| DataSetPtr | m_dataSet |
| A pointer to the currently processed dataset. More... | |
A very simple threshold segmentation working in two modi: If in LOWER_THRESHOLD mode than voxels that have a value smaller than the threshold are set to 0, while the rest of the voxels are set to 1 where as in UPPER_THRESHOLD mode the opposite applies.
Definition at line 41 of file WSegmentationAlgoThreshold.h.
| WSegmentationAlgoThreshold::WSegmentationAlgoThreshold | ( | ) |
Standard constructor.
Definition at line 29 of file WSegmentationAlgoThreshold.cpp.
|
virtual |
Destructor.
Definition at line 34 of file WSegmentationAlgoThreshold.cpp.
|
privatevirtual |
A virtual function that calls the correct segmentation operation.
Implements WSegmentationAlgo.
Definition at line 66 of file WSegmentationAlgoThreshold.cpp.
References WSegmentationAlgo::m_dataSet.
|
virtual |
Return a description of this algorithm.
Implements WSegmentationAlgo.
Definition at line 56 of file WSegmentationAlgoThreshold.cpp.
|
virtual |
Return the name of this algorithm.
Implements WSegmentationAlgo.
Definition at line 51 of file WSegmentationAlgoThreshold.cpp.
| DataSetPtr WSegmentationAlgoThreshold::operator() | ( | WValueSet< T > const * | valueset | ) | const |
Implements the operation.
| The | type of the values in the dataset's valueset. |
| valueset | The dataset's valueset. |
| WSegmentationAlgo::DataSetPtr WSegmentationAlgoThreshold::operator() | ( | WValueSet< T > const * | valueset | ) | const |
This function call operator can be called by a visitor.
It performs the actual segmentation as mentioned in the description of this class
| valueset | operator will work on this set of values |
Definition at line 114 of file WSegmentationAlgoThreshold.h.
References WValueSet< T >::getMaximumValue(), WValueSet< T >::getMinimumValue(), WValueSet< T >::getScalar(), m_binarize, WSegmentationAlgo::m_dataSet, m_low_threshold, m_upp_threshold, and WValueSet< T >::size().
Here is the call graph for this function:
|
virtual |
Checks if any properties were changed.
Implements WSegmentationAlgo.
Definition at line 61 of file WSegmentationAlgoThreshold.cpp.
References m_binarize, m_low_threshold, and m_upp_threshold.
|
privatevirtual |
Initializes the algorithm's properties.
Implements WSegmentationAlgo.
Definition at line 38 of file WSegmentationAlgoThreshold.cpp.
References m_binarize, m_low_threshold, WSegmentationAlgo::m_propCondition, WSegmentationAlgo::m_properties, and m_upp_threshold.
|
private |
Whether the values inside range of thresholds should be keept, or resulting images should contain only 0 or 1 values (binarized).
Definition at line 104 of file WSegmentationAlgoThreshold.h.
Referenced by operator()(), propChanged(), and properties().
|
private |
The lower threshold in %.
Definition at line 95 of file WSegmentationAlgoThreshold.h.
Referenced by operator()(), propChanged(), and properties().
|
private |
The upper threshold in %.
Definition at line 98 of file WSegmentationAlgoThreshold.h.
Referenced by operator()(), propChanged(), and properties().