Geometrical Shapes¶
Common features¶
All the geometrical shapes inherit from EShape .NET Python and have these common features:
EShape::ToFrame.NET Python to convert the shape to anEFrame.NET Python.EShape::Draw.NET Python to draw the geometrical shape.You can draw all shapes in a calibrated frame of reference.
EShape::GetAvailableEditionModes.NET Python to get the possible graphical manipulations of the shape.EShape::GetEditionMode.NET Python to set or get the wanted graphical edition mode of the shape.EShape::HitTest.NET Python andEShape::Drag.NET Python to implement the graphical manipulations of the shape.Use
EShape::HitTest.NET Python each time the mouse moves. It returns the edition mode corresponding to the handle under the mouse.Use
EShape::Drag.NET Python when the mouse moves with the left button clicked if the last call toEShape::HitTest.NET Python before the click returned an edition mode.
Geometrical shapes¶
Rectangle (ERectangle .NET Python)¶
Center:
ERectangle.Center.Orientation:
ERectangle.Angle.Size X and Y:
ERectangle::GetSizeX.NET Python andERectangle.GetSizeY.
Circle (ECircle .NET Python)¶
Center:
ECircle.Center.Radius:
ECircle::GetRadius.NET Python or diameter:ECircle.Diameter.Starting orientation of the circle when it is not full:
ECircle.Angle.The amplitude of the circle when it is not full:
ECircle.Amplitude.Fit a circle to a set of points:
ECircle.Fit.
Wedge (EWedge .NET Python)¶
Center:
EWedge.Center.To define the inner and the outer circles, use the outer radius or diameter and a negative breadth:
EWedge::SetRadii.NET Python orEWedge::SetDiameters.NET Python.Use
EWedge::GetInnerRadius.NET Python andEWedge::GetOuterRadius.NET Python to get the value of the inner and outer radius.Use
EWedge::IsFullBreadth.NET Python to check if the wedge is similar to a circle and its inner radius has a size of 0.
Starting orientation of the wedge when it is not full:
EWedge.GetAngle.The amplitude of the wedge when it is not full:
EWedge::GetAmplitude.NET Python.
Line (ELine .NET Python)¶
Center:
ELine::GetCenter.NET Python.Length:
ELine::GetLength.NET Python.Orientation:
ELine::GetAngle.NET Python.
Point set (EPointSet .NET Python)¶
Set of point found by an
EPointGauge.Use
EPointSet::GetPoint.NET Python to get a single point.Use
EPointSet::GetPoints.NET Python to get all the points.
Polygon (EPolygon .NET Python)¶
A polygon can be closed or opened:
EPolygon::GetIsClosed.NET Python.A polygon is defined by its vertices:
Use
EPolygon::AppendVertex.NET Python,EPolygon::InsertVertex.NET Python,EPolygon::SetVertex.NET Python orEPolygon::RemoveVertex.NET Python to add, change or remove the vertices of the polygon.
For graphical manipulations:
Use
EPolygon::AddVertexAtDisplayPosition.NET Python to add a vertex along the polygon edge closest to the mouse.Use
EPolygon::RemoveVertexAtDisplayPosition.NET Python to remove the vertex located under the mouse.
Ellipse (EEllipse .NET Python)¶
Center:
EEllipse::GetCenter.NET Python.Horizontal and vertical radii:
EEllipse::GetHorizontalRadius.NET Python andEEllipse::GetVerticalRadius.NET Python.Orientation of the ellipse:
EEllipse::GetAngle.NET Python.Starting orientation of the ellipse when it is not full:
EEllipse::GetOriginAngle.NET Python.The amplitude of the ellipse when it is not full:
EEllipse::GetAmplitude.NET Python.Fit an ellipse to a set of points:
EEllipse::Fit.NET Python.
Note
The graphical manipulation of the ellipse is not possible at the moment.
Difference between a shape and a region or an arbitrarily shaped ROI¶
The objects do not have the same usage:
A shape is intended to just represent a shape and to perform geometric operations on that shape.
A region is an arbitrarily shaped region of interest in an image.
There are shape-based regions (
ERectangleRegion.NET Python,EPolygonRegion.NET Python…) that can be constructed from their equivalent shape objects.The shape-based regions inherit from
ERegion.NET Python and, as such, generate, store and manage the list of pixels to be processed. They are heavier objects compared to the shape objects.