Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKHEIGHTFIELDSURFACECLIPIMAGEFILTER_H_HEADER_INCLUDED
18 #define MITKHEIGHTFIELDSURFACECLIPIMAGEFILTER_H_HEADER_INCLUDED
19 
21 #include "mitkCommon.h"
22 #include "mitkGeometry3D.h"
23 #include "mitkImageTimeSelector.h"
24 #include "mitkImageToImageFilter.h"
25 #include "mitkSurface.h"
26 
27 namespace itk
28 {
29  template <class TPixel, unsigned int VImageDimension>
30  class ITK_EXPORT Image;
31 }
32 
33 namespace mitk
34 {
48  {
49  public:
50  typedef std::vector<mitk::Surface *> ClippingPlaneList;
51 
53 
54  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
55 
57  void SetClippingSurface(Surface *clippingSurface);
58 
60  void SetClippingSurfaces(ClippingPlaneList planeList);
61 
63  const Surface *GetClippingSurface() const;
64 
65  enum
66  {
67  CLIPPING_MODE_CONSTANT = 0,
69  CLIPPING_MODE_MULTIPLANE
70  };
71 
74  void SetClippingMode(int mode);
75 
78  int GetClippingMode();
79 
82  void SetClippingModeToConstant();
83 
86  void SetClippingModeToMultiplyByFactor();
87 
88  void SetClippingModeToMultiPlaneValue();
89 
91  itkSetMacro(ClippingConstant, ScalarType);
92 
94  itkGetConstMacro(ClippingConstant, ScalarType);
95 
97  itkSetMacro(MultiplicationFactor, ScalarType);
98 
100  itkGetConstMacro(MultiplicationFactor, ScalarType);
101 
103  itkSetMacro(HeightFieldResolutionX, unsigned int);
104 
106  itkGetConstMacro(HeightFieldResolutionX, unsigned int);
107 
109  itkSetMacro(HeightFieldResolutionY, unsigned int);
110 
112  itkGetConstMacro(HeightFieldResolutionY, unsigned int);
113 
114  protected:
116 
118 
119  virtual void GenerateInputRequestedRegion() override;
120 
121  virtual void GenerateOutputInformation() override;
122 
123  virtual void GenerateData() override;
124 
125  template <typename TPixel, unsigned int VImageDimension>
126  void _InternalComputeClippedImage(itk::Image<TPixel, VImageDimension> *itkImage,
127  HeightFieldSurfaceClipImageFilter *clipImageFilter,
128  vtkPolyData *clippingPolyData,
129  AffineTransform3D *imageToPlaneTransform);
130 
133 
135 
139 
142 
143  double m_MaxHeight;
144 
147  };
148 
149 } // namespace mitk
150 
151 #endif /* MITKHEIGHTFIELDSURFACECLIPIMAGEFILTER_H_HEADER_INCLUDED */
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
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:44
itk::AffineGeometryFrame< ScalarType, 3 >::TransformType AffineTransform3D
Superclass of all classes having one or more Images as input and generating Images as output...
itk::TimeStamp m_TimeOfHeaderInitialization
Time when Header was last initialized.
Filter for clipping an image with an height-field represented by an mitk::Surface.