Medical Imaging Interaction Toolkit  2024.06.99-c70462f2
Medical Imaging Interaction Toolkit
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkPlanarRectangle_h
14 #define mitkPlanarRectangle_h
15 
16 #include "mitkPlanarPolygon.h"
18 
19 namespace mitk
20 {
21  class PlaneGeometry;
22 
28  {
29  public:
31 
32  itkFactorylessNewMacro(Self);
33 
34  itkCloneMacro(Self);
35 
41  // virtual void Initialize();
42  void PlaceFigure(const Point2D &point) override;
43 
45  unsigned int GetMinimumNumberOfControlPoints() const override { return 4; }
47  unsigned int GetMaximumNumberOfControlPoints() const override { return 4; }
48  bool SetControlPoint(unsigned int index, const Point2D &point, bool createIfDoesNotExist = false) override;
49 
50  protected:
52 
53  mitkCloneMacro(Self);
54 
56  void GeneratePolyLine() override;
57 
59  void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override;
60 
62  void EvaluateFeaturesInternal() override;
63 
64  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
65 
66  const unsigned int FEATURE_ID_CIRCUMFERENCE;
67  const unsigned int FEATURE_ID_AREA;
68 
69  bool Equals(const mitk::PlanarFigure &other) const override;
70 
71  private:
72  };
73 
74 } // namespace mitk
75 
76 #endif
mitk::PlanarRectangle::FEATURE_ID_AREA
const unsigned int FEATURE_ID_AREA
Definition: mitkPlanarRectangle.h:67
MitkPlanarFigureExports.h
mitk::PlanarFigure
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Definition: mitkPlanarFigure.h:50
MITKPLANARFIGURE_EXPORT
#define MITKPLANARFIGURE_EXPORT
Definition: MitkPlanarFigureExports.h:15
mitk::PlanarRectangle::FEATURE_ID_CIRCUMFERENCE
const unsigned int FEATURE_ID_CIRCUMFERENCE
Definition: mitkPlanarRectangle.h:66
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PlanarRectangle::GetMinimumNumberOfControlPoints
unsigned int GetMinimumNumberOfControlPoints() const override
Polygon has 2 control points per definition.
Definition: mitkPlanarRectangle.h:45
mitk::Point< ScalarType, 2 >
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitk::PlanarRectangle::GetMaximumNumberOfControlPoints
unsigned int GetMaximumNumberOfControlPoints() const override
Polygon maximum number of control points is principally not limited.
Definition: mitkPlanarRectangle.h:47
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::PlanarRectangle
Implementation of PlanarFigure representing a polygon with two or more control points.
Definition: mitkPlanarRectangle.h:27
mitkPlanarPolygon.h