Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkLabeledImageToSurfaceFilter.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 mitkLabeledImageToSurfaceFilter_h
14 #define mitkLabeledImageToSurfaceFilter_h
15 
17 #include <map>
19 #include <vtkImageData.h>
20 
21 namespace mitk
22 {
41  {
42  public:
44 
45  itkFactorylessNewMacro(Self);
46 
47  itkCloneMacro(Self);
48 
49  typedef int LabelType;
50 
51  typedef std::map<LabelType, unsigned long> LabelMapType;
52 
53  typedef std::map<unsigned int, LabelType> IdxToLabelMapType;
54 
60  itkSetMacro(GenerateAllLabels, bool);
61 
66  itkGetMacro(GenerateAllLabels, bool);
67 
68  itkBooleanMacro(GenerateAllLabels);
69 
75  itkSetMacro(Label, LabelType);
76 
82  itkGetMacro(Label, LabelType);
83 
88  itkSetMacro(BackgroundLabel, LabelType);
89 
94  itkGetMacro(BackgroundLabel, LabelType);
95 
100  itkSetMacro(GaussianStandardDeviation, double);
101 
106  itkGetMacro(GaussianStandardDeviation, double);
107 
116  LabelType GetLabelForNthOutput(const unsigned int &i);
117 
124  mitk::ScalarType GetVolumeForNthOutput(const unsigned int &i);
125 
135 
136  protected:
138 
140 
142 
144 
146 
148 
149  void GenerateData() override;
150 
151  void GenerateOutputInformation() override;
152 
153  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label);
154 
156 
158 
160 
161  private:
162  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold);
163  };
164 
165 } // end of namespace mitk
166 
167 #endif
#define MITKALGORITHMSEXT_EXPORT
Converts pixel data to surface data by using a threshold.
A data structure describing a label in a multi-label segmentation.
Definition: mitkLabel.h:101
Generates surface representations from labeled (segmented) images.
std::map< LabelType, unsigned long > LabelMapType
mitk::ScalarType GetVolumeForNthOutput(const unsigned int &i)
mitkClassMacro(LabeledImageToSurfaceFilter, ImageToSurfaceFilter)
void GenerateOutputInformation() override
virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label)
virtual LabelMapType GetAvailableLabels()
std::map< unsigned int, LabelType > IdxToLabelMapType
mitk::ScalarType GetVolumeForLabel(const LabelType &label)
LabelType GetLabelForNthOutput(const unsigned int &i)
Data class for storing polygonal surfaces (vtkPolyData).
Definition: mitkSurface.h:37
Find image slices visible on a given plane.
double ScalarType
Scalar type used throughout MITK for geometric computations.