Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkHeightFieldSurfaceClipImageFilter.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 mitkHeightFieldSurfaceClipImageFilter_h
14 #define mitkHeightFieldSurfaceClipImageFilter_h
15 
17 #include "mitkCommon.h"
18 #include "mitkGeometry3D.h"
19 #include "mitkImageTimeSelector.h"
20 #include "mitkImageToImageFilter.h"
21 #include "mitkSurface.h"
22 
23 namespace itk
24 {
25  template <class TPixel, unsigned int VImageDimension>
26  class ITK_EXPORT Image;
27 }
28 
29 namespace mitk
30 {
44  {
45  public:
46  typedef std::vector<mitk::Surface *> ClippingPlaneList;
47 
49 
50  itkFactorylessNewMacro(Self);
51 
52  itkCloneMacro(Self);
53 
55  void SetClippingSurface(Surface *clippingSurface);
56 
59 
61  const Surface *GetClippingSurface() const;
62 
63  enum
64  {
65  CLIPPING_MODE_CONSTANT = 0,
67  CLIPPING_MODE_MULTIPLANE
68  };
69 
72  void SetClippingMode(int mode);
73 
77 
81 
85 
87 
89  itkSetMacro(ClippingConstant, ScalarType);
90 
92  itkGetConstMacro(ClippingConstant, ScalarType);
93 
95  itkSetMacro(MultiplicationFactor, ScalarType);
96 
98  itkGetConstMacro(MultiplicationFactor, ScalarType);
99 
101  itkSetMacro(HeightFieldResolutionX, unsigned int);
102 
104  itkGetConstMacro(HeightFieldResolutionX, unsigned int);
105 
107  itkSetMacro(HeightFieldResolutionY, unsigned int);
108 
110  itkGetConstMacro(HeightFieldResolutionY, unsigned int);
111 
112  protected:
114 
116 
118 
119  void GenerateOutputInformation() override;
120 
121  void GenerateData() override;
122 
123  template <typename TPixel, unsigned int VImageDimension>
124  void _InternalComputeClippedImage(itk::Image<TPixel, VImageDimension> *itkImage,
125  HeightFieldSurfaceClipImageFilter *clipImageFilter,
126  vtkPolyData *clippingPolyData,
127  AffineTransform3D *imageToPlaneTransform);
128 
131 
133 
137 
140 
141  double m_MaxHeight;
142 
145  };
146 
147 } // namespace mitk
148 
149 #endif
#define MITKALGORITHMSEXT_EXPORT
Filter for clipping an image with an height-field represented by an mitk::Surface.
void SetClippingMode(int mode)
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-s...
void SetClippingModeToMultiplyByFactor()
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-s...
void SetClippingSurfaces(ClippingPlaneList planeList)
Set/Get the surfaces defining a height field as a triangle mesh.
mitkClassMacro(HeightFieldSurfaceClipImageFilter, ImageToImageFilter)
int GetClippingMode()
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-s...
void _InternalComputeClippedImage(itk::Image< TPixel, VImageDimension > *itkImage, HeightFieldSurfaceClipImageFilter *clipImageFilter, vtkPolyData *clippingPolyData, AffineTransform3D *imageToPlaneTransform)
const Surface * GetClippingSurface() const
Set/Get the surface defining a height field as a triangle mesh.
void SetClippingModeToConstant()
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-s...
itk::TimeStamp m_TimeOfHeaderInitialization
Time when Header was last initialized.
void SetClippingSurface(Surface *clippingSurface)
Set/Get the surface defining a height field as a triangle mesh.
Superclass of all classes generating Images (instances of class Image) as output.
Superclass of all classes having one or more Images as input and generating Images as output.
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:29
class ITK_EXPORT Image
Find image slices visible on a given plane.
itk::ScalableAffineTransform< ScalarType, 3 > AffineTransform3D
double ScalarType