Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkPlanarBezierCurve.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 mitkPlanarBezierCurve_h
14 #define mitkPlanarBezierCurve_h
15 
17 #include <mitkPlanarFigure.h>
18 
19 namespace mitk
20 {
22  {
23  public:
25  itkFactorylessNewMacro(Self);
26  itkCloneMacro(Self);
27 
28  unsigned int GetNumberOfSegments() const;
29  void SetNumberOfSegments(unsigned int numSegments);
30 
35  int GetControlPointForPolylinePoint(int indexOfPolylinePoint, int polyLineIndex) const override;
36 
37  unsigned int GetMaximumNumberOfControlPoints() const override;
38  unsigned int GetMinimumNumberOfControlPoints() const override;
39  bool IsHelperToBePainted(unsigned int index) const override;
40 
41  const unsigned int FEATURE_ID_LENGTH;
42 
43  bool Equals(const mitk::PlanarFigure &other) const override;
44 
45  protected:
47 
49 
50  void EvaluateFeaturesInternal() override;
51  void GenerateHelperPolyLine(double, unsigned int) override;
52  void GeneratePolyLine() override;
53 
54  private:
55  Point2D ComputeDeCasteljauPoint(ScalarType t);
56 
57  std::vector<mitk::Point2D> m_DeCasteljauPoints;
58  unsigned int m_NumberOfSegments;
59  };
60 }
61 
62 #endif
mitk::PlanarBezierCurve::FEATURE_ID_LENGTH
const unsigned int FEATURE_ID_LENGTH
Definition: mitkPlanarBezierCurve.h:41
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
mitkPlanarFigure.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Point< ScalarType, 2 >
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::PlanarBezierCurve
Definition: mitkPlanarBezierCurve.h:21
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20