public class EllipseCursor<T> extends Object implements Cursor<T>
Each point of the ellipse is iterated exactly once, and there is no "hole" in the ellipse. A bitmap excerpt from such a ellipse looks like this:
.......... OOO....... ...OO..... .....O.... .....O....
The circle generated with equal X and Y radii is not strictly equivalent to
the circle generated by the CircleCursor.
| Constructor and Description |
|---|
EllipseCursor(RandomAccessible<T> rai,
Localizable center,
long radiusX,
long radiusY)
Iterates over a Bresenham ellipse in the target
RandomAccessible. |
EllipseCursor(RandomAccessible<T> rai,
Localizable center,
long radiusX,
long radiusY,
int dimX,
int dimY)
Iterates over a Bresenham ellipse in the target
RandomAccessible. |
| Modifier and Type | Method and Description |
|---|---|
Cursor<T> |
copy() |
void |
fwd() |
T |
get() |
double |
getDoublePosition(int d) |
float |
getFloatPosition(int d) |
int |
getIntPosition(int d) |
long |
getLongPosition(int d) |
boolean |
hasNext() |
void |
jumpFwd(long steps) |
void |
localize(double[] position) |
void |
localize(float[] position) |
void |
localize(int[] position) |
void |
localize(long[] position) |
T |
next() |
int |
numDimensions() |
void |
reset() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopyCursorforEachRemaining, removelocalize, positionAsLongArray, positionAsPointlocalize, positionAsDoubleArray, positionAsRealPointpublic EllipseCursor(RandomAccessible<T> rai, Localizable center, long radiusX, long radiusY)
RandomAccessible.
Each point of the ellipse is iterated exactly once, and there is no
"hole" in the ellipse. The ellipse is written in a plane in dimensions 0
and 1.rai - the random accessible. It is the caller responsibility to
ensure it can be accessed everywhere the ellipse will be
iterated.center - the ellipse center. Must be at least of dimension 2.
Dimensions 0 and 1 are used to specify the ellipse center.radiusX - the ellipse radius in the dimension 0.radiusY - the ellipse radius in the dimension 1.public EllipseCursor(RandomAccessible<T> rai, Localizable center, long radiusX, long radiusY, int dimX, int dimY)
RandomAccessible.
Each point of the ellipse is iterated exactly once, and there is no
"hole" in the ellipse.rai - the random accessible. It is the caller responsibility to
ensure it can be accessed everywhere the ellipse will be
iterated.center - the ellipse center. Must be at least of dimension 2.
Dimensions 0 and 1 are used to specify the ellipse center.radiusX - the ellipse radius in dimension X.radiusY - the ellipse radius in dimension Y.dimX - the first dimension of the plane in which to draw the ellipse.dimY - the second dimension of the plane in which to draw the
ellipse.public void reset()
public void fwd()
public void localize(float[] position)
localize in interface RealLocalizablepublic void localize(double[] position)
localize in interface RealLocalizablepublic float getFloatPosition(int d)
getFloatPosition in interface LocalizablegetFloatPosition in interface RealLocalizablepublic double getDoublePosition(int d)
getDoublePosition in interface LocalizablegetDoublePosition in interface RealLocalizablepublic int numDimensions()
numDimensions in interface EuclideanSpacepublic void jumpFwd(long steps)
public T next()
public void localize(int[] position)
localize in interface Localizablepublic void localize(long[] position)
localize in interface Localizablepublic int getIntPosition(int d)
getIntPosition in interface Localizablepublic long getLongPosition(int d)
getLongPosition in interface LocalizableCopyright © 2009–2023 ImgLib2. All rights reserved.