Medical Imaging Interaction Toolkit  2025.12.02
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 {
35  {
36  public:
38 
39  itkFactorylessNewMacro(Self);
40 
41  itkCloneMacro(Self);
42 
43  typedef int LabelType;
44 
45  typedef std::map<LabelType, unsigned long> LabelMapType;
46 
47  typedef std::map<unsigned int, LabelType> IdxToLabelMapType;
48 
54  itkSetMacro(GenerateAllLabels, bool);
55 
60  itkGetMacro(GenerateAllLabels, bool);
61 
62  itkBooleanMacro(GenerateAllLabels);
63 
69  itkSetMacro(Label, LabelType);
70 
76  itkGetMacro(Label, LabelType);
77 
82  itkSetMacro(BackgroundLabel, LabelType);
83 
88  itkGetMacro(BackgroundLabel, LabelType);
89 
94  itkSetMacro(GaussianStandardDeviation, double);
95 
100  itkGetMacro(GaussianStandardDeviation, double);
101 
110  LabelType GetLabelForNthOutput(const unsigned int &i);
111 
118  mitk::ScalarType GetVolumeForNthOutput(const unsigned int &i);
119 
129 
130  protected:
132 
134 
136 
138 
140 
142 
143  void GenerateData() override;
144 
145  void GenerateOutputInformation() override;
146 
147  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, LabelType label);
148 
150 
152 
154 
155  private:
156  virtual void CreateSurface(int time, vtkImageData *vtkimage, mitk::Surface *surface, const ScalarType threshold);
157  };
158 
159 } // end of namespace mitk
160 
161 #endif
#define MITKALGORITHMSEXT_EXPORT
Converts pixel data to surface data by using a threshold The mitkImageToSurfaceFilter is used to crea...
A data structure describing a label.
Definition: mitkLabel.h:90
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)
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:29
Find image slices visible on a given plane.
double ScalarType