T - value type of the input image.C - component type.public final class BuildComponentTree<T extends Type<T>,C extends PartialComponent<T,C>> extends Object
The input to the algorithm is a RandomAccessibleInterval< T >.
Further, a Comparator<T> and a PartialComponent.Generator to
instantiate new components are required. Pixel locations are aggregated in
PartialComponents which are passed to a
PartialComponent.Handler whenever a connected component for a
specific threshold is completed.
Building up a tree structure out of the completed components should happen in
the PartialComponent.Handler implementation. See
PixelListComponentTree for an example.
TODO Add support for non-zero-min RandomAccessibleIntervals. (Currently, we assume that the input image is a zero-min interval.)
| Modifier and Type | Class and Description |
|---|---|
static class |
BuildComponentTree.BrightToDark<T extends Comparable<T>>
Default comparator for
Comparable pixel values for bright-to-dark
pass. |
static class |
BuildComponentTree.DarkToBright<T extends Comparable<T>>
Default comparator for
Comparable pixel values for dark-to-bright
pass. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Type<T> & Comparable<T>,C extends PartialComponent<T,C>> |
buildComponentTree(RandomAccessibleInterval<T> input,
PartialComponent.Generator<T,C> componentGenerator,
PartialComponent.Handler<C> componentHandler,
boolean darkToBright)
Run the algorithm.
|
static <T extends Type<T>,C extends PartialComponent<T,C>> |
buildComponentTree(RandomAccessibleInterval<T> input,
PartialComponent.Generator<T,C> componentGenerator,
PartialComponent.Handler<C> componentHandler,
Comparator<T> comparator)
Run the algorithm.
|
public static <T extends Type<T>,C extends PartialComponent<T,C>> void buildComponentTree(RandomAccessibleInterval<T> input, PartialComponent.Generator<T,C> componentGenerator, PartialComponent.Handler<C> componentHandler, Comparator<T> comparator)
PartialComponent.Handler which is responsible for building up the
tree structure. An implementations of PartialComponent.Handler is
provided for example by PixelListComponentTree.input - input image.componentGenerator - provides new PartialComponent instances.componentHandler - receives completed PartialComponents.comparator - determines ordering of threshold values.public static <T extends Type<T> & Comparable<T>,C extends PartialComponent<T,C>> void buildComponentTree(RandomAccessibleInterval<T> input, PartialComponent.Generator<T,C> componentGenerator, PartialComponent.Handler<C> componentHandler, boolean darkToBright)
PartialComponent.Handler which is responsible for building up the
tree structure. An implementations of PartialComponent.Handler is
provided for example by PixelListComponentTree.input - input image of a comparable value type.componentGenerator - provides new PartialComponent instances.componentHandler - receives completed PartialComponents.darkToBright - determines ordering of threshold values. If it is true, then
thresholds are applied from low to high values. Note that the
PartialComponent.Generator.createMaxComponent() needs
to match this ordering. For example when IntType using
darkToBright=false, then
PartialComponent.Generator.createMaxComponent() should
provide a Integer.MIN_VALUE valued component.Copyright © 2015–2022 ImgLib2. All rights reserved.