java.lang.Object
net.imagej.ops.AbstractOp
net.imagej.ops.special.AbstractUnaryOp<Ellipsoid,net.imglib2.type.numeric.real.DoubleType>
net.imagej.ops.special.AbstractBinaryOp<Ellipsoid,org.joml.Vector3dc,net.imglib2.type.numeric.real.DoubleType>
net.imagej.ops.special.function.AbstractBinaryFunctionOp<Ellipsoid,org.joml.Vector3dc,net.imglib2.type.numeric.real.DoubleType>
org.bonej.ops.ellipsoid.DistanceFromEllipsoidSurfaceOp
- All Implemented Interfaces:
Runnable,net.imagej.ops.Environmental,net.imagej.ops.Initializable,net.imagej.ops.Op,net.imagej.ops.special.BinaryInput<Ellipsoid,,org.joml.Vector3dc> net.imagej.ops.special.BinaryOp<Ellipsoid,,org.joml.Vector3dc, net.imglib2.type.numeric.real.DoubleType> net.imagej.ops.special.function.BinaryFunctionOp<Ellipsoid,,org.joml.Vector3dc, net.imglib2.type.numeric.real.DoubleType> net.imagej.ops.special.function.NullaryFunctionOp<net.imglib2.type.numeric.real.DoubleType>,net.imagej.ops.special.function.UnaryFunctionOp<Ellipsoid,,net.imglib2.type.numeric.real.DoubleType> net.imagej.ops.special.NullaryOp<net.imglib2.type.numeric.real.DoubleType>,net.imagej.ops.special.Output<net.imglib2.type.numeric.real.DoubleType>,net.imagej.ops.special.SpecialOp,net.imagej.ops.special.UnaryInput<Ellipsoid>,net.imagej.ops.special.UnaryOp<Ellipsoid,,net.imglib2.type.numeric.real.DoubleType> net.imagej.ops.Threadable,org.scijava.command.Command,org.scijava.Initializable,org.scijava.plugin.SciJavaPlugin
public class DistanceFromEllipsoidSurfaceOp
extends net.imagej.ops.special.function.AbstractBinaryFunctionOp<Ellipsoid,org.joml.Vector3dc,net.imglib2.type.numeric.real.DoubleType>
An Op that calculates the distance between a point and an ellipsoid surface
Uses a hard-coded bivariate Newton-Raphson solver to efficiently find values of theta and phi that solve the orthogonality condition F(theta,phi)=0 for the vector between the surface and the point. Then converts into Cartesian coordinates to calculate the distance. Derivation of required terms courtesy of Robert Nürnberg, Imperial College London (See https://wwwf.imperial.ac.uk/~rn/distance2ellipse.pdf). Works for three-dimensional case only.
- Author:
- Alessandro Felder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.imagej.ops.special.SpecialOp
net.imagej.ops.special.SpecialOp.Flavor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate(Ellipsoid ellipsoid, org.joml.Vector3dc point) Calculates the shortest distance between a point and the surface of an ellipsoidMethods inherited from class net.imagej.ops.special.function.AbstractBinaryFunctionOp
in1, in2, out, run, setInput1, setInput2Methods inherited from class net.imagej.ops.AbstractOp
ops, setEnvironmentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.imagej.ops.special.function.BinaryFunctionOp
calculate, getIndependentInstance, runMethods inherited from interface net.imagej.ops.special.BinaryInput
in, setInputMethods inherited from interface net.imagej.ops.special.BinaryOp
getArityMethods inherited from interface net.imagej.ops.Environmental
ops, setEnvironmentMethods inherited from interface net.imagej.ops.Initializable
initializeMethods inherited from interface net.imagej.ops.special.function.NullaryFunctionOp
runMethods inherited from interface net.imagej.ops.special.function.UnaryFunctionOp
calculate, run
-
Constructor Details
-
DistanceFromEllipsoidSurfaceOp
public DistanceFromEllipsoidSurfaceOp()
-
-
Method Details
-
calculate
public net.imglib2.type.numeric.real.DoubleType calculate(Ellipsoid ellipsoid, org.joml.Vector3dc point) throws IllegalArgumentException Calculates the shortest distance between a point and the surface of an ellipsoid- Parameters:
ellipsoid- the ellipsoid in questionpoint- the point in question- Returns:
- shortest distance
- Throws:
IllegalArgumentException- iftoleranceis negative, ormaxIterationsis not positive.
-