Medical Imaging Interaction Toolkit  2026.06.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 mitkShowSegmentationAsSurface_h
14 #define mitkShowSegmentationAsSurface_h
15 
16 #include <mitkSegmentationSink.h>
17 #include <mitkSurface.h>
18 #include <mitkUIDGenerator.h>
20 
21 namespace mitk
22 {
33  {
34  public:
37 
38  protected:
39  ShowSegmentationAsSurface(); // use smart pointers
41 
42  void Initialize(const NonBlockingAlgorithm *other = nullptr) override;
43  bool ReadyToRun() override;
44 
45  bool ThreadedUpdateFunction() override; // will be called from a thread after calling StartAlgorithm
46 
47  void ThreadedUpdateSuccessful() override; // will be called from a thread after calling StartAlgorithm
48 
49  private:
50  mitk::Surface::Pointer ConvertBinaryImageToSurface(mitk::Image::Pointer binaryImage);
51 
52  UIDGenerator m_UIDGeneratorSurfaces;
53 
54  std::vector<DataNode::Pointer> m_SurfaceNodes;
55  bool m_IsLabelSetImage;
56  };
57 
58 } // namespace
59 
60 #endif
#define MITKSEGMENTATION_EXPORT
Base class for algorithms that can run in a background thread.
A NonBlockingAlgorithm that places segmentation results into the DataStorage.
Converts a segmentation image to a surface representation and adds it to the DataStorage.
bool ThreadedUpdateFunction() override
void Initialize(const NonBlockingAlgorithm *other=nullptr) override
void ThreadedUpdateSuccessful() override
mitkClassMacro(ShowSegmentationAsSurface, SegmentationSink)
mitkAlgorithmNewMacro(ShowSegmentationAsSurface)
Generates unique identifier strings.
Find image slices visible on a given plane.