Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkPlanarBezierCurve_h
18 #define mitkPlanarBezierCurve_h
19 
21 #include <mitkPlanarFigure.h>
22 
23 namespace mitk
24 {
26  {
27  public:
28  mitkClassMacro(PlanarBezierCurve, PlanarFigure) itkFactorylessNewMacro(Self) itkCloneMacro(Self)
29 
30  unsigned int GetNumberOfSegments() const;
31  void SetNumberOfSegments(unsigned int numSegments);
32 
37  int GetControlPointForPolylinePoint(int indexOfPolylinePoint, int polyLineIndex) const override;
38 
39  virtual unsigned int GetMaximumNumberOfControlPoints() const override;
40  virtual unsigned int GetMinimumNumberOfControlPoints() const override;
41  virtual bool IsHelperToBePainted(unsigned int index) const override;
42 
43  const unsigned int FEATURE_ID_LENGTH;
44 
45  virtual bool Equals(const mitk::PlanarFigure &other) const override;
46 
47  protected:
49 
51 
52  virtual void EvaluateFeaturesInternal() override;
53  virtual void GenerateHelperPolyLine(double, unsigned int) override;
54  virtual void GeneratePolyLine() override;
55 
56  private:
57  Point2D ComputeDeCasteljauPoint(ScalarType t);
58 
59  std::vector<mitk::Point2D> m_DeCasteljauPoints;
60  unsigned int m_NumberOfSegments;
61  };
62 }
63 
64 #endif
Base of all data objects.
Definition: mitkBaseData.h:39
double ScalarType
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
const unsigned int FEATURE_ID_LENGTH
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:162
#define MITKPLANARFIGURE_EXPORT
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons...