T
- L
- public class DefaultLabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>> extends Object implements LabelingCursorStrategy<T,L>
Modifier and Type | Field and Description |
---|---|
protected long |
generation |
protected L |
labeling |
protected Map<T,mpicbg.imglib.labeling.DefaultLabelingCursorStrategy.LabelStatistics> |
statistics |
protected LabelingType<T> |
type |
Constructor and Description |
---|
DefaultLabelingCursorStrategy(L labeling) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeStatistics()
Compute all statistics on the labels if cache is dirty.
|
LocalizableCursor<FakeType> |
createLocalizableLabelCursor(T label)
A localizable cursor that iterates over every pixel with the given
label.
|
LocalizableCursor<FakeType> |
createLocalizablePerimeterCursor(T label)
A localizable cursor that iterates over every pixel in the perimeter
of the labeled object.
|
long |
getArea(T label)
Return the area of the labeled object in units of pixels or the volume
of the labeled object in voxels (or the hyper-volume of the 4/5-d
object in ?toxels? or ?spectracels? or ?spectratoxels?)
|
boolean |
getExtents(T label,
int[] minExtents,
int[] maxExtents)
Get the extents of the bounding box around the labeled object
|
Collection<T> |
getLabels()
Find all of the labels used to label pixels.
|
boolean |
getRasterStart(T label,
int[] start)
The coordinates of the first pixel with the given label when raster
scanning through the space.
|
protected long generation
protected LabelingType<T extends Comparable<T>> type
protected Map<T extends Comparable<T>,mpicbg.imglib.labeling.DefaultLabelingCursorStrategy.LabelStatistics> statistics
public DefaultLabelingCursorStrategy(L labeling)
protected void computeStatistics()
public LocalizableCursor<FakeType> createLocalizableLabelCursor(T label)
LabelingCursorStrategy
createLocalizableLabelCursor
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
label
- - the label of the pixels to be traversedpublic LocalizableCursor<FakeType> createLocalizablePerimeterCursor(T label)
LabelingCursorStrategy
createLocalizablePerimeterCursor
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
label
- - the label to be traversedpublic boolean getExtents(T label, int[] minExtents, int[] maxExtents)
LabelingCursorStrategy
getExtents
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
label
- - the label of the object in questionminExtents
- - on input, must be an array of size D or larger
where D is the dimension of the space. On output, the minimum value
of the pixel coordinates for the labeled object is stored in the array.maxExtents
- - the maximum value of the pixel coordinates for
the labeled object.public boolean getRasterStart(T label, int[] start)
LabelingCursorStrategy
getRasterStart
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
label
- - search on pixels of this labelstart
- - on input, an array of at least size D, on output
the coordinates of the raster start.public long getArea(T label)
LabelingCursorStrategy
getArea
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
public Collection<T> getLabels()
LabelingCursorStrategy
getLabels
in interface LabelingCursorStrategy<T extends Comparable<T>,L extends Labeling<T>>
Copyright © 2015–2021 Fiji. All rights reserved.