Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKEXTRUDEDCONTOUR_H_HEADER_INCLUDED
00020 #define MITKEXTRUDEDCONTOUR_H_HEADER_INCLUDED
00021
00022 #include "mitkBoundingObject.h"
00023 #include "MitkExtExports.h"
00024 #include <mitkContour.h>
00025 #include <vtkConfigure.h>
00026 #include <mitkPlaneGeometry.h>
00027
00028 class vtkLinearExtrusionFilter;
00029 class vtkPlanes;
00030 class vtkClipPolyData;
00031 class vtkLinearSubdivisionFilter;
00032 class vtkTriangleFilter;
00033 class vtkDecimatePro;
00034 class vtkPolygon;
00035
00036 namespace mitk {
00037
00038
00039
00040
00041
00042
00043
00044
00045 class MitkExt_EXPORT ExtrudedContour : public BoundingObject
00046 {
00047 public:
00048 mitkClassMacro(ExtrudedContour, BoundingObject);
00049 itkNewMacro(Self);
00050
00051 virtual mitk::ScalarType GetVolume();
00052 virtual bool IsInside(const Point3D& p) const;
00053 virtual void UpdateOutputInformation();
00054
00055
00056
00057 itkGetConstObjectMacro(Contour, mitk::Contour);
00058 itkSetObjectMacro(Contour, mitk::Contour);
00059
00060
00061
00062 mitkGetVectorMacro(Vector, mitk::Vector3D);
00063 mitkSetVectorMacro(Vector, mitk::Vector3D);
00064 itkGetConstMacro(AutomaticVectorGeneration, bool);
00065 itkSetMacro(AutomaticVectorGeneration, bool);
00066 itkBooleanMacro(AutomaticVectorGeneration);
00067
00068
00069
00070 mitkGetVectorMacro(RightVector, mitk::Vector3D);
00071 mitkSetVectorMacro(RightVector, mitk::Vector3D);
00072
00073
00074
00075 itkGetConstObjectMacro(ClippingGeometry, mitk::Geometry3D);
00076 itkSetObjectMacro(ClippingGeometry, mitk::Geometry3D);
00077
00078 virtual unsigned long GetMTime() const;
00079 protected:
00080 ExtrudedContour();
00081 virtual ~ExtrudedContour();
00082
00083 void BuildSurface();
00084 void BuildGeometry();
00085
00086 mitk::Contour::Pointer m_Contour;
00087 mitk::Vector3D m_Vector;
00088 mitk::Vector3D m_RightVector;
00089 mitk::Geometry3D::Pointer m_ClippingGeometry;
00090
00091 bool m_AutomaticVectorGeneration;
00092
00093 vtkPolygon* m_Polygon;
00094
00095 #if ((VTK_MAJOR_VERSION > 4) || ((VTK_MAJOR_VERSION==4) && (VTK_MINOR_VERSION>=4) ))
00096 double m_ProjectedContourBounds[6];
00097 #else
00098 float m_ProjectedContourBounds[6];
00099 #endif
00100
00101 mitk::PlaneGeometry::Pointer m_ProjectionPlane;
00102
00103
00104 float m_Right[3];
00105 float m_Down[3];
00106
00107 #if ((VTK_MAJOR_VERSION > 4) || ((VTK_MAJOR_VERSION==4) && (VTK_MINOR_VERSION>=4) ))
00108 double m_Normal[3];
00109 #else
00110 float m_Normal[3];
00111 #endif
00112 float m_Origin[3];
00113
00114 vtkLinearExtrusionFilter* m_ExtrusionFilter;
00115 vtkTriangleFilter *m_TriangleFilter;
00116 vtkDecimatePro* m_Decimate;
00117 vtkLinearSubdivisionFilter* m_SubdivisionFilter;
00118 vtkPlanes* m_ClippingBox;
00119 vtkClipPolyData* m_ClipPolyDataFilter;
00120
00121 itk::TimeStamp m_LastCalculateExtrusionTime;
00122 };
00123
00124 }
00125 #endif
00126
00127