Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkMultiLabelSurfaceNetsExtractor.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 mitkMultiLabelSurfaceNetsExtractor_h
14 #define mitkMultiLabelSurfaceNetsExtractor_h
15 
16 #include <MitkMultilabelExports.h>
17 #include <mitkLabelSetImage.h>
18 
19 #include <vtkSmartPointer.h>
20 
21 #include <map>
22 #include <vector>
23 
24 class vtkImageData;
25 class vtkMatrix4x4;
26 class vtkPolyData;
27 class vtkPolyDataNormals;
28 class vtkSurfaceNets3D;
29 
30 namespace mitk
31 {
32  class BaseGeometry;
51  {
52  public:
54 
57 
60 
67  void SetSmoothing(bool smoothing);
68  bool GetSmoothing() const;
69 
79  vtkImageData* groupImage,
80  const std::vector<LabelValueType>& labelValues);
81 
90  std::map<LabelValueType, vtkSmartPointer<vtkPolyData>> ExtractPerLabel(
91  vtkImageData* groupImage,
92  const std::vector<LabelValueType>& labelValues);
93 
105 
106  private:
107  void ConfigureLabels(const std::vector<LabelValueType>& labelValues);
108 
109  vtkSmartPointer<vtkSurfaceNets3D> m_SurfaceNets;
110  vtkSmartPointer<vtkPolyDataNormals> m_NormalsFilter;
111  bool m_Smoothing;
112  };
113 
114 } // namespace mitk
115 
116 #endif
#define MITKMULTILABEL_EXPORT
Abstract base class describing the geometry of a data object.
mitk::Label::PixelType LabelValueType
Extracts label-boundary polygonal surfaces from a multi-label segmentation group image using vtkSurfa...
MultiLabelSurfaceNetsExtractor & operator=(const MultiLabelSurfaceNetsExtractor &)=delete
static vtkSmartPointer< vtkMatrix4x4 > GetImageToWorldMatrix(const BaseGeometry *geometry)
Build the image-local-frame to world-frame transform for the polydata produced by Extract.
vtkSmartPointer< vtkPolyData > Extract(vtkImageData *groupImage, const std::vector< LabelValueType > &labelValues)
Extract the boundary surface for the given labels of a single group image.
std::map< LabelValueType, vtkSmartPointer< vtkPolyData > > ExtractPerLabel(vtkImageData *groupImage, const std::vector< LabelValueType > &labelValues)
Per-label variant. Returns one polydata per label, restricted to that label's exterior faces (vtkSurf...
void SetSmoothing(bool smoothing)
Set whether constrained smoothing is applied.
MultiLabelSegmentation::LabelValueType LabelValueType
MultiLabelSurfaceNetsExtractor(const MultiLabelSurfaceNetsExtractor &)=delete
Find image slices visible on a given plane.