Medical Imaging Interaction Toolkit  2021.10.00
Medical Imaging Interaction Toolkit
mitkShowSegmentationAsSurface.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 MITK_SHOW_SEGMENTATION_AS_SURFACE_H_INCLUDET_WAD
14 #define MITK_SHOW_SEGMENTATION_AS_SURFACE_H_INCLUDET_WAD
15 
16 #include "mitkSegmentationSink.h"
17 #include "mitkSurface.h"
18 #include "mitkUIDGenerator.h"
20 
21 namespace mitk
22 {
24  {
25  public:
28 
29  protected:
30  ShowSegmentationAsSurface(); // use smart pointers
31  ~ShowSegmentationAsSurface() override;
32 
33  void Initialize(const NonBlockingAlgorithm *other = nullptr) override;
34  bool ReadyToRun() override;
35 
36  bool ThreadedUpdateFunction() override; // will be called from a thread after calling StartAlgorithm
37 
38  void ThreadedUpdateSuccessful() override; // will be called from a thread after calling StartAlgorithm
39 
40  private:
41  mitk::Surface::Pointer ConvertBinaryImageToSurface(mitk::Image::Pointer binaryImage);
42 
43  UIDGenerator m_UIDGeneratorSurfaces;
44 
45  std::vector<DataNode::Pointer> m_SurfaceNodes;
46  bool m_IsLabelSetImage;
47  };
48 
49 } // namespace
50 
51 #endif
#define mitkAlgorithmNewMacro(classname)
Generated unique IDs.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36