Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkWatershedTool.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkWatershedTool_h_Included
18 #define mitkWatershedTool_h_Included
19 
21 #include "mitkCommon.h"
23 #include <itkImage.h>
24 
25 namespace us
26 {
27  class ModuleResource;
28 }
29 
30 namespace mitk
31 {
32  class Image;
33 
47  {
48  public:
50  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
51 
52  void SetThreshold(double t)
53  {
54  m_Threshold = t;
55  }
56 
57  void SetLevel(double l) { m_Level = l; }
61  void DoIt();
62 
69  template <typename TPixel, unsigned int VImageDimension>
70  void ITKWatershed(itk::Image<TPixel, VImageDimension> *originalImage, itk::SmartPointer<mitk::Image> &segmentation);
71 
72  const char **GetXPM() const override;
73  const char *GetName() const override;
74  us::ModuleResource GetIconResource() const override;
75 
76  protected:
77  WatershedTool(); // purposely hidden
78  virtual ~WatershedTool();
79 
80  virtual void Activated() override;
81  virtual void Deactivated() override;
82 
84  double m_Threshold;
86  double m_Level;
87  };
88 
89 } // namespace
90 
91 #endif
double m_Level
Threshold parameter of the ITK Watershed Image Filter. See ITK Documentation for more information...
Simple watershed segmentation tool.
void SetLevel(double l)
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
class ITK_EXPORT Image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Superclass for tool that create a new segmentation without user interaction in render windows...
static std::string GetName(std::string fileName, std::string suffix)
double m_Threshold
Threshold parameter of the ITK Watershed Image Filter. See ITK Documentation for more information...
Super-class that provides the functionality of a StateMachine to DataInteractors. ...