public final class ConnectedComponents extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConnectedComponents.StructuringElement |
Constructor and Description |
---|
ConnectedComponents() |
Modifier and Type | Method and Description |
---|---|
static <T extends IntegerType<T>,L,I extends IntegerType<I>> |
labelAllConnectedComponents(RandomAccessible<T> input,
ImgLabeling<L,I> labeling,
Iterator<L> labelGenerator,
ConnectedComponents.StructuringElement se)
Label all connected components in the given input image.
|
static <T extends IntegerType<T>,L,I extends IntegerType<I>> |
labelAllConnectedComponents(RandomAccessible<T> input,
ImgLabeling<L,I> labeling,
Iterator<L> labelGenerator,
ConnectedComponents.StructuringElement se,
ExecutorService service)
Label all connected components in the given input image.
|
static <T extends IntegerType<T>,L extends IntegerType<L>> |
labelAllConnectedComponents(RandomAccessible<T> input,
RandomAccessibleInterval<L> output,
ConnectedComponents.StructuringElement se)
"Label" all connected components in the given input image.
|
static <T extends IntegerType<T>,L extends IntegerType<L>> |
labelAllConnectedComponents(RandomAccessible<T> input,
RandomAccessibleInterval<L> output,
ConnectedComponents.StructuringElement se,
ExecutorService service)
"Label" all connected components in the given input image.
|
public static <T extends IntegerType<T>,L,I extends IntegerType<I>> void labelAllConnectedComponents(RandomAccessible<T> input, 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 IntegerType<T>,L,I extends IntegerType<I>> void labelAllConnectedComponents(RandomAccessible<T> input, 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 IntegerType<T>,L extends IntegerType<L>> int labelAllConnectedComponents(RandomAccessible<T> input, 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 IntegerType<T>,L extends IntegerType<L>> int labelAllConnectedComponents(RandomAccessible<T> input, 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 © 2015–2022 ImgLib2. All rights reserved.