Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkOtsuTool3D.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 #ifndef MITKOTSUTOOL3D_H
13 #define MITKOTSUTOOL3D_H
14 
15 #include "itkImage.h"
18 
19 namespace us
20 {
21  class ModuleResource;
22 }
23 
24 namespace mitk
25 {
26  class Image;
27 
29  {
30  public:
32  itkFactorylessNewMacro(Self);
33  itkCloneMacro(Self);
34 
35  const char *GetName() const override;
36  const char **GetXPM() const override;
37  us::ModuleResource GetIconResource() const override;
38 
39  void Activated() override;
40  void Deactivated() override;
41 
42  void RunSegmentation(int regions, bool useValley, int numberOfBins);
43  void ConfirmSegmentation();
44  // void UpdateBinaryPreview(int regionID);
45  void UpdateBinaryPreview(std::vector<int> regionIDs);
46  void UpdateVolumePreview(bool volumeRendering);
47  void ShowMultiLabelResultNode(bool);
48 
49  int GetNumberOfBins();
50 
51  protected:
52  OtsuTool3D();
53  ~OtsuTool3D() override;
54 
55  template <typename TPixel, unsigned int VImageDimension>
56  void CalculatePreview(itk::Image<TPixel, VImageDimension> *itkImage, std::vector<int> regionIDs);
57 
59  // holds the user selected binary segmentation
61  // holds the multilabel result as a preview image
63  // holds the user selected binary segmentation masked original image
65 
66  }; // class
67 } // namespace
68 #endif
mitk::DataNode::Pointer m_MultiLabelResultNode
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
mitk::DataNode::Pointer m_MaskedImagePreviewNode
class ITK_EXPORT Image
itk::SmartPointer< Image > m_OriginalImage
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Superclass for tool that create a new segmentation without user interaction in render windows...
mitk::DataNode::Pointer m_BinaryPreviewNode
static std::string GetName(std::string fileName, std::string suffix)
Super-class that provides the functionality of a StateMachine to DataInteractors. ...