Module org.bonej.bonej_ops
Package org.bonej.ops.mil
Class ParallelLineMIL<B extends net.imglib2.type.BooleanType<B>>
java.lang.Object
- All Implemented Interfaces:
Runnable,net.imagej.ops.Contingent,net.imagej.ops.Environmental,net.imagej.ops.Initializable,net.imagej.ops.Op,net.imagej.ops.special.BinaryInput<net.imglib2.RandomAccessibleInterval<B>,,ParallelLineGenerator> net.imagej.ops.special.BinaryOp<net.imglib2.RandomAccessibleInterval<B>,,ParallelLineGenerator, org.joml.Vector3d> net.imagej.ops.special.function.BinaryFunctionOp<net.imglib2.RandomAccessibleInterval<B>,,ParallelLineGenerator, org.joml.Vector3d> net.imagej.ops.special.function.NullaryFunctionOp<org.joml.Vector3d>,net.imagej.ops.special.function.UnaryFunctionOp<net.imglib2.RandomAccessibleInterval<B>,,org.joml.Vector3d> net.imagej.ops.special.NullaryOp<org.joml.Vector3d>,net.imagej.ops.special.Output<org.joml.Vector3d>,net.imagej.ops.special.SpecialOp,net.imagej.ops.special.UnaryInput<net.imglib2.RandomAccessibleInterval<B>>,net.imagej.ops.special.UnaryOp<net.imglib2.RandomAccessibleInterval<B>,,org.joml.Vector3d> net.imagej.ops.Threadable,org.scijava.command.Command,org.scijava.Initializable,org.scijava.plugin.SciJavaPlugin
public class ParallelLineMIL<B extends net.imglib2.type.BooleanType<B>>
extends net.imagej.ops.special.function.AbstractBinaryFunctionOp<net.imglib2.RandomAccessibleInterval<B>,ParallelLineGenerator,org.joml.Vector3d>
implements net.imagej.ops.Contingent
An op that finds the mean intercept length (MIL) vector of an interval.
A MIL vector is defined as MIL(v) = C(v) / h, where v is a set of parallel lines, C(v) is the number of times v intercept foreground, and h is the sum of lengths of v. The lines v are traced through the interval. A line intercepts foreground, when the previous point sampled along it is background, and the current one is foreground.
For example MIL vectors can be used to estimate the anisotropy of the "texture" in an image. It's best suited for images that are completely filled, and a part of a larger whole, e.g. a volume of trabecular bone.
For more details, see:
- Moreno et al., On the Efficiency of the Mean Intercept Length Tensor
- Odgaard A (1997) Three-dimensional methods for quantification of cancellous bone architecture. Bone 20: 315-28. doi:10.1016/S8756-3282(97)00007-0.
- Harrigan TP, Mann RW (1984) Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor. J Mater Sci 19: 761-767. doi:10.1007/BF00540446.
- Author:
- Richard Domander
-
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(net.imglib2.RandomAccessibleInterval<B> interval, ParallelLineGenerator parallelLineGenerator) Calculates the MIL vector of the interval.booleanconforms()static voidsetSeed(long seed) Sets the seed of the underlying random number generatorMethods 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
-
ParallelLineMIL
public ParallelLineMIL()
-
-
Method Details
-
calculate
public org.joml.Vector3d calculate(net.imglib2.RandomAccessibleInterval<B> interval, ParallelLineGenerator parallelLineGenerator) Calculates the MIL vector of the interval.- Specified by:
calculatein interfacenet.imagej.ops.special.function.BinaryFunctionOp<net.imglib2.RandomAccessibleInterval<B extends net.imglib2.type.BooleanType<B>>,ParallelLineGenerator, org.joml.Vector3d> - Parameters:
interval- a 3D interval.parallelLineGenerator- a generator of random lines for MIL sampling.- Returns:
- a vector v parallel to the MIL lines, whose magnitude ||v|| = total length of lines / total phase changes from background to foreground
-
conforms
public boolean conforms()- Specified by:
conformsin interfacenet.imagej.ops.Contingent
-
setSeed
public static void setSeed(long seed) Sets the seed of the underlying random number generatorOnly affects the random offset 0 < o < increment added to the sampling points (see
sampleSegment(RandomAccessible, Segment, Vector3dc, double))- Parameters:
seed- seed value
-