public class IterableLine extends AbstractInterval implements IterableInterval<Void>
The cursors generated by the IterableInterval will iterate exactly
once over all the integer locations on a line between in proper order from
the specified start to the specified end points, included.
Two lines are considered equal iff their starting points and ending points
are at to the same locations. This is reflected in the
equals(Object), hashCode() and iterationOrder()
methods.
This implementation uses floating-point logic instead of the pure integer logic of Bresenham line (Wikipedia) but the results are quasi identical and the performance penalty small.
max, minn| Constructor and Description |
|---|
IterableLine(Localizable start,
Localizable end)
Instantiates a new line that goes from start to end points.
|
| Modifier and Type | Method and Description |
|---|---|
Cursor<Void> |
cursor() |
boolean |
equals(Object o) |
Void |
firstElement() |
int |
hashCode() |
Object |
iterationOrder() |
Iterator<Void> |
iterator() |
Cursor<Void> |
localizingCursor() |
long |
size() |
dimension, dimensions, max, max, max, min, min, min, realMax, realMax, realMax, realMin, realMin, realMin, toStringnumDimensionsclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratordimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMinmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMinallPositive, allPositive, dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivenumDimensionspublic IterableLine(Localizable start, Localizable end)
start - the location of the start point.end - the location of the end point.public long size()
size in interface IterableRealInterval<Void>public Void firstElement()
firstElement in interface IterableRealInterval<Void>public Object iterationOrder()
iterationOrder in interface IterableRealInterval<Void>public Cursor<Void> cursor()
cursor in interface IterableInterval<Void>cursor in interface IterableRealInterval<Void>public Cursor<Void> localizingCursor()
localizingCursor in interface IterableInterval<Void>localizingCursor in interface IterableRealInterval<Void>Copyright © 2009–2023 ImgLib2. All rights reserved.