| Modifier and Type | Field and Description |
|---|---|
List<Contour> |
children
sub contours
|
Contour |
parent
The parent contour, might be null
|
Pixel |
start
where the contour starts
|
ContourType |
type
The type of contour
|
| Constructor and Description |
|---|
Contour(ContourType type)
Construct a contour with the given type and start at the origin
|
Contour(ContourType type,
int x,
int y)
Construct a contour with the given type and start pixel
|
Contour(ContourType type,
Pixel p)
Construct a contour with the given type and start pixel
|
Contour(int x,
int y)
Construct a contour with the given starting coordinate and a
null type. |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Contour> |
contourIterable()
Get an
Iterable over all the contours belonging to this root
(including the root itself) |
Iterator<Contour> |
contourIterator()
Get an iterator over the complete set of contours (including the root
itself)
|
void |
finish()
Complete this contour by computing it's bounding box
|
boolean |
isHole()
Returns whether this polygon is representing a hole in another polygon.
|
protected void |
setParent(Contour bp) |
String |
toString()
Displays the complete list of vertices unless the number of vertices is
greater than 10 - then a sublist is shown of 5 from the start and 5 from
the end separated by ellipses.
|
addInnerPolygon, addInnerPolygon, addVertex, addVertex, asPolygon, calculateArea, calculateCentroid, calculateConvexHullMelkman, calculateDirection, calculateFirstMoment, calculatePerimeter, calculateRegularBoundingBox, calculateSecondMoment, calculateSecondMomentCentralised, calculateSignedArea, clone, close, closestPoint, difference, equals, equals, getInnerPoly, getInnerPolys, getNumInnerPoly, getVertices, hashCode, hasNoInnerPolygons, intersect, intersectionArea, intersectionArea, isClockwise, isClosed, isConvex, isEmpty, isInside, minimumBoundingRectangle, minimumBoundingRectangle, nVertices, open, reduceVertices, roundVertices, scale, scale, scaleX, scaleXY, scaleY, setIsHole, toEllipse, transform, translate, union, xorcalculateConvexHull, computeIntrinsicScale, computeMean, get, getHeight, getLines, getLines, getWidth, iterator, maxX, maxY, minX, minY, rotate, rotate, scaleCentroid, sizefinalize, getClass, notify, notifyAll, wait, wait, waitgetHeight, getWidth, maxX, maxY, minX, minY, scaleCentroidforEach, spliteratorpublic ContourType type
public Contour(ContourType type)
type - the typepublic Contour(ContourType type, int x, int y)
type - the typex - the x-ordinate of the start pixely - the y-ordinate of the start pixelpublic Contour(ContourType type, Pixel p)
type - the typep - the coordinate of the start pixelpublic Contour(int x, int y)
null type.x - the x-ordinate of the start pixely - the y-ordinate of the start pixelpublic String toString()
PolygontoString in class PolygonObject.toString()public void finish()
public Iterator<Contour> contourIterator()
public Iterable<Contour> contourIterable()
Iterable over all the contours belonging to this root
(including the root itself)