T - The type of labels assigned to pixelsI - The pixel type of the backing image. The LabelingMapping
maps sets of labels to index values which can be more compactly
stored.public class ImgLabeling<T,I extends IntegerType<I>> extends AbstractWrappedInterval<RandomAccessibleInterval<I>> implements RandomAccessibleInterval<LabelingType<T>>, IterableInterval<LabelingType<T>>, SubIntervalIterable<LabelingType<T>>
image of integer
indices.LabelingMappingsourceInterval| Constructor and Description |
|---|
ImgLabeling(RandomAccessibleInterval<I> img) |
dimension, dimensions, max, max, max, min, min, mingetSource, numDimensions, realMax, realMax, realMax, realMin, realMin, realMinclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAt, getAt, getAtmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMinnumDimensionspublic ImgLabeling(RandomAccessibleInterval<I> img)
public static <T,I extends IntegerType<I>> ImgLabeling<T,I> fromImageAndLabelSets(RandomAccessibleInterval<I> img, List<Set<T>> labelSets)
Each pixel can have multiple labels. If there's only one label per pixel,
see fromImageAndLabels(net.imglib2.RandomAccessibleInterval<I>, java.util.List<T>)
The list of label sets gives the initial mapping between pixel values and labels. The pixel values of the index image must be non negative, and smaller than the size of the list of label sets. The first element of the list of label sets must always be the empty set. Every element in the list must be unique.
A pixel value of i represents a pixel, which has the labels, that are at index i in the list of label sets. A pixel value of 0 always represents a pixel with no labels, because the first entry in the list is always the empty set.
public static <T,I extends IntegerType<I>> ImgLabeling<T,I> fromImageAndLabels(RandomAccessibleInterval<I> img, List<T> labels)
This method does not support intersection labels, for intersecting labels
set see fromImageAndLabelSets(net.imglib2.RandomAccessibleInterval<I>, java.util.List<java.util.Set<T>>).
The pixel values of the index image must be between 0 and the length of the list of labels. A pixel value of zero represents a pixel with no label. A pixel value of N represents the label, which is given by the Nth entry in the list of labels.
public LabelingMapping<T> getMapping()
public RandomAccess<LabelingType<T>> randomAccess()
randomAccess in interface RandomAccessible<LabelingType<T>>public RandomAccess<LabelingType<T>> randomAccess(Interval interval)
randomAccess in interface RandomAccessible<LabelingType<T>>public Cursor<LabelingType<T>> cursor()
cursor in interface IterableInterval<LabelingType<T>>cursor in interface IterableRealInterval<LabelingType<T>>cursor in interface RandomAccessibleInterval<LabelingType<T>>public Cursor<LabelingType<T>> localizingCursor()
localizingCursor in interface IterableInterval<LabelingType<T>>localizingCursor in interface IterableRealInterval<LabelingType<T>>localizingCursor in interface RandomAccessibleInterval<LabelingType<T>>public LabelingType<T> firstElement()
firstElement in interface IterableRealInterval<LabelingType<T>>public LabelingType<T> getType()
getType in interface IterableRealInterval<LabelingType<T>>getType in interface Typed<LabelingType<T>>public Iterator<LabelingType<T>> iterator()
iterator in interface Iterable<LabelingType<T>>iterator in interface IterableRealInterval<LabelingType<T>>public long size()
size in interface IterableRealInterval<LabelingType<T>>size in interface RandomAccessibleInterval<LabelingType<T>>public Object iterationOrder()
iterationOrder in interface IterableRealInterval<LabelingType<T>>iterationOrder in interface RandomAccessibleInterval<LabelingType<T>>public boolean supportsOptimizedCursor(Interval interval)
supportsOptimizedCursor in interface SubIntervalIterable<LabelingType<T>>public Object subIntervalIterationOrder(Interval interval)
subIntervalIterationOrder in interface SubIntervalIterable<LabelingType<T>>public Cursor<LabelingType<T>> cursor(Interval interval)
cursor in interface SubIntervalIterable<LabelingType<T>>public Cursor<LabelingType<T>> localizingCursor(Interval interval)
localizingCursor in interface SubIntervalIterable<LabelingType<T>>public RandomAccessibleInterval<I> getIndexImg()
Copyright © 2009–2024 ImgLib2. All rights reserved.