T - the label typepublic class LabelRegion<T> extends PositionableInterval implements PositionableIterableRegion<BoolType>
ImgLabeling as a
PositionableIterableRegion. The interval bounds represent the
bounding box of all pixels having the label. If a RandomAccess is
requested for an interval not fully contained
in the bounding box, an OutOfBounds access is created with the value
false for pixels outside the bounding box.currentOffset, initialMax, initialMinpositionn| Modifier | Constructor and Description |
|---|---|
protected |
LabelRegion(LabelRegion<T> other)
Copy constructor.
|
|
LabelRegion(LabelRegions<T> regions,
net.imglib2.roi.labeling.LabelRegions.LabelRegionProperties regionProperties,
T label) |
| Modifier and Type | Method and Description |
|---|---|
LabelRegion<T> |
copy()
Create a copy of this
LabelRegion. |
long |
dimension(int d) |
void |
dimensions(long[] dimensions) |
RealLocalizable |
getCenterOfMass() |
T |
getLabel() |
BoolType |
getType() |
PositionableIterableInterval<Void> |
inside()
Get an
PositionableIterableInterval view of only the pixels contained in the
region (having value true). |
long |
max(int d) |
void |
max(long[] max) |
void |
max(Positionable max) |
long |
min(int d) |
void |
min(long[] min) |
void |
min(Positionable min) |
PositionableLocalizable |
origin()
Get the
Positionable, Localizable origin of this
interval. |
LabelRegionRandomAccess<T> |
randomAccess() |
RandomAccess<BoolType> |
randomAccess(Interval interval) |
void |
realMax(double[] max) |
double |
realMax(int d) |
void |
realMax(RealPositionable max) |
void |
realMin(double[] min) |
double |
realMin(int d) |
void |
realMin(RealPositionable min) |
bck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toStringgetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizenumDimensionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcursor, iterationOrder, localizingCursor, sizegetAt, getAt, getAtlocalizingSpliterator, spliteratorfirstElement, iterator, parallelStream, streammaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositivenumDimensionsgetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, positionAsDoubleArray, positionAsRealPointbck, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPositionpublic LabelRegion(LabelRegions<T> regions, net.imglib2.roi.labeling.LabelRegions.LabelRegionProperties regionProperties, T label)
protected LabelRegion(LabelRegion<T> other)
public LabelRegion<T> copy()
LabelRegion. The copy can be independently
positioned and its origin can be independently changed. All copies are
linked to the original Labeling and reflect all changes.copy in interface PositionableIterableRegion<BoolType>LabelRegion.public PositionableLocalizable origin()
PositionableIntervalPositionable, Localizable origin of this
interval.
The origin is the relative offset of the position to the minimum. For
example if a positionable (bitmask) region is made from a BitType
image with a circular pattern, then it is more natural if the region
position refers to the center of the pattern instead of the upper left
corner of the BitType image. This can be achieved by positioning
the origin.
Assume a region is created from a 9x9 bitmask. The region initially has
min=(0,0), max=(8,8), position=(0,0). Because both position and min are
(0,0), initially origin=(0,0). Now assume the origin is moved to the
center of the bitmask using
origin().setPosition(new int[]{4,4}). After this,
min=(-4,-4), max=(4,4), position=(0,0), and origin=(4,4).
origin in interface PositionableIterableRegion<BoolType>origin in class PositionableIntervalpublic T getLabel()
public RealLocalizable getCenterOfMass()
public LabelRegionRandomAccess<T> randomAccess()
randomAccess in interface RandomAccessible<BoolType>public RandomAccess<BoolType> randomAccess(Interval interval)
randomAccess in interface RandomAccessible<BoolType>public BoolType getType()
public PositionableIterableInterval<Void> inside()
PositionableIterableRegionPositionableIterableInterval view of only the pixels contained in the
region (having value true).
The position of the PositionableIterableRegion.inside() view is the same as the position of
this PositionableIterableRegion. Moving one will also move the
other.
inside in interface IterableRegion<BoolType>inside in interface PositionableIterableRegion<BoolType>public double realMin(int d)
realMin in interface IntervalrealMin in interface RealIntervalrealMin in class PositionableIntervalpublic void realMin(double[] min)
realMin in interface RealIntervalrealMin in class PositionableIntervalpublic void realMin(RealPositionable min)
realMin in interface RealIntervalrealMin in class PositionableIntervalpublic double realMax(int d)
realMax in interface IntervalrealMax in interface RealIntervalrealMax in class PositionableIntervalpublic void realMax(double[] max)
realMax in interface RealIntervalrealMax in class PositionableIntervalpublic void realMax(RealPositionable max)
realMax in interface RealIntervalrealMax in class PositionableIntervalpublic long min(int d)
min in interface Intervalmin in class PositionableIntervalpublic void min(long[] min)
min in interface Intervalmin in class PositionableIntervalpublic void min(Positionable min)
min in interface Intervalmin in class PositionableIntervalpublic long max(int d)
max in interface Intervalmax in class PositionableIntervalpublic void max(long[] max)
max in interface Intervalmax in class PositionableIntervalpublic void max(Positionable max)
max in interface Intervalmax in class PositionableIntervalpublic void dimensions(long[] dimensions)
dimensions in interface Dimensionsdimensions in class PositionableIntervalpublic long dimension(int d)
dimension in interface Dimensionsdimension in interface Intervaldimension in class PositionableIntervalCopyright © 2009–2024 ImgLib2. All rights reserved.