Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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_HEADER_INCLUDED
14 #define MITKHEIGHTFIELDSURFACECLIPIMAGEFILTER_H_HEADER_INCLUDED
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 
58  void SetClippingSurfaces(ClippingPlaneList planeList);
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 
76  int GetClippingMode();
77 
80  void SetClippingModeToConstant();
81 
84  void SetClippingModeToMultiplyByFactor();
85 
86  void SetClippingModeToMultiPlaneValue();
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 
117  void GenerateInputRequestedRegion() override;
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 /* MITKHEIGHTFIELDSURFACECLIPIMAGEFILTER_H_HEADER_INCLUDED */
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
double ScalarType
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
class ITK_EXPORT Image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Superclass of all classes having one or more Images as input and generating Images as output...
itk::ScalableAffineTransform< ScalarType, 3 > AffineTransform3D
itk::TimeStamp m_TimeOfHeaderInitialization
Time when Header was last initialized.
Filter for clipping an image with an height-field represented by an mitk::Surface.