13 #ifndef mitkPlanarDoubleEllipse_h
14 #define mitkPlanarDoubleEllipse_h
44 itkFactorylessNewMacro(Self);
89 static const unsigned int CP_CENTER = 0;
91 static const unsigned int CP_OUTER_MAJOR_AXIS = 1;
93 static const unsigned int CP_OUTER_MINOR_AXIS = 2;
95 static const unsigned int CP_INNER_MAJOR_AXIS = 3;
118 unsigned int m_NumberOfSegments;
119 bool m_ConstrainCircle;
120 bool m_ConstrainThickness;
121 double m_FixedRadius = 0;
122 double m_FixedThickness = 0;
123 bool m_SizeIsFixed =
false;
Implementation of PlanarFigure representing a double ellipse (annular ring).
void EvaluateFeaturesInternal() override
Calculates quantities of all features of this planar figure. Must be implemented in sub-classes.
mitkNewMacro2Param(PlanarDoubleEllipse, double, double) static Pointer New()
Creates a PlanarDoubleEllipse with fixed radius and thickness.
unsigned int GetMaximumNumberOfControlPoints() const override
Returns 1 in fixed-size mode, 4 otherwise.
bool Equals(const mitk::PlanarFigure &other) const override
Compares this PlanarDoubleEllipse with another PlanarFigure for equality.
void GeneratePolyLine() override
Generates the poly-line representation of the planar figure. Must be implemented in sub-classes.
PlanarDoubleEllipse(double fixedRadius, double fixedThickness)
void SetNumberOfSegments(unsigned int numSegments)
Sets the number of line segments used to approximate each ellipse.
unsigned int GetNumberOfSegments() const
Returns the number of line segments used to approximate each ellipse.
unsigned int GetMinimumNumberOfControlPoints() const override
Returns 1 in fixed-size mode, 4 otherwise.
mitk::Point2D ApplyControlPointConstraints(unsigned int index, const Point2D &point) override
Applies spatial constraints to a control point position.
bool SetControlPoint(unsigned int index, const Point2D &point, bool createIfDoesNotExist=true) override
Sets a control point and enforces double-ellipse constraints.
const unsigned int FEATURE_ID_MINOR_AXIS
Feature identifier for the outer minor axis length.
void GenerateHelperPolyLine(double, unsigned int) override
Generates the poly-lines that should be drawn the same size regardless of zoom. Must be implemented i...
const unsigned int FEATURE_ID_MAJOR_AXIS
Feature identifier for the outer major axis length.
mitkClassMacro(PlanarDoubleEllipse, PlanarFigure)
const unsigned int FEATURE_ID_THICKNESS
Feature identifier for the ring thickness (distance between outer and inner ellipses).
PlanarDoubleEllipse(const Self &other)
Find image slices visible on a given plane.