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, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected 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)
Image
createNewImage
in class Image<LabelingType<T extends Comparable<T>>>
dimensions
- - the dimensions of the Image
Image
public Image<LabelingType<T>> createNewImage(int[] dimensions)
Image
Image
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 Image
Image
public Image<LabelingType<T>> createNewImage(String name)
Image
createNewImage
in class Image<LabelingType<T extends Comparable<T>>>
Image
public Image<LabelingType<T>> createNewImage()
Image
Image
with the same dimensions, ContainerFactory
and Type
as this one, the name is given automatically.createNewImage
in class Image<LabelingType<T extends Comparable<T>>>
Image
public 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.