public interface UnionFind
| Modifier and Type | Method and Description |
|---|---|
long |
findRoot(long id) |
long |
join(long root1,
long root2)
Join two sets represented by
root1 and root2 |
static <B extends net.imglib2.type.BooleanType<B>,L extends net.imglib2.type.numeric.IntegerType<L>> |
relabel(net.imglib2.RandomAccessibleInterval<B> mask,
net.imglib2.RandomAccessibleInterval<L> labeling,
UnionFind unionFind,
ToLongBiFunction<net.imglib2.Localizable,L> idForPixel,
LongUnaryOperator idForSet)
Relabel all mask pixels into the representative id of their containing
sets as defined by
unionFind. |
default <L extends net.imglib2.type.numeric.IntegerType<L>> |
relabel(net.imglib2.RandomAccessibleInterval<L> labeling)
Relabel all pixels into the representative id of their containing
sets as defined by
unionFind. |
default <B extends net.imglib2.type.BooleanType<B>,L extends net.imglib2.type.numeric.IntegerType<L>> |
relabel(net.imglib2.RandomAccessibleInterval<L> labeling,
ToLongBiFunction<net.imglib2.Localizable,L> idForPixel,
LongUnaryOperator idForSet)
Relabel all pixels into the representative id of their containing
sets as defined by
unionFind. |
long |
setCount() |
long |
size() |
long findRoot(long id)
id - idlong join(long root1,
long root2)
root1 and root2root1 - root2 - long size()
long setCount()
static <B extends net.imglib2.type.BooleanType<B>,L extends net.imglib2.type.numeric.IntegerType<L>> void relabel(net.imglib2.RandomAccessibleInterval<B> mask, net.imglib2.RandomAccessibleInterval<L> labeling, UnionFind unionFind, ToLongBiFunction<net.imglib2.Localizable,L> idForPixel, LongUnaryOperator idForSet)
unionFind.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.unionFind - UnionFindidForPixel - 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.default <B extends net.imglib2.type.BooleanType<B>,L extends net.imglib2.type.numeric.IntegerType<L>> void relabel(net.imglib2.RandomAccessibleInterval<L> labeling, ToLongBiFunction<net.imglib2.Localizable,L> idForPixel, LongUnaryOperator idForSet)
unionFind.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.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.default <L extends net.imglib2.type.numeric.IntegerType<L>> void relabel(net.imglib2.RandomAccessibleInterval<L> labeling)
unionFind.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.Copyright © 2009–2026 ImgLib2. All rights reserved.