Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
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
Base of all data objects.
Definition: mitkBaseData.h:42
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...