public class ParallelLineMIL<B extends BooleanType<B>> extends AbstractBinaryFunctionOp<RandomAccessibleInterval<B>,ParallelLineGenerator,org.joml.Vector3d> implements Contingent
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:
SpecialOp.Flavor
Constructor and Description |
---|
ParallelLineMIL() |
Modifier and Type | Method and Description |
---|---|
org.joml.Vector3d |
calculate(RandomAccessibleInterval<B> interval,
ParallelLineGenerator parallelLineGenerator)
Calculates the MIL vector of the interval.
|
boolean |
conforms() |
static void |
setSeed(long seed)
Sets the seed of the underlying random number generator
|
in1, in2, out, run, setInput1, setInput2
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calculate, getIndependentInstance, run
in, setInput
calculate, run
run
candidates, filterArity, op
ops, setEnvironment
initialize
public org.joml.Vector3d calculate(RandomAccessibleInterval<B> interval, ParallelLineGenerator parallelLineGenerator)
calculate
in interface BinaryFunctionOp<RandomAccessibleInterval<B extends BooleanType<B>>,ParallelLineGenerator,org.joml.Vector3d>
interval
- a 3D interval.parallelLineGenerator
- a generator of random lines for MIL sampling.public boolean conforms()
conforms
in interface Contingent
public static void setSeed(long seed)
Only affects the random offset 0 < o < increment added to the sampling points
(see sampleSegment(RandomAccessible, Segment, Vector3dc, double)
)
seed
- seed valueCopyright © 2018–2022 BoneJ. All rights reserved.