Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkWatershedTool_h_Included
14 #define mitkWatershedTool_h_Included
15 
17 #include "mitkCommon.h"
19 #include <itkImage.h>
20 
21 namespace us
22 {
23  class ModuleResource;
24 }
25 
26 namespace mitk
27 {
28  class Image;
29 
43  {
44  public:
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self);
48 
49  void SetThreshold(double t)
50  {
51  m_Threshold = t;
52  }
53 
54  void SetLevel(double l) { m_Level = l; }
58  void DoIt();
59 
66  template <typename TPixel, unsigned int VImageDimension>
67  void ITKWatershed(const itk::Image<TPixel, VImageDimension> *originalImage, itk::SmartPointer<mitk::Image> &segmentation);
68 
69  const char **GetXPM() const override;
70  const char *GetName() const override;
71  us::ModuleResource GetIconResource() const override;
72 
73  protected:
74  WatershedTool(); // purposely hidden
75  ~WatershedTool() override;
76 
77  void Activated() override;
78  void Deactivated() override;
79 
81  double m_Threshold;
83  double m_Level;
84  };
85 
86 } // namespace
87 
88 #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:40
Superclass for tool that create a new segmentation without user interaction in render windows...
static std::string GetName(std::string fileName, std::string suffix)
void SetThreshold(double t)
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. ...