T
- element-type (an object-mask, or some class containing an object-mask).public class DecodeLabels<T> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DecodeLabels.CreateElementFromScaledObject<T>
Creates an element from the scaled-object and its index.
|
Constructor and Description |
---|
DecodeLabels(Voxels<?> voxels,
int minLabelInclusive,
int maxLabelInclusive,
DecodeLabels.CreateElementFromScaledObject<T> createScaledElement) |
Modifier and Type | Method and Description |
---|---|
List<T> |
create(int smallVolumeThreshold)
Creates a list of elements from voxels that are labelled with unique integers (sequentially
increasing).
|
Map<T,T> |
create(Map<Integer,T> labelMap,
java.util.function.UnaryOperator<T> operationAfterScaling)
Creates a map of elements to other elements that are labelled with unique integers
(sequentially increasing) in voxels.
|
public DecodeLabels(Voxels<?> voxels, int minLabelInclusive, int maxLabelInclusive, DecodeLabels.CreateElementFromScaledObject<T> createScaledElement)
public Map<T,T> create(Map<Integer,T> labelMap, java.util.function.UnaryOperator<T> operationAfterScaling) throws CreateException
labelMap
- a map from a label to what becomes the key in the output map (each label
should map to a unique key).operationAfterScaling
- an operation to apply after labelling, but before the element is
placed in the map.labelMap
and value as the element is derived from
the label - for each label.CreateException
- if bounding-boxes cannot be derived.public List<T> create(int smallVolumeThreshold) throws CreateException
smallVolumeThreshold
- minimum volume of bounding-box otherwise a label is ignored.CreateException
- if bounding-boxes cannot be derived.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.