public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getXYCircleBounds(int radius,
int[] lineBounds)
Midpoint circle algorithm: store the bounds of a circle in the given array.
|
static void |
getXYEllipseBounds(int a,
int b,
int[] lineBounds)
Store the half-widths of a X line to scan to fill an ellipse of given axis lengths.
|
public static final void getXYEllipseBounds(int a,
int b,
int[] lineBounds)
a is the axis half-length in the X direction, and b
is the axis half-length in the Y direction.
The half-widths will be stored in the array lineBounds, which must be of size equal
to at least b+1.
This is an implementation of the McIlroy's algorithm, adapted freely from http://enchantia.com/software/graphapp/doc/tech/ellipses.html.
a - half-length of the ellipse in the X directionb - half-length of the ellipse in the Y directionlineBounds - will store the half-length of the ellipse lines in the X directionpublic static final void getXYCircleBounds(int radius,
int[] lineBounds)
radius - the radius of the circlelineBounds - the array to store bounds inCopyright © 2015–2022 ImgLib2. All rights reserved.