Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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:
24  mitkClassMacro(PlanarBezierCurve, PlanarFigure) itkFactorylessNewMacro(Self) itkCloneMacro(Self)
25 
26  unsigned int GetNumberOfSegments() const;
27  void SetNumberOfSegments(unsigned int numSegments);
28 
33  int GetControlPointForPolylinePoint(int indexOfPolylinePoint, int polyLineIndex) const override;
34 
35  unsigned int GetMaximumNumberOfControlPoints() const override;
36  unsigned int GetMinimumNumberOfControlPoints() const override;
37  bool IsHelperToBePainted(unsigned int index) const override;
38 
39  const unsigned int FEATURE_ID_LENGTH;
40 
41  bool Equals(const mitk::PlanarFigure &other) const override;
42 
43  protected:
45 
47 
48  void EvaluateFeaturesInternal() override;
49  void GenerateHelperPolyLine(double, unsigned int) override;
50  void GeneratePolyLine() override;
51 
52  private:
53  Point2D ComputeDeCasteljauPoint(ScalarType t);
54 
55  std::vector<mitk::Point2D> m_DeCasteljauPoints;
56  unsigned int m_NumberOfSegments;
57  };
58 }
59 
60 #endif
Base of all data objects.
Definition: mitkBaseData.h:37
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
const unsigned int FEATURE_ID_LENGTH
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:158
#define MITKPLANARFIGURE_EXPORT
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons...