27 #include "WSegmentationAlgoWatershed.h"
31 WSegmentationAlgoWatershed::WSegmentationAlgoWatershed()
36 WSegmentationAlgoWatershed::~WSegmentationAlgoWatershed()
40 void WSegmentationAlgoWatershed::properties()
42 m_threshold = m_properties->addProperty(
"Threshold",
"Threshold in %.", 0.0, m_propCondition );
43 m_level = m_properties->addProperty(
"Level",
"Water level in %.", 0.0, m_propCondition );
44 m_iter = m_properties->addProperty(
"Iterations",
"Number of smoothing passes:", 10, m_propCondition );
45 m_conductance = m_properties->addProperty(
"Conductance",
"Conductance parameter for smoothing.", 1.0, m_propCondition );
46 m_conductance->setMax( 10.0 );
49 std::string WSegmentationAlgoWatershed::getName()
51 return "Watershed segmentation";
54 std::string WSegmentationAlgoWatershed::getDescription()
56 return "Use watersheds for segmentation.";
59 bool WSegmentationAlgoWatershed::propChanged()
61 return m_threshold->changed() || m_level->changed() || m_iter->changed() || m_conductance->changed();
66 return m_dataSet->getValueSet()->applyFunction( *
this );
A base class for segmentation alorithms.
std::shared_ptr< WDataSetScalar > DataSetPtr
A conveniant typedef.