19 : FEATURE_ID_CIRCUMFERENCE(this->AddFeature(
"Circumference",
"mm")), FEATURE_ID_AREA(this->AddFeature(
"Area",
"mm2"))
40 unsigned int horizontalCorrespondingPointIndex = 1;
41 unsigned int verticalCorrespondingPointIndex = 3;
44 horizontalCorrespondingPointIndex = 0;
45 verticalCorrespondingPointIndex = 2;
49 horizontalCorrespondingPointIndex = 3;
50 verticalCorrespondingPointIndex = 1;
54 horizontalCorrespondingPointIndex = 2;
55 verticalCorrespondingPointIndex = 0;
59 verticalCorrespondingPoint[0] = point[0];
63 horizontalCorrespondingPoint[1] = point[1];
92 double circumference = 0.0;
111 area += p0[0] * p1[1] - p1[0] * p0[1];
121 Superclass::PrintSelf(os, indent);
125 os << indent <<
"Control points:" << std::endl;
129 os << indent << indent << i <<
": " <<
GetControlPoint(i) << std::endl;
138 return Superclass::Equals(other);
void GeneratePolyLine() override
Generates the poly-line representation of the planar figure.
const unsigned int FEATURE_ID_CIRCUMFERENCE
Implementation of PlanarFigure representing a polygon with two or more control points.
void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Add new or change existent property.
void EvaluateFeaturesInternal() override
Calculates feature quantities 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.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
const unsigned int FEATURE_ID_AREA
bool SetControlPoint(unsigned int index, const Point2D &point, bool createIfDoesNotExist=false) override
bool Equals(const mitk::PlanarFigure &other) const override
Compare two PlanarFigure objects Note: all subclasses have to implement the method on their own...
void PlaceFigure(const Point2D &point) override
Place figure in its minimal configuration (a point at least) onto the given 2D geometry.