Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkPlanarDoubleEllipse.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 mitkPlanarDoubleEllipse_h
14 #define mitkPlanarDoubleEllipse_h
15 
17 #include <mitkPlanarFigure.h>
18 
19 namespace mitk
20 {
26  {
27  public:
30 
31  itkFactorylessNewMacro(Self);
32  itkCloneMacro(Self);
33 
34  unsigned int GetNumberOfSegments() const;
35  void SetNumberOfSegments(unsigned int numSegments);
36 
37  unsigned int GetMaximumNumberOfControlPoints() const override;
38  unsigned int GetMinimumNumberOfControlPoints() const override;
39  bool SetControlPoint(unsigned int index, const Point2D &point, bool createIfDoesNotExist = true) override;
40 
41  const unsigned int FEATURE_ID_MAJOR_AXIS;
42  const unsigned int FEATURE_ID_MINOR_AXIS;
43  const unsigned int FEATURE_ID_THICKNESS;
44 
45  static const unsigned int CP_CENTER = 0;
46  static const unsigned int CP_OUTER_MAJOR_AXIS = 1;
47  static const unsigned int CP_OUTER_MINOR_AXIS = 2;
48  static const unsigned int CP_INNER_MAJOR_AXIS = 3;
49 
50  bool Equals(const mitk::PlanarFigure &other) const override;
51 
52  protected:
55  PlanarDoubleEllipse(double fixedRadius, double fixedThickness);
56 
58 
59  mitk::Point2D ApplyControlPointConstraints(unsigned int index, const Point2D &point) override;
60  void EvaluateFeaturesInternal() override;
61  void GenerateHelperPolyLine(double, unsigned int) override;
62  void GeneratePolyLine() override;
63 
64  private:
65  unsigned int m_NumberOfSegments;
66  bool m_ConstrainCircle;
67  bool m_ConstrainThickness;
68  double m_FixedRadius = 0;
69  double m_FixedThickness = 0;
70  bool m_SizeIsFixed = false;
71  };
72 }
73 
74 #endif
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
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::PlanarDoubleEllipse
Planar representing a double ellipse. The double ellipse is either represented by 4 control points (c...
Definition: mitkPlanarDoubleEllipse.h:25
mitkPlanarFigure.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PlanarDoubleEllipse::FEATURE_ID_MINOR_AXIS
const unsigned int FEATURE_ID_MINOR_AXIS
Definition: mitkPlanarDoubleEllipse.h:42
mitk::Point< ScalarType, 2 >
mitk::PlanarDoubleEllipse::FEATURE_ID_MAJOR_AXIS
const unsigned int FEATURE_ID_MAJOR_AXIS
Definition: mitkPlanarDoubleEllipse.h:41
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitk::PlanarDoubleEllipse::FEATURE_ID_THICKNESS
const unsigned int FEATURE_ID_THICKNESS
Definition: mitkPlanarDoubleEllipse.h:43
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36