public class GeomMaths extends Object
| Constructor and Description |
|---|
GeomMaths() |
| Modifier and Type | Method and Description |
|---|---|
static List<Localizable> |
bresenham(List<? extends RealLocalizable> vertices) |
static Interval |
getBounds(Collection<? extends Localizable> vertices) |
static RealInterval |
getBoundsReal(Collection<? extends RealLocalizable> vertices) |
static RealInterval |
getBoundsReal(double[][] vertices)
Finds the smallest
RealInterval which contains all vertices. |
static RealInterval |
getBoundsReal(double[] x,
double[] y)
Finds the smallest
RealInterval which contains all x, y
coordinates. |
static boolean |
lineContains(double[] endpointOne,
double[] endpointTwo,
RealLocalizable testPoint,
int dims)
Tests if the point given point is on a line.
|
static boolean |
pnpoly(gnu.trove.list.array.TDoubleArrayList x,
gnu.trove.list.array.TDoubleArrayList y,
RealLocalizable localizable)
Return true if the given point is contained inside the boundary.
|
public static boolean lineContains(double[] endpointOne,
double[] endpointTwo,
RealLocalizable testPoint,
int dims)
endpointOne - Line segment endpointendpointTwo - Line segment endpointtestPoint - Point to testpublic static boolean pnpoly(gnu.trove.list.array.TDoubleArrayList x,
gnu.trove.list.array.TDoubleArrayList y,
RealLocalizable localizable)
public static Interval getBounds(Collection<? extends Localizable> vertices)
public static RealInterval getBoundsReal(Collection<? extends RealLocalizable> vertices)
public static RealInterval getBoundsReal(double[][] vertices)
RealInterval which contains all vertices.vertices - A 2D array containing all the vertices, where the first index
indicates the vertex and the second indicates the dimension.
So vertices[ 0 ][ 2 ] is the value of the first vertex
in the third dimension.RealInterval which contains all the verticespublic static RealInterval getBoundsReal(double[] x, double[] y)
RealInterval which contains all x, y
coordinates. If the x and y arrays are not equal in length the larger
array will be truncated.x - x coordinates of the verticesy - y coordinates of the verticesRealInterval which contains all the verticespublic static List<Localizable> bresenham(List<? extends RealLocalizable> vertices)
Copyright © 2015–2022 ImgLib2. All rights reserved.