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
mitkPlanarRectangle.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 _MITK_PLANAR_RECTANGLE_H_
18 #define _MITK_PLANAR_RECTANGLE_H_
19 
20 #include "mitkPlanarPolygon.h"
22 
23 namespace mitk
24 {
25  class PlaneGeometry;
26 
32  {
33  public:
35 
36  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
37 
38 
43  // virtual void Initialize();
44  virtual void PlaceFigure(const Point2D &point) override;
45 
47  virtual unsigned int GetMinimumNumberOfControlPoints() const override { return 4; }
49  virtual unsigned int GetMaximumNumberOfControlPoints() const override { return 4; }
50  virtual bool SetControlPoint(unsigned int index, const Point2D &point, bool createIfDoesNotExist = false) override;
51 
52  protected:
54 
55  mitkCloneMacro(Self);
56 
58  virtual void GeneratePolyLine() override;
59 
61  virtual void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override;
62 
64  virtual void EvaluateFeaturesInternal() override;
65 
66  virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override;
67 
68  const unsigned int FEATURE_ID_CIRCUMFERENCE;
69  const unsigned int FEATURE_ID_AREA;
70 
71  virtual bool Equals(const mitk::PlanarFigure &other) const override;
72 
73  private:
74  };
75 
76 } // namespace mitk
77 
78 #endif //_MITK_PLANAR_POLYGON_H_
Base of all data objects.
Definition: mitkBaseData.h:39
const unsigned int FEATURE_ID_CIRCUMFERENCE
virtual unsigned int GetMinimumNumberOfControlPoints() const override
Polygon has 2 control points per definition.
Implementation of PlanarFigure representing a polygon with two or more control points.
DataCollection - Class to facilitate loading/accessing structured data.
virtual unsigned int GetMaximumNumberOfControlPoints() const override
Polygon maximum number of control points is principally not limited.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:162
#define MITKPLANARFIGURE_EXPORT
const unsigned int FEATURE_ID_AREA
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons...