Medical Imaging Interaction Toolkit  2025.12.02
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 
28  {
29  public:
31 
32  itkFactorylessNewMacro(Self);
33 
34  itkCloneMacro(Self);
35 
41  // virtual void Initialize();
42 
44  unsigned int GetMinimumNumberOfControlPoints() const override
45  {
46  return 2;
47  }
48 
50  unsigned int GetMaximumNumberOfControlPoints() const override { return 2; }
51  bool Equals(const mitk::PlanarFigure &other) const override;
52 
53  protected:
55 
57 
59  void GeneratePolyLine() override;
60 
62  void GenerateHelperPolyLine(double mmPerDisplayUnit, unsigned int displayHeight) override;
63 
65  void EvaluateFeaturesInternal() override;
66 
67  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
68 
69  // Feature identifiers
70  const unsigned int FEATURE_ID_LENGTH;
71 
72  private:
73  };
74 
75 } // namespace mitk
76 
77 #endif
#define MITKPLANARFIGURE_EXPORT
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Implementation of PlanarFigure representing a line through 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.
bool Equals(const mitk::PlanarFigure &other) const override
Compare two PlanarFigure objects Note: all subclasses have to implement the method on their own.
mitkClassMacro(PlanarLine, PlanarFigure)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
const unsigned int FEATURE_ID_LENGTH
unsigned int GetMaximumNumberOfControlPoints() const override
Line has 2 control points per definition.
void EvaluateFeaturesInternal() override
Calculates feature quantities of the planar figure.
unsigned int GetMinimumNumberOfControlPoints() const override
Place figure in its minimal configuration (a point at least) onto the given 2D geometry.
Find image slices visible on a given plane.