T - - the type used to label the pixels, for instance string
names for user-assigned object labels or integers for machine-labeled
images.public class Labeling<T extends Comparable<T>> extends Image<LabelingType<T>>
| Modifier and Type | Field and Description |
|---|---|
protected LabelingCursorStrategy<T,Labeling<T>> |
strategy |
calibration, cursors, display, name| Constructor and Description |
|---|
Labeling(Container<LabelingType<T>> container,
LabelingType<T> type) |
Labeling(Container<LabelingType<T>> container,
LabelingType<T> type,
String name)
Create a named labeling from a container and a type
|
Labeling(ImageFactory<LabelingType<T>> imageFactory,
int[] dim,
String name)
Create a named labeling from an image factory
|
| Modifier and Type | Method and Description |
|---|---|
LocalizableCursor<FakeType> |
createLocalizableLabelCursor(T label)
Create a localizable cursor that can be used to find the pixels
associated with a particular label.
|
LocalizableCursor<FakeType> |
createLocalizablePerimeterCursor(T label)
Create a localizable cursor that can be used to find the pixels
in the perimeter of a label.
|
Image<LabelingType<T>> |
createNewImage()
Creates a new
Image with the same dimensions, ContainerFactory and Type as this one, the name is given automatically. |
Image<LabelingType<T>> |
createNewImage(int[] dimensions)
Creates a new
Image with the same ContainerFactory and Type as this one, the name is given automatically. |
Image<LabelingType<T>> |
createNewImage(int[] dimensions,
String name)
|
Image<LabelingType<T>> |
createNewImage(String name)
|
Labeling<T> |
createNewLabeling()
Create a new unnamed labeling of the same dimensions as this one
|
Labeling<T> |
createNewLabeling(int[] dimensions)
Create a new, unnamed labeling
|
Labeling<T> |
createNewLabeling(int[] dimensions,
String name)
Return a new named labeling using this labeling's factory
|
Labeling<T> |
createNewLabeling(String name)
Create a new named labeling whose dimensions are the same as
the current labeling
|
long |
getArea(T label)
Return the area or suitable N-d analog of the labeled object
|
boolean |
getExtents(T label,
int[] minExtents,
int[] maxExtents)
find the coordinates of the bounding box around the given
label.
|
Collection<T> |
getLabels()
Find all labels in the space
|
boolean |
getRasterStart(T label,
int[] start)
Find the first pixel in a raster scan of the object with the given label.
|
void |
setLabelingCursorStrategy(LabelingCursorStrategy<T,Labeling<T>> strategy)
Use an alternative strategy for making labeling cursors.
|
add, addAll, addCursor, clear, clone, close, closeAllCursors, contains, containsAll, createCursor, createInterpolator, createLocalizableByDimCursor, createLocalizableByDimCursor, createLocalizableCursor, createLocalizablePlaneCursor, createPositionArray, createType, createUniqueId, getActiveCursors, getCalibration, getCalibration, getContainer, getContainerFactory, getCursors, getCursors, getDimension, getDimensions, getDimensions, getDisplay, getImageFactory, getName, getNumActiveCursors, getNumCursors, getNumDimensions, getNumPixels, isEmpty, iterator, remove, removeAll, removeAllCursors, removeCursor, retainAll, setCalibration, setCalibration, setDefaultDisplay, setDisplay, setName, size, toArray, toArray, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamprotected LabelingCursorStrategy<T extends Comparable<T>,Labeling<T extends Comparable<T>>> strategy
public Labeling(Container<LabelingType<T>> container, LabelingType<T> type, String name)
container - - container appropriate for storing the typetype - - an instance of the labeling's type for generic resolutionname - - the name to assignpublic Labeling(ImageFactory<LabelingType<T>> imageFactory, int[] dim, String name)
imageFactory - dim - - dimensions of the imagename - - image namepublic Labeling(Container<LabelingType<T>> container, LabelingType<T> type)
public void setLabelingCursorStrategy(LabelingCursorStrategy<T,Labeling<T>> strategy)
strategy - - a strategy for making labeling cursors.public Image<LabelingType<T>> createNewImage(int[] dimensions, String name)
ImagecreateNewImage in class Image<LabelingType<T extends Comparable<T>>>dimensions - - the dimensions of the ImageImagepublic Image<LabelingType<T>> createNewImage(int[] dimensions)
ImageImage with the same ContainerFactory and Type as this one, the name is given automatically.createNewImage in class Image<LabelingType<T extends Comparable<T>>>dimensions - - the dimensions of the ImageImagepublic Image<LabelingType<T>> createNewImage(String name)
ImagecreateNewImage in class Image<LabelingType<T extends Comparable<T>>>Imagepublic Image<LabelingType<T>> createNewImage()
ImageImage with the same dimensions, ContainerFactory and Type as this one, the name is given automatically.createNewImage in class Image<LabelingType<T extends Comparable<T>>>Imagepublic Labeling<T> createNewLabeling(int[] dimensions, String name)
dimensions - - dimensions of the new labelingname - - it's namepublic Labeling<T> createNewLabeling(int[] dimensions)
dimensions - - dimensions of the labeling's spacepublic Labeling<T> createNewLabeling(String name)
name - name for the new labelingpublic Labeling<T> createNewLabeling()
public LocalizableCursor<FakeType> createLocalizableLabelCursor(T label)
label - - the label to findpublic LocalizableCursor<FakeType> createLocalizablePerimeterCursor(T label)
label - public boolean getExtents(T label, int[] minExtents, int[] maxExtents)
label - - find pixels with this labelpublic boolean getRasterStart(T label, int[] start)
label - start - public long getArea(T label)
label - - label for object in questionpublic Collection<T> getLabels()
Copyright © 2015–2021 Fiji. All rights reserved.