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 _MITK_PLANAR_POLYGON_H_
00020 #define _MITK_PLANAR_POLYGON_H_
00021
00022 #include "mitkPlanarFigure.h"
00023 #include "PlanarFigureExports.h"
00024
00025
00026 namespace mitk
00027 {
00028
00029 class Geometry2D;
00030
00035 class PlanarFigure_EXPORT PlanarPolygon : public PlanarFigure
00036 {
00037 public:
00038 mitkClassMacro( PlanarPolygon, PlanarFigure );
00039
00040 itkNewMacro( Self );
00041
00042
00044 virtual void SetClosed( bool closed );
00045
00046 itkBooleanMacro( Closed );
00047
00048
00054
00055
00056
00058 unsigned int GetMinimumNumberOfControlPoints() const
00059 {
00060 return 2;
00061 }
00062
00063
00065 unsigned int GetMaximumNumberOfControlPoints() const
00066 {
00067 return 1000;
00068 }
00069
00070
00071 protected:
00072 PlanarPolygon();
00073 virtual ~PlanarPolygon();
00074
00076 virtual void GeneratePolyLine();
00077
00079 virtual void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight);
00080
00082 virtual void EvaluateFeaturesInternal();
00083
00084 bool CheckForLineIntersection(Point2D p1, Point2D p2, Point2D p3, Point2D p4);
00085
00086 virtual void PrintSelf( std::ostream &os, itk::Indent indent ) const;
00087
00088 const unsigned int FEATURE_ID_CIRCUMFERENCE;
00089 const unsigned int FEATURE_ID_AREA;
00090
00091
00092 private:
00093
00094 };
00095
00096 }
00097
00098 #endif //_MITK_PLANAR_POLYGON_H_