Medical Imaging Interaction Toolkit  2016.11.0
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,
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 #ifndef MITKOTSUTOOL3D_H
17 #define MITKOTSUTOOL3D_H
18 
19 #include "itkImage.h"
22 
23 namespace us
24 {
25  class ModuleResource;
26 }
27 
28 namespace mitk
29 {
30  class Image;
31 
33  {
34  public:
36  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
37 
38  virtual const char *GetName() const override;
39  virtual const char **GetXPM() const override;
40  us::ModuleResource GetIconResource() const override;
41 
42  virtual void Activated() override;
43  virtual void Deactivated() override;
44 
45  void RunSegmentation(int regions, bool useValley, int numberOfBins);
46  void ConfirmSegmentation();
47  // void UpdateBinaryPreview(int regionID);
48  void UpdateBinaryPreview(std::vector<int> regionIDs);
49  void UpdateVolumePreview(bool volumeRendering);
50  void ShowMultiLabelResultNode(bool);
51 
52  int GetNumberOfBins();
53 
54  protected:
55  OtsuTool3D();
56  virtual ~OtsuTool3D();
57 
58  template <typename TPixel, unsigned int VImageDimension>
59  void CalculatePreview(itk::Image<TPixel, VImageDimension> *itkImage, std::vector<int> regionIDs);
60 
62  // holds the user selected binary segmentation
64  // holds the multilabel result as a preview image
66  // holds the user selected binary segmentation masked original image
68 
69  }; // class
70 } // namespace
71 #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:44
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. ...