Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkExtrudedContour.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 MITKEXTRUDEDCONTOUR_H_HEADER_INCLUDED
18 #define MITKEXTRUDEDCONTOUR_H_HEADER_INCLUDED
19 
20 #include "mitkBoundingObject.h"
22 #include <mitkContour.h>
23 #include <mitkPlaneGeometry.h>
24 #include <vtkConfigure.h>
25 #include <vtkVersionMacros.h>
26 
27 class vtkLinearExtrusionFilter;
28 class vtkPlanes;
29 class vtkClipPolyData;
30 class vtkLinearSubdivisionFilter;
31 class vtkTriangleFilter;
32 class vtkDecimatePro;
33 class vtkPolygon;
34 
35 namespace mitk
36 {
37  //##Documentation
38  //## @brief Data class containing a bounding-object created by
39  //## extruding a Contour along a vector
40  //##
41  //## The m_Contour is extruded in the direction m_Vector until
42  //## reaching m_ClippingGeometry.
43  //## @ingroup Data
44 
51  {
52  public:
54  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
55 
56  virtual mitk::ScalarType GetVolume() override;
57  virtual bool IsInside(const Point3D &p) const override;
58  virtual void UpdateOutputInformation() override;
59 
60  //##Documentation
61  //## @brief Contour to extrude
62  itkGetConstObjectMacro(Contour, mitk::Contour);
63  itkSetObjectMacro(Contour, mitk::Contour);
64 
65  //##Documentation
66  //## @brief Vector to specify the direction of the extrusion
69  itkGetConstMacro(AutomaticVectorGeneration, bool);
70  itkSetMacro(AutomaticVectorGeneration, bool);
71  itkBooleanMacro(AutomaticVectorGeneration);
72 
73  //##Documentation
74  //## @brief Optional vector to specify the orientation of the bounding-box
75  mitkGetVectorMacro(RightVector, mitk::Vector3D);
76  mitkSetVectorMacro(RightVector, mitk::Vector3D);
77 
78  //##Documentation
79  //## @brief Optional geometry for clipping the extruded contour
80  itkGetConstObjectMacro(ClippingGeometry, mitk::BaseGeometry);
81  itkSetObjectMacro(ClippingGeometry, mitk::BaseGeometry);
82 
83  virtual unsigned long GetMTime() const override;
84 
85  protected:
87  virtual ~ExtrudedContour();
88 
89  void BuildSurface();
90  void BuildGeometry();
91 
96 
98 
99  vtkPolygon *m_Polygon;
100 
101 #if ((VTK_MAJOR_VERSION > 4) || ((VTK_MAJOR_VERSION == 4) && (VTK_MINOR_VERSION >= 4)))
102  double m_ProjectedContourBounds[6];
103 #else
104  float m_ProjectedContourBounds[6];
105 #endif
106 
108  //##Documentation
109  //## @brief For fast projection on plane
110  float m_Right[3];
111  float m_Down[3];
112 
113 #if ((VTK_MAJOR_VERSION > 4) || ((VTK_MAJOR_VERSION == 4) && (VTK_MINOR_VERSION >= 4)))
114  double m_Normal[3];
115 #else
116  float m_Normal[3];
117 #endif
118  float m_Origin[3];
119 
120  vtkLinearExtrusionFilter *m_ExtrusionFilter;
121  vtkTriangleFilter *m_TriangleFilter;
122  vtkDecimatePro *m_Decimate;
123  vtkLinearSubdivisionFilter *m_SubdivisionFilter;
124  vtkPlanes *m_ClippingBox;
125  vtkClipPolyData *m_ClipPolyDataFilter;
126 
128  };
129 }
130 #endif /* MITKEXTRUDEDCONTOUR_H_HEADER_INCLUDED */
vtkDecimatePro * m_Decimate
Data class containing a bounding-object created by extruding a Contour along a vector.
Base of all data objects.
Definition: mitkBaseData.h:39
double ScalarType
vtkLinearSubdivisionFilter * m_SubdivisionFilter
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
vtkLinearExtrusionFilter * m_ExtrusionFilter
mitk::PlaneGeometry::Pointer m_ProjectionPlane
#define mitkSetVectorMacro(name, type)
Stores vertices for drawing a contour.
Definition: mitkContour.h:35
superclass of all bounding objects (cylinder, cuboid,...)
mitk::Vector3D m_RightVector
mitk::BaseGeometry::Pointer m_ClippingGeometry
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
#define mitkGetVectorMacro(name, type)
vtkClipPolyData * m_ClipPolyDataFilter
mitk::Contour::Pointer m_Contour
itk::TimeStamp m_LastCalculateExtrusionTime
vtkTriangleFilter * m_TriangleFilter
BaseGeometry Describes the geometry of a data object.