Package sc.fiji.snt
Class NearPoint
java.lang.Object
sc.fiji.snt.NearPoint
- All Implemented Interfaces:
Comparable<NearPoint>
This class encapsulates the relationship between an arbitrary point
(nearPoint.x,nearPoint.y,nearPoint.z) close to a particular point on a
particular path. The important method here is
distanceToPathNearPoint() which retrieves the distance to the nearest
point on the line segments on either side of the path point, rather than
just the point. Also, it will return null if the point appears to be "off the
end" of the Path.- Author:
- Mark Longair, Tiago Ferreira
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected sc.fiji.snt.NearPoint.IntersectionOnLinefinal intThe index of this point within its associated pathprotected PointInImage -
Constructor Summary
ConstructorsModifierConstructorDescriptionNearPoint(PointInImage nearPoint, Path path, int indexInPath) protectedNearPoint(PointInImage nearPoint, Path path, int indexInPath, boolean unScaledPositions) -
Method Summary
Modifier and TypeMethodDescriptionintstatic sc.fiji.snt.NearPoint.IntersectionOnLinedistanceFromPointToLine(double ax, double ay, double az, double vx, double vy, double vz, double x, double y, double z) protected static sc.fiji.snt.NearPoint.IntersectionOnLinedistanceFromSinglePointPath(double pathX, double pathY, double pathZ, double nearPointX, double nearPointY, double nearPointZ) static sc.fiji.snt.NearPoint.IntersectionOnLinedistanceToLineSegment(double x, double y, double z, double startX, double startY, double startZ, double endX, double endY, double endZ) doubleReturns the distance to the path, If a corresponding point on the path was found .doubledoublegetNode()getPath()static intnormalSideOfPlane(double cx, double cy, double cz, double nx, double ny, double nz, double x, double y, double z) toString()
-
Field Details
-
indexInPath
public final int indexInPathThe index of this point within its associated path -
near
-
closestIntersection
protected sc.fiji.snt.NearPoint.IntersectionOnLine closestIntersection
-
-
Constructor Details
-
NearPoint
-
NearPoint
-
-
Method Details
-
getNode
-
getNodeUnscaled
-
getPath
-
compareTo
- Specified by:
compareToin interfaceComparable<NearPoint>
-
toString
-
distanceToPathNearPoint
public double distanceToPathNearPoint()Returns the distance to the path, If a corresponding point on the path was found . Returns -1 if no such point can be found- Returns:
- the distance to the path, If a corresponding point on the path was found . Returns -1 if no such point can be found
-
distanceToLineSegment
public static sc.fiji.snt.NearPoint.IntersectionOnLine distanceToLineSegment(double x, double y, double z, double startX, double startY, double startZ, double endX, double endY, double endZ) -
distanceToPathPoint
public double distanceToPathPoint() -
distanceToPathPointSquared
public double distanceToPathPointSquared() -
normalSideOfPlane
public static int normalSideOfPlane(double cx, double cy, double cz, double nx, double ny, double nz, double x, double y, double z) -
distanceFromPointToLine
public static sc.fiji.snt.NearPoint.IntersectionOnLine distanceFromPointToLine(double ax, double ay, double az, double vx, double vy, double vz, double x, double y, double z) -
distanceFromSinglePointPath
protected static sc.fiji.snt.NearPoint.IntersectionOnLine distanceFromSinglePointPath(double pathX, double pathY, double pathZ, double nearPointX, double nearPointY, double nearPointZ)
-