Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkPlanarLine.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 mitkPlanarLine_h
14 #define mitkPlanarLine_h
15 
16 #include <mitkPlanarFigure.h>
18 
19 namespace mitk
20 {
21  class PlaneGeometry;
22 
32  {
33  public:
35 
36  itkFactorylessNewMacro(Self);
37 
38  itkCloneMacro(Self);
39 
41  unsigned int GetMinimumNumberOfControlPoints() const override
42  {
43  return 2;
44  }
45 
47  unsigned int GetMaximumNumberOfControlPoints() const override { return 2; }
48 
54  bool Equals(const mitk::PlanarFigure &other) const override;
55 
56  protected:
58  PlanarLine(const Self& other);
59 
61 
63  void GeneratePolyLine() override;
64 
66  void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override;
67 
69  void EvaluateFeaturesInternal() override;
70 
71  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
72 
73  // Feature identifiers
74  const unsigned int FEATURE_ID_LENGTH;
75 
76  private:
77  };
78 
79 } // namespace mitk
80 
81 #endif
#define MITKPLANARFIGURE_EXPORT
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Implementation of PlanarFigure representing a straight line segment.
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.
bool Equals(const mitk::PlanarFigure &other) const override
Compares this PlanarLine with another PlanarFigure for equality.
mitkClassMacro(PlanarLine, PlanarFigure)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
const unsigned int FEATURE_ID_LENGTH
unsigned int GetMaximumNumberOfControlPoints() const override
Returns 2 – a line requires exactly two control points.
void EvaluateFeaturesInternal() override
Calculates feature quantities of the planar figure.
unsigned int GetMinimumNumberOfControlPoints() const override
Returns 2 – a line requires exactly two control points.
PlanarLine(const Self &other)
Find image slices visible on a given plane.