Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
Medical Imaging Interaction Toolkit
mitkAutoSegmentationTool.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 mitkAutoSegmentationTool_h_Included
14 #define mitkAutoSegmentationTool_h_Included
15 
16 #include "mitkCommon.h"
17 #include "mitkTool.h"
19 
20 namespace mitk
21 {
22  class Image;
23 
30  {
31  public:
33 
34  void Activated() override;
35  void Deactivated() override;
36 
41  void SetOverwriteExistingSegmentation(bool overwrite);
42 
48  std::string GetCurrentSegmentationName();
49 
58  virtual DataNode *GetTargetSegmentationNode() const;
59 
60  protected:
61  AutoSegmentationTool(); // purposely hidden
62  AutoSegmentationTool(const char* interactorType, const us::Module* interactorModule = nullptr); // purposely hidden
63  ~AutoSegmentationTool() override;
64 
65  const char *GetGroup() const override;
66 
68  static Image::ConstPointer GetImageByTimeStep(const Image* image, unsigned int timestep);
70  static Image::ConstPointer GetImageByTimePoint(const Image* image, TimePointType timePoint);
71 
72  void EnsureTargetSegmentationNodeInDataStorage() const;
73 
75 
76  private:
79  mutable DataNode::Pointer m_NoneOverwriteTargetSegmentationNode;
80  };
81 
82 } // namespace
83 
84 #endif
Base class of all tools used by mitk::ToolManager.
Definition: mitkTool.h:86
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
class ITK_EXPORT Image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Image class for storing images.
Definition: mitkImage.h:69
Superclass for tool that create a new segmentation without user interaction in render windows...
mitk::ScalarType TimePointType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57