public class EulerCorrection<B extends BooleanType<B>> extends AbstractUnaryHybridCF<RandomAccessibleInterval<B>,DoubleType> implements Ops.Topology.EulerCorrection, Contingent
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
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
Modifier and Type | Class and Description |
---|---|
static class |
EulerCorrection.Traverser<B extends BooleanType<B>>
A convenience class for passing parameters
|
SpecialOp.Flavor
NAME
Constructor and Description |
---|
EulerCorrection() |
Modifier and Type | Method and Description |
---|---|
void |
compute(RandomAccessibleInterval<B> interval,
DoubleType output)
Computes the output given some input.
|
boolean |
conforms()
The algorithm is defined only for 3D images
|
DoubleType |
createOutput(RandomAccessibleInterval<B> input)
Create an output object given some input.
|
static <B extends BooleanType<B>> |
stackCorners(EulerCorrection.Traverser<B> traverser)
Counts the foreground voxels in stack corners
|
static <B extends BooleanType<B>> |
stackEdges(EulerCorrection.Traverser<B> traverser)
Count the foreground voxels on the edges lining the stack
|
static <B extends BooleanType<B>> |
stackFaces(EulerCorrection.Traverser<B> traverser)
Count the foreground voxels on the faces that line the stack
|
static <B extends BooleanType<B>> |
voxelEdgeFaceIntersections(EulerCorrection.Traverser<B> traverser)
Count the intersections between voxel edges in each 2x2 neighborhood and the faces lining the stack
|
static <B extends BooleanType<B>> |
voxelEdgeIntersections(EulerCorrection.Traverser<B> traverser)
Count the number of intersections between voxels in each 2x1 neighborhood and the the edges of the stack
|
static <B extends BooleanType<B>> |
voxelFaceIntersections(EulerCorrection.Traverser<B> traverser)
Count the intersections between voxels in each 2x2 neighborhood and the faces lining the stack
|
in, out, setInput, setOutput
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ops, setEnvironment
calculate, calculate, createOutput, getIndependentInstance, run, run
compute
in, setInput
run
setOutput
candidates, filterArity, op
initialize
public boolean conforms()
conforms
in interface Contingent
public void compute(RandomAccessibleInterval<B> interval, DoubleType output)
UnaryComputerOp
compute
in interface UnaryComputerOp<RandomAccessibleInterval<B extends BooleanType<B>>,DoubleType>
interval
- Argument to the computation, which must be non-nulloutput
- Object where the computation's result will be stored, which
must be non-null and a different object than input
public DoubleType createOutput(RandomAccessibleInterval<B> input)
UnaryOutputFactory
createOutput
in interface UnaryOutputFactory<RandomAccessibleInterval<B extends BooleanType<B>>,DoubleType>
input
- which determines how to create the outputpublic static <B extends BooleanType<B>> int stackCorners(EulerCorrection.Traverser<B> traverser)
Calculates χ_0 from Odgaard and Gundersen
public static <B extends BooleanType<B>> long stackEdges(EulerCorrection.Traverser<B> traverser)
Contributes to χ_1 from Odgaard and Gundersen
public static <B extends BooleanType<B>> int stackFaces(EulerCorrection.Traverser<B> traverser)
Contributes to χ_2 from Odgaard and Gundersen
public static <B extends BooleanType<B>> long voxelEdgeIntersections(EulerCorrection.Traverser<B> traverser)
Contributes to χ_1 from Odgaard and Gundersen
public static <B extends BooleanType<B>> long voxelEdgeFaceIntersections(EulerCorrection.Traverser<B> traverser)
Contributes to χ_2 from Odgaard and Gundersen
public static <B extends BooleanType<B>> long voxelFaceIntersections(EulerCorrection.Traverser<B> traverser)
Contributes to χ_2 from Odgaard and Gundersen
Copyright © 2014–2022 ImageJ. All rights reserved.