public final class ConnectedComponents extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectedComponents.StructuringElement |
| Constructor and Description |
|---|
ConnectedComponents() |
public static <T extends net.imglib2.type.numeric.IntegerType<T>,L,I extends net.imglib2.type.numeric.IntegerType<I>> void labelAllConnectedComponents(net.imglib2.RandomAccessible<T> input, net.imglib2.roi.labeling.ImgLabeling<L,I> labeling, Iterator<L> labelGenerator, ConnectedComponents.StructuringElement se)
labelGenerator.next(). labelGenerator.next()
is called exactly n times if the input contains
n connected components.input - input image with pixels != 0 belonging to foreground.labeling - output labeling in which the connected components will be
labeled.labelGenerator - produces labels for the connected components.se - structuring element to use. 8-connected or 4-connected
(respectively n-dimensional analog)public static <T extends net.imglib2.type.numeric.IntegerType<T>,L,I extends net.imglib2.type.numeric.IntegerType<I>> void labelAllConnectedComponents(net.imglib2.RandomAccessible<T> input, net.imglib2.roi.labeling.ImgLabeling<L,I> labeling, Iterator<L> labelGenerator, ConnectedComponents.StructuringElement se, ExecutorService service)
labelGenerator.next(). labelGenerator.next()
is called exactly n times if the input contains
n connected components.input - input image with pixels != 0 belonging to foreground.labeling - output labeling in which the connected components will be
labeled.labelGenerator - produces labels for the connected components.se - structuring element to use. 8-connected or 4-connected
(respectively n-dimensional analog)service - service providing threads for multi-threadingpublic static <T extends net.imglib2.type.numeric.IntegerType<T>,L extends net.imglib2.type.numeric.IntegerType<L>> int labelAllConnectedComponents(net.imglib2.RandomAccessible<T> input, net.imglib2.RandomAccessibleInterval<L> output, ConnectedComponents.StructuringElement se)
Note, that the output image must be cleared to 0!
input - input image with pixels > 0 belonging to foreground.output - output image, must be filled with 0.se - structuring element to use. 8-connected or 4-connected
(respectively n-dimensional analog)public static <T extends net.imglib2.type.numeric.IntegerType<T>,L extends net.imglib2.type.numeric.IntegerType<L>> int labelAllConnectedComponents(net.imglib2.RandomAccessible<T> input, net.imglib2.RandomAccessibleInterval<L> output, ConnectedComponents.StructuringElement se, ExecutorService service)
Note, that the output image must be cleared to 0!
input - input image with pixels > 0 belonging to foreground.output - output image, must be filled with 0.se - structuring element to use. 8-connected or 4-connected
(respectively n-dimensional analog)service - service providing threads for multi-threadingCopyright © 2009–2026 ImgLib2. All rights reserved.