13 #ifndef mitkPlanarPolygon_h
14 #define mitkPlanarPolygon_h
42 itkFactorylessNewMacro(Self);
53 itkBooleanMacro(Closed);
101 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
Implementation of PlanarFigure representing a polygon.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
const unsigned int FEATURE_ID_AREA
std::vector< mitk::Point2D > CheckForLineIntersection(const Point2D &p1, const Point2D &p2) const
Checks for intersections of a line segment with the polygon edges.
bool CheckForLineIntersection(const mitk::Point2D &p1, const mitk::Point2D &p2, const mitk::Point2D &p3, const mitk::Point2D &p4, Point2D &intersection) const
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 PlanarPolygon with another PlanarFigure for equality.
const unsigned int FEATURE_ID_CIRCUMFERENCE
virtual void SetClosed(bool closed)
Sets whether the polygon is closed between the first and last control point.
bool CheckForLineIntersection(const mitk::Point2D &p1, const mitk::Point2D &p2, const mitk::Point2D &p3, const mitk::Point2D &p4) const
PlanarPolygon(const Self &other)
void EvaluateFeaturesInternal() override
Calculates feature quantities of the planar figure.
unsigned int GetMaximumNumberOfControlPoints() const override
Returns 1000 – polygon control points are practically unlimited.
unsigned int GetMinimumNumberOfControlPoints() const override
Returns 3 – a polygon requires at least three control points.
mitkClassMacro(PlanarPolygon, PlanarFigure)
void GeneratePolyLine() override
Generates the poly-line representation of the planar figure.
Find image slices visible on a given plane.