java.lang.Object
imagingbook.common.edges.EdgeTrace
- All Implemented Interfaces:
Iterable<Pnt2d.PntInt>
Represents a chain of connected edge points (integer pixel coordinates). As is, this could have also be implemented
as a generic
List
but additional properties may be added in a future version.- Version:
- 2022/09/07 made immutable, add() method removed
-
Constructor Summary
ConstructorsConstructorDescriptionEdgeTrace
(Pnt2d.PntInt[] points) Constructor, creates aEdgeTrace
from the specified points.EdgeTrace
(List<Pnt2d.PntInt> points) Constructor, creates aEdgeTrace
from the specified points. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
EdgeTrace
Constructor, creates aEdgeTrace
from the specified points.- Parameters:
points
- an array ofPnt2d.PntInt
elements
-
EdgeTrace
Constructor, creates aEdgeTrace
from the specified points.- Parameters:
points
- a list ofPnt2d.PntInt
elements
-
-
Method Details
-
size
Returns the size of (number of points in) this edge trace.- Returns:
- the size
-
getPoints
Returns an array of points contained in this edge trace.- Returns:
- an array of edge points
-
iterator
- Specified by:
iterator
in interfaceIterable<Pnt2d.PntInt>
-
toString
-