Class EulerCharacteristic26N<B extends BooleanType<B>>
- java.lang.Object
-
- org.scijava.ops.image.topology.eulerCharacteristic.EulerCharacteristic26N<B>
-
- All Implemented Interfaces:
BiConsumer<RandomAccessibleInterval<B>,DoubleType>,Computers.Arity1<RandomAccessibleInterval<B>,DoubleType>
public class EulerCharacteristic26N<B extends BooleanType<B>> extends Object implements Computers.Arity1<RandomAccessibleInterval<B>,DoubleType>
An Op which calculates the Euler characteristic (χ) of the given 3D binary image.
Here Euler characteristic is defined as χ = β_0 - β_1 + β_2, where β_i are so called Betti numbers- β_0 = number of separate particles
- β_1 = number of handles
- β_2 = number enclosed cavities
The Op calculates χ by using the triangulation algorithm described by Toriwaki & Yonekura (see below).
There it's calculated X = ∑Δχ(V), where V is a 2x2x2 neighborhood around each point in the 3D space.
We are using the 26-neighborhood version of the algorithm. The Δχ(V) values here are predetermined.For the algorithm see
Toriwaki J, Yonekura T (2002)
Euler Number and Connectivity Indexes of a Three Dimensional Digital Picture
Forma 17: 183-209
http://www.scipress.org/journals/forma/abstract/1703/17030183.htmlFor the Betti number definition of Euler characteristic see
Odgaard A, Gundersen HJG (1993)
Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions
Bone 14: 173-182
doi:10.1016/8756-3282(93)90245-6- Author:
- Richard Domander (Royal Veterinary College, London), David Legland - original MatLab implementation
- Implementation Note:
- op names='topology.eulerCharacteristic26N'
-
-
Constructor Summary
Constructors Constructor Description EulerCharacteristic26N()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompute(RandomAccessibleInterval<B> interval, DoubleType output)TODOstatic <B extends BooleanType<B>>
intneighborhoodEulerIndex(RandomAccess<B> access, long x, long y, long z)Determines the LUT index for this 2x2x2 neighborhood-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Methods inherited from interface org.scijava.function.Computers.Arity1
accept
-
-
-
-
Method Detail
-
compute
public void compute(RandomAccessibleInterval<B> interval, DoubleType output)
TODO- Specified by:
computein interfaceComputers.Arity1<RandomAccessibleInterval<B extends BooleanType<B>>,DoubleType>- Parameters:
interval-output-
-
neighborhoodEulerIndex
public static <B extends BooleanType<B>> int neighborhoodEulerIndex(RandomAccess<B> access, long x, long y, long z)
Determines the LUT index for this 2x2x2 neighborhood- Parameters:
access- The space where the neighborhood isx- Location of the neighborhood in the 1st spatial dimension (x)y- Location of the neighborhood in the 2nd spatial dimension (y)z- Location of the neighborhood in the 3rd spatial dimension (z)- Returns:
- the index of the Δχ value for this configuration of voxels
-
-