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_CROSS_H_
00020 #define _MITK_PLANAR_CROSS_H_
00021
00022 #include "mitkPlanarFigure.h"
00023 #include "PlanarFigureExports.h"
00024
00025
00026 namespace mitk
00027 {
00028
00029 class Geometry2D;
00030
00058 class PlanarFigure_EXPORT PlanarCross : public PlanarFigure
00059 {
00060 public:
00061 mitkClassMacro( PlanarCross, PlanarFigure );
00062
00063 itkNewMacro( Self );
00064
00067 void SetSingleLineMode( bool singleLineMode );
00068
00071 bool GetSingleLineMode() const;
00072
00075 itkBooleanMacro( SingleLineMode );
00076
00077
00079 unsigned int GetMinimumNumberOfControlPoints() const
00080 {
00081 return this->GetSingleLineMode() ? 2 : 4;
00082 }
00083
00085 unsigned int GetMaximumNumberOfControlPoints() const
00086 {
00087 return this->GetSingleLineMode() ? 2 : 4;
00088 }
00089
00091 virtual bool ResetOnPointSelect();
00092
00093
00095 virtual unsigned int GetNumberOfFeatures() const;
00096
00097
00098 protected:
00099 PlanarCross();
00100 virtual ~PlanarCross();
00101
00103 virtual Point2D ApplyControlPointConstraints( unsigned int index, const Point2D& point );
00104
00106 virtual void GeneratePolyLine();
00107
00109 virtual void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight);
00110
00112 virtual void EvaluateFeaturesInternal();
00113
00114
00115 virtual void PrintSelf( std::ostream &os, itk::Indent indent ) const;
00116
00117
00118 const unsigned int FEATURE_ID_LONGESTDIAMETER;
00119 const unsigned int FEATURE_ID_SHORTAXISDIAMETER;
00120
00121 private:
00122
00124 virtual Point2D InternalApplyControlPointConstraints( unsigned int index, const Point2D& point );
00125
00126 };
00127
00128 }
00129
00130 #endif //_MITK_PLANAR_CROSS_H_