Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkPlanarArrow.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 mitkPlanarArrow_h
14 #define mitkPlanarArrow_h
15 
16 #include <mitkPlanarFigure.h>
18 
19 namespace mitk
20 {
21  class PlaneGeometry;
22 
36  {
37  public:
39 
40  itkFactorylessNewMacro(Self);
41 
42  itkCloneMacro(Self);
43 
45  unsigned int GetMinimumNumberOfControlPoints() const override
46  {
47  return 2;
48  }
49 
51  unsigned int GetMaximumNumberOfControlPoints() const override { return 2; }
52 
60  void SetArrowTipScaleFactor(float scale);
61 
67  bool Equals(const mitk::PlanarFigure &other) const override;
68 
69  protected:
71  PlanarArrow(const Self& other);
72 
74 
76  void GeneratePolyLine() override;
77 
79  void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override;
80 
82  void EvaluateFeaturesInternal() override;
83 
84  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
85 
86  // Feature identifiers
87  const unsigned int FEATURE_ID_LENGTH;
88 
89  // ScaleFactor defining size of helper-lines in relation to display size
91 
92  private:
93  };
94 
95 } // namespace mitk
96 
97 #endif
#define MITKPLANARFIGURE_EXPORT
Implementation of PlanarFigure representing an arrow with two control points.
void SetArrowTipScaleFactor(float scale)
Sets the scale factor for the arrowhead size.
unsigned int GetMaximumNumberOfControlPoints() const override
Returns 2 – an arrow requires exactly two control points.
mitkClassMacro(PlanarArrow, PlanarFigure)
PlanarArrow(const Self &other)
void EvaluateFeaturesInternal() override
Calculates feature quantities of the planar figure.
unsigned int GetMinimumNumberOfControlPoints() const override
Returns 2 – an arrow requires exactly two control points.
void GeneratePolyLine() override
Generates the poly-line representation of the planar figure.
void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override
Generates the poly-lines that should be drawn the same size regardless of zoom.
const unsigned int FEATURE_ID_LENGTH
void PrintSelf(std::ostream &os, itk::Indent indent) const override
bool Equals(const mitk::PlanarFigure &other) const override
Compares this PlanarArrow with another PlanarFigure for equality.
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Find image slices visible on a given plane.