Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkSurfaceToImageFilter.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 mitkSurfaceToImageFilter_h
14 #define mitkSurfaceToImageFilter_h
15 
16 #include <MitkCoreExports.h>
17 #include <mitkCommon.h>
18 #include <mitkImageSource.h>
19 #include <mitkSurface.h>
20 
21 class vtkPolyData;
22 
23 namespace mitk
24 {
45  {
46  public:
48  itkFactorylessNewMacro(Self);
49  itkCloneMacro(Self);
50  itkSetMacro(MakeOutputBinary, bool);
51  itkGetMacro(MakeOutputBinary, bool);
52  itkBooleanMacro(MakeOutputBinary);
53 
54  itkSetMacro(UShortBinaryPixelType, bool);
55  itkGetMacro(UShortBinaryPixelType, bool);
56  itkBooleanMacro(UShortBinaryPixelType);
57 
58  itkGetConstMacro(BackgroundValue, float);
59  itkSetMacro(BackgroundValue, float);
60 
61  itkGetConstMacro(Tolerance, double);
62  itkSetMacro(Tolerance, double);
63 
66 
68  void GenerateOutputInformation() override;
69 
71  void GenerateData() override;
72 
77  const mitk::Surface *GetInput(void);
78 
79  using itk::ProcessObject::SetInput;
80 
86  virtual void SetInput(const mitk::Surface *surface);
87 
93  void SetImage(const mitk::Image *source);
94 
99  const mitk::Image *GetImage(void);
100 
101  protected:
103 
105 
111  void Stencil3DImage(int time = 0);
112 
115 
117  double m_Tolerance;
118  };
119 
128  MITKCORE_EXPORT mitk::Image::Pointer ConvertSurfaceToLabelMask(const mitk::Image* refImage, const mitk::Surface* surface);
129 
130 } // namespace mitk
131 
132 #endif
#define MITKCORE_EXPORT
Superclass of all classes generating Images (instances of class Image) as output.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
Converts surface data to pixel data.
virtual void SetInput(const mitk::Surface *surface)
Set the input surface to be converted.
void GenerateData() override
Perform the surface-to-image conversion.
void SetImage(const mitk::Image *source)
Set the reference image that defines the output geometry.
const mitk::Surface * GetInput(void)
Get the input surface.
const mitk::Image * GetImage(void)
Get the reference image.
void GenerateOutputInformation() override
Generate output information based on the input image.
mitkClassMacro(SurfaceToImageFilter, ImageSource)
void GenerateInputRequestedRegion() override
Generate the input requested region.
void Stencil3DImage(int time=0)
Perform the 3D stencil operation for the given time step.
Data class for storing polygonal surfaces (vtkPolyData).
Definition: mitkSurface.h:37
Find image slices visible on a given plane.
MITKCORE_EXPORT mitk::Image::Pointer ConvertSurfaceToLabelMask(const mitk::Image *refImage, const mitk::Surface *surface)
Convert a surface into a binary mask image suitable for use as segmentation label content.