public class ConnectedComponentAnalysis extends Object
| Constructor and Description |
|---|
ConnectedComponentAnalysis() |
| Modifier and Type | Method and Description |
|---|---|
static <B extends BooleanType<B>,L extends IntegerType<L>> |
connectedComponents(RandomAccessibleInterval<B> mask,
RandomAccessibleInterval<L> labeling)
Implementation of connected component analysis that uses
IntArrayRankedUnionFind to find sets of pixels that are connected
with respect to a 4-neighborhood (DiamondShape) or the
generalization for higher dimenions over a binary mask. |
static <B extends BooleanType<B>,L extends IntegerType<L>> |
connectedComponents(RandomAccessibleInterval<B> mask,
RandomAccessibleInterval<L> labeling,
Shape shape)
Implementation of connected component analysis that uses
IntArrayRankedUnionFind to find sets of pixels that are connected
with respect to a neighborhood (shape) over a binary mask. |
static <B extends BooleanType<B>,L extends IntegerType<L>> |
connectedComponents(RandomAccessibleInterval<B> mask,
RandomAccessibleInterval<L> labeling,
Shape shape,
LongFunction<UnionFind> unionFindFactory,
ToLongBiFunction<Localizable,L> idForPixel,
LongUnaryOperator idForSet)
Implementation of connected component analysis that uses
UnionFind to find sets of pixels that are connected with respect
to a neighborhood (shape) over a binary mask. |
static <B extends BooleanType<B>,C extends RealComposite<B>,L extends IntegerType<L>> |
connectedComponentsOnAffinities(RandomAccessible<C> affinities,
long[][] affinityOffsets,
RandomAccessibleInterval<L> labeling,
UnionFind uf,
long firstIndex)
Connected components on a regular arbitrary boolean affinity graph.
|
static <B extends BooleanType<B>,C extends RealComposite<B>,L extends IntegerType<L>> |
connectedComponentsOnAffinities(RandomAccessible<C> affinities,
long[][] affinityOffsets,
RandomAccessibleInterval<L> labeling,
UnionFind uf,
ToLongBiFunction<Localizable,L> id,
LongUnaryOperator idForSet)
Connected components on a regular arbitrary boolean affinity graph.
|
static <T> ToLongBiFunction<Localizable,T> |
idFromIntervalIndexer(Interval interval) |
public static <T> ToLongBiFunction<Localizable,T> idFromIntervalIndexer(Interval interval)
public static <B extends BooleanType<B>,L extends IntegerType<L>> void connectedComponents(RandomAccessibleInterval<B> mask, RandomAccessibleInterval<L> labeling)
IntArrayRankedUnionFind to find sets of pixels that are connected
with respect to a 4-neighborhood (DiamondShape) or the
generalization for higher dimenions over a binary mask. mask and
labeling are expected to have equal min and max.mask - Boolean mask to distinguish foreground (true) from
background (false).labeling - Output parameter to store labeling: background pixels are
labeled zero, foreground pixels are greater than zero: 1, 2,
..., N. Note that initially all pixels are expected to be zero
as background values will not be written.public static <B extends BooleanType<B>,L extends IntegerType<L>> void connectedComponents(RandomAccessibleInterval<B> mask, RandomAccessibleInterval<L> labeling, Shape shape)
IntArrayRankedUnionFind to find sets of pixels that are connected
with respect to a neighborhood (shape) over a binary mask.
mask
and labeling are expected to have equal min and max.mask - Boolean mask to distinguish foreground (true) from
background (false).labeling - Output parameter to store labeling: background pixels are
labeled zero, foreground pixels are greater than zero: 1, 2,
..., N. Note that initially all pixels are expected to be zero
as background values will not be written.shape - Connectivity of connected components, e.g. 4-neighborhood
(DiamondShape), 8-neighborhood
(RectangleNeighborhood) and their generalisations for
higher dimensions.public static <B extends BooleanType<B>,L extends IntegerType<L>> void connectedComponents(RandomAccessibleInterval<B> mask, RandomAccessibleInterval<L> labeling, Shape shape, LongFunction<UnionFind> unionFindFactory, ToLongBiFunction<Localizable,L> idForPixel, LongUnaryOperator idForSet)
UnionFind to find sets of pixels that are connected with respect
to a neighborhood (shape) over a binary mask. mask and
labeling are expected to have equal min and max.mask - Boolean mask to distinguish foreground (true) from
background (false).labeling - Output parameter to store labeling: background pixels are
labeled zero, foreground pixels are greater than zero: 1, 2,
..., N. Note that this is expected to be zero as background
values will not be written.shape - Connectivity of connected components, e.g. 4-neighborhood
(DiamondShape), 8-neighborhood
(RectangleNeighborhood) and their generalisations for
higher dimensions.unionFindFactory - Creates appropriate UnionFind data structure for size
of labeling, e.g. IntArrayRankedUnionFind of
appropriate size.idForPixel - Create id from pixel location and value. Multiple calls with
the same argument should always return the same result.idForSet - Create id for a set from the root id of a set. Multiple calls
with the same argument should always return the same result.public static <B extends BooleanType<B>,C extends RealComposite<B>,L extends IntegerType<L>> void connectedComponentsOnAffinities(RandomAccessible<C> affinities, long[][] affinityOffsets, RandomAccessibleInterval<L> labeling, UnionFind uf, ToLongBiFunction<Localizable,L> id, LongUnaryOperator idForSet)
B - boolean type used for affinity scalarsC - affinity vectorL - label output must fit number of componentsaffinities - affinity vector for each pixelaffinityOffsets - offset vector for each affinity indexlabeling - outputuf - union findid - id generator for pixels/ locationsidForSet - id generator for componentspublic static <B extends BooleanType<B>,C extends RealComposite<B>,L extends IntegerType<L>> void connectedComponentsOnAffinities(RandomAccessible<C> affinities, long[][] affinityOffsets, RandomAccessibleInterval<L> labeling, UnionFind uf, long firstIndex)
B - boolean type used for affinity scalarsC - affinity vectorL - label output must fit number of componentsaffinities - affinity vector for each pixelaffinityOffsets - offset vector for each affinity indexlabeling - outputfirstIndex - Copyright © 2015–2022 ImgLib2. All rights reserved.