Class EulerCorrection<B extends BooleanType<B>>
- java.lang.Object
-
- org.scijava.ops.image.topology.eulerCharacteristic.EulerCorrection<B>
-
- All Implemented Interfaces:
BiConsumer<RandomAccessibleInterval<B>,DoubleType>,Computers.Arity1<RandomAccessibleInterval<B>,DoubleType>
public class EulerCorrection<B extends BooleanType<B>> extends Object implements Computers.Arity1<RandomAccessibleInterval<B>,DoubleType>
An Op which calculates the correction needed to approximate the contribution of the image to the Euler characteristic χ of the whole image. That is, it's assumed that the image is a small part cut from a larger sample.From Odgaard & Gundersen (see below): "-- the Euler characteristic of the entire 3-D space will not be obtained by simply adding the Euler characteristics of cubic specimens. By doing this, the contribution of the lower dimensional elements will not be considered". They give the correction as c = -1/2χ_2 - 1/4χ_1 - -1/8χ_0, where
- χ_2 = χ of all the faces of the stack
- χ_1 = χ of all the edges of the stack
- χ_0 = χ of all the corner vertices of the stack.
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:
- Michael Doube (Royal Veterinary College, London), Richard Domander (Royal Veterinary College, London) NB: Methods are public and static to help testing
- Implementation Note:
- op names='topology.eulerCorrection'
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEulerCorrection.Traverser<B extends BooleanType<B>>A convenience class for passing parameters
-
Constructor Summary
Constructors Constructor Description EulerCorrection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompute(RandomAccessibleInterval<B> input, DoubleType output)TODOstatic <B extends BooleanType<B>>
intstackCorners(EulerCorrection.Traverser<B> traverser)Counts the foreground voxels in stack cornersstatic <B extends BooleanType<B>>
longstackEdges(EulerCorrection.Traverser<B> traverser)Count the foreground voxels on the edges lining the stackstatic <B extends BooleanType<B>>
intstackFaces(EulerCorrection.Traverser<B> traverser)Count the foreground voxels on the faces that line the stackstatic <B extends BooleanType<B>>
longvoxelEdgeFaceIntersections(EulerCorrection.Traverser<B> traverser)Count the intersections between voxel edges in each 2x2 neighborhood and the faces lining the stackstatic <B extends BooleanType<B>>
longvoxelEdgeIntersections(EulerCorrection.Traverser<B> traverser)Count the number of intersections between voxels in each 2x1 neighborhood and the the edges of the stackstatic <B extends BooleanType<B>>
longvoxelFaceIntersections(EulerCorrection.Traverser<B> traverser)Count the intersections between voxels in each 2x2 neighborhood and the faces lining the stack-
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> input, DoubleType output)
TODO- Specified by:
computein interfaceComputers.Arity1<RandomAccessibleInterval<B extends BooleanType<B>>,DoubleType>- Parameters:
input-output-
-
stackCorners
public static <B extends BooleanType<B>> int stackCorners(EulerCorrection.Traverser<B> traverser)
Counts the foreground voxels in stack cornersCalculates χ_0 from Odgaard and Gundersen
-
stackEdges
public static <B extends BooleanType<B>> long stackEdges(EulerCorrection.Traverser<B> traverser)
Count the foreground voxels on the edges lining the stackContributes to χ_1 from Odgaard and Gundersen
-
stackFaces
public static <B extends BooleanType<B>> int stackFaces(EulerCorrection.Traverser<B> traverser)
Count the foreground voxels on the faces that line the stackContributes to χ_2 from Odgaard and Gundersen
-
voxelEdgeIntersections
public static <B extends BooleanType<B>> long voxelEdgeIntersections(EulerCorrection.Traverser<B> traverser)
Count the number of intersections between voxels in each 2x1 neighborhood and the the edges of the stackContributes to χ_1 from Odgaard and Gundersen
-
voxelEdgeFaceIntersections
public static <B extends BooleanType<B>> long voxelEdgeFaceIntersections(EulerCorrection.Traverser<B> traverser)
Count the intersections between voxel edges in each 2x2 neighborhood and the faces lining the stackContributes to χ_2 from Odgaard and Gundersen
-
voxelFaceIntersections
public static <B extends BooleanType<B>> long voxelFaceIntersections(EulerCorrection.Traverser<B> traverser)
Count the intersections between voxels in each 2x2 neighborhood and the faces lining the stackContributes to χ_2 from Odgaard and Gundersen
-
-