Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkPlanarSubdivisionPolygon.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 mitkPlanarSubdivisionPolygon_h
14 #define mitkPlanarSubdivisionPolygon_h
15 
16 #include "mitkPlanarFigure.h"
17 #include "mitkPlanarPolygon.h"
19 
20 namespace mitk
21 {
22  class PlaneGeometry;
23 
29  {
30  public:
32 
33  itkFactorylessNewMacro(Self);
34 
35  itkCloneMacro(Self);
36 
38  unsigned int GetMinimumNumberOfControlPoints() const override
39  {
40  return 3;
41  }
42 
44  unsigned int GetMaximumNumberOfControlPoints() const override { return 1000; }
46  unsigned int GetSubdivisionRounds() const { return m_SubdivisionRounds; }
47  void SetSubdivisionRounds(int subdivisionRounds) { m_SubdivisionRounds = subdivisionRounds; }
52  int GetControlPointForPolylinePoint(int indexOfPolylinePoint, int polyLineIndex) const override;
53 
59  float GetTensionParameter() const { return m_TensionParameter; }
60  void SetTensionParameter(float tensionParameter) { m_TensionParameter = tensionParameter; }
61  std::vector<mitk::Point2D> CheckForLineIntersection(const Point2D &p1, const Point2D &p2) const;
62 
63  void IncreaseSubdivisions();
64  void DecreaseSubdivisions();
65 
66  bool Equals(const mitk::PlanarFigure &other) const override;
67 
68  protected:
70 
71  mitkCloneMacro(Self);
72 
74  void GeneratePolyLine() override;
75 
78 
79  private:
80  };
81 
82 } // namespace mitk
83 
84 #endif
mitk::PlanarSubdivisionPolygon::GetMaximumNumberOfControlPoints
unsigned int GetMaximumNumberOfControlPoints() const override
Polygon maximum number of control points is principally not limited.
Definition: mitkPlanarSubdivisionPolygon.h:44
MitkPlanarFigureExports.h
mitk::PlanarFigure
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Definition: mitkPlanarFigure.h:50
mitk::PlanarSubdivisionPolygon::SetTensionParameter
void SetTensionParameter(float tensionParameter)
Definition: mitkPlanarSubdivisionPolygon.h:60
MITKPLANARFIGURE_EXPORT
#define MITKPLANARFIGURE_EXPORT
Definition: MitkPlanarFigureExports.h:15
mitk::PlanarSubdivisionPolygon::m_TensionParameter
float m_TensionParameter
Definition: mitkPlanarSubdivisionPolygon.h:76
mitkPlanarFigure.h
mitk::PlanarSubdivisionPolygon::GetMinimumNumberOfControlPoints
unsigned int GetMinimumNumberOfControlPoints() const override
Subdivision Polygon has 3 control points per definition.
Definition: mitkPlanarSubdivisionPolygon.h:38
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PlanarSubdivisionPolygon
Implementation of PlanarFigure representing a polygon with two or more control points.
Definition: mitkPlanarSubdivisionPolygon.h:28
mitk::Point< ScalarType, 2 >
mitk::PlanarSubdivisionPolygon::GetSubdivisionRounds
unsigned int GetSubdivisionRounds() const
How many times should we generate a round of subdivisions?
Definition: mitkPlanarSubdivisionPolygon.h:46
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitk::PlanarSubdivisionPolygon::m_SubdivisionRounds
int m_SubdivisionRounds
Definition: mitkPlanarSubdivisionPolygon.h:77
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::PlanarSubdivisionPolygon::SetSubdivisionRounds
void SetSubdivisionRounds(int subdivisionRounds)
Definition: mitkPlanarSubdivisionPolygon.h:47
mitk::PlanarPolygon
Implementation of PlanarFigure representing a polygon with two or more control points.
Definition: mitkPlanarPolygon.h:27
mitkPlanarPolygon.h
mitk::PlanarSubdivisionPolygon::GetTensionParameter
float GetTensionParameter() const
Parameter w_tension defines the tension. the higher w_tension, the lower the "tension" on points....
Definition: mitkPlanarSubdivisionPolygon.h:59