public final class M extends Object
Constructor and Description |
---|
M() |
Modifier and Type | Method and Description |
---|---|
static void |
appendShortest(float f,
float precision,
StringBuilder sb)
Appends to @param sb the shortest possible String representation of a float number, according to the desired decimal @param precision.
|
static void |
apply(CoordinateTransform ict,
Area roi,
Area a)
Apply in place the @param ict to the Area @param a, but only for the part that intersects the roi.
|
static void |
apply(CoordinateTransform ict,
double[][] p,
int i,
double[] fp)
Reuses the @param fp to apply in place.
|
static void |
apply(VectorDataTransform vdt,
Area a) |
static void |
apply(VectorDataTransform vdt,
Area a,
boolean remove_outside)
Parts of @param a not intersected by any of @param vdt rois will be left untouched if @param remove_outside is false.
|
static Area |
areaInInts(Area area)
Converts all points in @param area to ints by casting.
|
static Area |
areaInIntsByRounding(Area area)
Converts all points in @param area to ints by rounding.
|
static VectorString2D |
asVectorString2D(Polygon pol,
double z) |
static float[] |
computeSegmentsIntersection(float ax0,
float ay0,
float ax1,
float ay1,
float bx0,
float by0,
float bx1,
float by1) |
static void |
convolveGaussianSigma1(float[] in,
float[] out,
CircularSequence seq) |
static Shape |
createArrowhead(double x1,
double y1,
double x2,
double y2)
Create an arrowhead at the end of the line segment defined by x1,y1 and x2,y2.
|
static Shape |
createArrowhead(double x1,
double y1,
double x2,
double y2,
double magnification) |
static List<Point3f> |
createIcosahedron(int subdivisions,
float radius)
Returns a "3D Viewer"-ready list mesh, centered at 0,0,0 and with radius as the radius of the enclosing sphere.
|
static ij.process.FloatPolygon |
createInterpolatedPolygon(ij.process.FloatPolygon p,
double interval,
boolean isLine)
Copied from ImageJ's ij.gui.PolygonRoi.getInterpolatedPolygon, by Wayne Rasband and collaborators.
|
static double |
distance(double x1,
double y1,
double x2,
double y2) |
static double |
distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
static double |
distance(Tuple3d t1,
Tuple3d t2) |
static double |
distancePointToLine(double px,
double py,
double lx1,
double ly1,
double lx2,
double ly2)
For a point px,py return its distance to a line defined by points lx1,ly1 and lx2,ly2.
|
static double |
distancePointToLine(double px,
double py,
double pz,
double lx1,
double ly1,
double lz1,
double lx2,
double ly2,
double lz2)
In 3D
|
static double |
distancePointToSegment(double px,
double py,
double lx1,
double ly1,
double lx2,
double ly2)
For a point px,py return its distance to a line SEGMENT defined by points lx1,ly1 and lx2,ly2.
|
static double |
distancePointToSegment(double px,
double py,
double pz,
double lx1,
double ly1,
double lz1,
double lx2,
double ly2,
double lz2) |
static double |
distancePointToSegment(Vector3d p,
Vector3d v1,
Vector3d v2)
Minimum distance between point v0 and a line segment defined by points v1 and v2.
|
static double |
distancePointToSegmentSq(double px,
double py,
double pz,
double lx1,
double ly1,
double lz1,
double lx2,
double ly2,
double lz2) |
static double |
distancePointToSegmentSq(Vector3d p,
Vector3d v1,
Vector3d v2) |
static double |
distanceSq(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
static double |
distanceSq(Tuple3d t1,
Tuple3d t2) |
static boolean |
equals(double a,
double b) |
static Polygon |
findPath(Area area,
int x,
int y)
Detect if a point is not in the area, but lays inside one of its path, which is returned as a Polygon.
|
static double |
getAngle(double x,
double y)
Returns the angle in radians of the given polar coordinates, correcting the Math.atan2 output.
|
static Area |
getArea(Roi roi) |
static Area |
getArea(ShapeRoi sroi) |
static Collection<Polygon> |
getPolygons(Area area) |
static Collection<Polygon> |
getPolygonsByRounding(Area area) |
static boolean |
intersects(Area a1,
Area a2)
Test whether the areas intersect each other.
|
static Point2D.Double |
inverseTransform(AffineTransform affine,
double x,
double y) |
static boolean |
isAreaROI(Roi roi)
Returns true if the roi is of closed shape type like an OvalRoi, ShapeRoi, a Roi rectangle, etc.
|
static boolean |
isEmpty(Area area) |
static double |
lateralAreaOfTruncatedCone(double r1,
double r2,
double height) |
static double |
measureArea(Area area,
Loader loader)
Returns the approximated area of the given Area object; Loader can be null; if not, it's used to secure memory space.
|
static double |
measureArea(Point3f p1,
Point3f p2,
Point3f p3)
Compute the area of the triangle defined by 3 points in 3D space, returning half of the length of the vector resulting from the cross product of vectors p1p2 and p1p3.
|
static void |
quicksort(float[] data,
Object[] sortAlso) |
static void |
quicksort(float[] data,
Object[] sortAlso,
int left,
int right)
Adapted from Stephan Preibisch's mpi.fruitfly.math.General homonimous method.
|
static String |
shortest(float f,
float precision)
Returns the shortest possible String representation of a float number, according to the desired decimal @param precision.
|
static Area[] |
splitArea(Area a,
PolygonRoi proi,
Rectangle world)
Returns an array of two Area objects, or of 1 if the @param proi doesn't intersect @param a.
|
static double |
totalAreaOfTruncatedCone(double r1,
double r2,
double height)
The lateral area plus the two circles.
|
static Point2D.Double |
transform(AffineTransform affine,
double x,
double y) |
static Area |
transform(CoordinateTransform ict,
Area a)
Return a new Area resulting from applying @param ict to @param a;
assumes areas consists of paths with moveTo, lineTo and close operations.
|
static double |
volumeOfTruncatedCone(double r1,
double r2,
double height) |
static CoordinateTransform |
wrap(AffineTransform to_world,
CoordinateTransform ict,
AffineTransform to_local)
The @param ict is expected to transform the data as if this data was expressed in world coordinates,
so this method returns a transformation list that prepends the transform from local to world, then the @param ict, then from world to local.
|
public static final double distancePointToSegment(double px, double py, double pz, double lx1, double ly1, double lz1, double lx2, double ly2, double lz2)
public static final double distancePointToSegmentSq(double px, double py, double pz, double lx1, double ly1, double lz1, double lx2, double ly2, double lz2)
public static final double distancePointToSegment(Vector3d p, Vector3d v1, Vector3d v2)
public static final double distancePointToSegmentSq(Vector3d p, Vector3d v1, Vector3d v2)
public static final double distance(double x1, double y1, double z1, double x2, double y2, double z2)
public static final double distance(double x1, double y1, double x2, double y2)
public static final double distanceSq(double x1, double y1, double z1, double x2, double y2, double z2)
public static double distancePointToLine(double px, double py, double pz, double lx1, double ly1, double lz1, double lx2, double ly2, double lz2)
public static double distancePointToLine(double px, double py, double lx1, double ly1, double lx2, double ly2)
public static double distancePointToSegment(double px, double py, double lx1, double ly1, double lx2, double ly2)
public static final boolean equals(double a, double b)
public static final Point2D.Double transform(AffineTransform affine, double x, double y)
public static final Point2D.Double inverseTransform(AffineTransform affine, double x, double y)
public static final double getAngle(double x, double y)
public static final boolean isEmpty(Area area)
public static final boolean intersects(Area a1, Area a2)
public static final double measureArea(Area area, Loader loader)
public static final double measureArea(Point3f p1, Point3f p2, Point3f p3)
public static final boolean isAreaROI(Roi roi)
public static final Collection<Polygon> getPolygons(Area area)
public static final Collection<Polygon> getPolygonsByRounding(Area area)
public static final Area transform(CoordinateTransform ict, Area a)
public static final void apply(CoordinateTransform ict, Area roi, Area a)
public static final void apply(VectorDataTransform vdt, Area a)
public static final void apply(VectorDataTransform vdt, Area a, boolean remove_outside)
public static final Polygon findPath(Area area, int x, int y)
public static final Area areaInInts(Area area)
public static final Area areaInIntsByRounding(Area area)
public static void quicksort(float[] data, Object[] sortAlso) throws IllegalArgumentException
IllegalArgumentException
public static void quicksort(float[] data, Object[] sortAlso, int left, int right)
public static final Shape createArrowhead(double x1, double y1, double x2, double y2)
public static final Shape createArrowhead(double x1, double y1, double x2, double y2, double magnification)
public static final List<Point3f> createIcosahedron(int subdivisions, float radius)
public static final void apply(CoordinateTransform ict, double[][] p, int i, double[] fp)
public static final CoordinateTransform wrap(AffineTransform to_world, CoordinateTransform ict, AffineTransform to_local) throws Exception
Exception
public static final String shortest(float f, float precision)
public static final void appendShortest(float f, float precision, StringBuilder sb)
public static final float[] computeSegmentsIntersection(float ax0, float ay0, float ax1, float ay1, float bx0, float by0, float bx1, float by1)
public static final Area[] splitArea(Area a, PolygonRoi proi, Rectangle world)
public static final VectorString2D asVectorString2D(Polygon pol, double z) throws Exception
Exception
public static final double volumeOfTruncatedCone(double r1, double r2, double height)
public static final double lateralAreaOfTruncatedCone(double r1, double r2, double height)
public static final double totalAreaOfTruncatedCone(double r1, double r2, double height)
public static final void convolveGaussianSigma1(float[] in, float[] out, CircularSequence seq)
public static final ij.process.FloatPolygon createInterpolatedPolygon(ij.process.FloatPolygon p, double interval, boolean isLine)
Copyright © 2015–2021 Fiji. All rights reserved.