25 #ifndef WMSCALARSEGMENTATION_H
26 #define WMSCALARSEGMENTATION_H
32 #include "WSegmentationAlgoLevelSetCanny.h"
33 #include "WSegmentationAlgoOtsu.h"
34 #include "WSegmentationAlgoRegionGrowingConfidenceConnected.h"
35 #include "WSegmentationAlgoThreshold.h"
36 #include "WSegmentationAlgoWatershed.h"
37 #include "core/common/WItemSelection.h"
38 #include "core/common/WItemSelector.h"
39 #include "core/dataHandler/WDataHandler.h"
40 #include "core/dataHandler/WDataSetScalar.h"
41 #include "core/kernel/WModule.h"
42 #include "core/kernel/WModuleInputData.h"
43 #include "core/kernel/WModuleOutputData.h"
68 virtual const std::string
getName()
const;
82 virtual std::shared_ptr< WModule >
factory()
const;
114 typedef std::vector< std::shared_ptr< WSegmentationAlgo > >
AlgoList;
122 std::shared_ptr< WModuleInputData< WDataSetScalar > >
m_input;
125 std::shared_ptr< WModuleOutputData< WDataSetScalar > >
m_output;
First version of a module that implements 3D-image segmentation algorithms.
virtual void properties()
Initialize the properties for this module.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
void doSegmentation()
Do a segmentation depending on the current module property values.
virtual void connectors()
Initialize the connectors this module is using.
std::vector< std::shared_ptr< WSegmentationAlgo > > AlgoList
A List type for all available algorithms.
virtual void moduleMain()
Entry point after loading the module.
virtual void activate()
Callback for m_active.
std::shared_ptr< WModuleInputData< WDataSetScalar > > m_input
An input connector used to get datasets from other modules.
std::shared_ptr< WItemSelection > m_algoSelection
A list of possible segmentation algorithms.
AlgoList m_algos
A list of algorithm objects.
virtual std::shared_ptr< WModule > factory() const
Return a new instance of this module.
WMScalarSegmentation()
Default constructor.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual const std::string getDescription() const
Return a description of this module.
virtual ~WMScalarSegmentation()
Destructor.
virtual const std::string getName() const
Return the name of this module.
WPropSelection m_algoType
A selection box for segmentation algorithms.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
The output connector used to provide the calculated data to other modules.
std::shared_ptr< WDataSetScalar > m_dataSet
This is a pointer to the dataset the module is currently working on.
std::size_t m_algoIndex
The number of the currently selected segmentation method.
std::shared_ptr< WDataSetScalar > m_result
This is a pointer to the segmented dataset.
Class representing a single module of OpenWalnut.