Modifier and Type | Class and Description |
---|---|
static class |
HyperSphereShape.NeighborhoodsAccessible<T> |
static class |
HyperSphereShape.NeighborhoodsIterableInterval<T> |
Constructor and Description |
---|
HyperSphereShape(long radius) |
Modifier and Type | Method and Description |
---|---|
long |
getRadius() |
Interval |
getStructuringElementBoundingBox(int numDimensions)
Get the bounding box for a
Shape with numDimensions
dimensions. |
<T> HyperSphereShape.NeighborhoodsIterableInterval<T> |
neighborhoods(RandomAccessibleInterval<T> source)
Get an
IterableInterval that contains all Neighborhoods of the source image. |
<T> HyperSphereShape.NeighborhoodsAccessible<T> |
neighborhoodsRandomAccessible(RandomAccessible<T> source)
Get an
RandomAccessibleInterval that contains all
Neighborhoods of the source image. |
<T> HyperSphereShape.NeighborhoodsAccessible<T> |
neighborhoodsRandomAccessibleSafe(RandomAccessible<T> source)
Get an
RandomAccessibleInterval that contains all
Neighborhoods of the source image. |
<T> HyperSphereShape.NeighborhoodsIterableInterval<T> |
neighborhoodsSafe(RandomAccessibleInterval<T> source)
Get an
IterableInterval that contains all Neighborhoods of the source image. |
String |
toString() |
public <T> HyperSphereShape.NeighborhoodsIterableInterval<T> neighborhoods(RandomAccessibleInterval<T> source)
Shape
IterableInterval
that contains all Neighborhoods
of the source image.
A Cursor
on the resulting accessible can be used to access the
neighborhoods
. As usual, when the cursor is moved, a
neighborhood obtained
previously from the cursor
should be considered invalid.
The neighborhoods
that are obtained from the
resulting accessible are unsafe in the following sense: Every time,
a Cursor
is requested (using IterableInterval.cursor()
etc)
the same Cursor
instance is re-used. If you require to have more
than one Cursor
into the current neighborhood at a given time you
have several options:
Sampler.copy()
the cursor you obtained using
IterableInterval.cursor()
.
IterableInterval
<Neighborhood
>.
Shape.neighborhoodsSafe(RandomAccessibleInterval)
which
returns a new IterableInterval.cursor()
every time (but therefore is
not recommended if you want to use enhanced for loops).
neighborhoods
in interface Shape
source
- source image.IterableInterval
that contains all
Neighborhoods
of the source image.public <T> HyperSphereShape.NeighborhoodsAccessible<T> neighborhoodsRandomAccessible(RandomAccessible<T> source)
Shape
RandomAccessibleInterval
that contains all
Neighborhoods
of the source image.
A RandomAccess
on the resulting accessible can be used to access
the neighborhoods
. As usual, when the access is
moved, a neighborhood obtained
previously from the
access should be considered invalid.
The neighborhoods
that are obtained from the
resulting accessible are unsafe in the following sense: Every time,
a Cursor
is requested (using IterableInterval.cursor()
etc)
the same Cursor
instance is re-used. If you require to have more
than one Cursor
into the current neighborhood at a given time you
have several options:
Sampler.copy()
the cursor you obtained using
IterableInterval.cursor()
.
RandomAccesses
, i.e.,
accesses on the
RandomAccessibleInterval
<Neighborhood
>.
Shape.neighborhoodsRandomAccessibleSafe(net.imglib2.RandomAccessible<T>)
which returns a new
IterableInterval.cursor()
every time (but therefore is not
recommended if you want to use enhanced for loops).
neighborhoodsRandomAccessible
in interface Shape
source
- source image.RandomAccessibleInterval
that contains all
Neighborhoods
of the source image.public <T> HyperSphereShape.NeighborhoodsIterableInterval<T> neighborhoodsSafe(RandomAccessibleInterval<T> source)
Shape
IterableInterval
that contains all Neighborhoods
of the source image.
A Cursor
on the resulting accessible can be used to access the
neighborhoods
. As usual, when the cursor is moved, a
neighborhood obtained
previously from the cursor
should be considered invalid.
Every time, a Cursor
is requested from a Neighborhood
(where the neighborhood in turn is obtained from a cursor on the
IterableInterval returned by this method) a new Cursor
instance
is created. If you want to use enhanced for loops on the
neighborhoods
, consider using
Shape.neighborhoods(RandomAccessibleInterval)
which re-uses the same
instance every time (but therefore has to be used carefully).
neighborhoodsSafe
in interface Shape
source
- source image.IterableInterval
that contains all
Neighborhoods
of the source image.public <T> HyperSphereShape.NeighborhoodsAccessible<T> neighborhoodsRandomAccessibleSafe(RandomAccessible<T> source)
Shape
RandomAccessibleInterval
that contains all
Neighborhoods
of the source image.
A RandomAccess
on the resulting accessible can be used to access
the neighborhoods
. As usual, when the access is
moved, a neighborhood obtained
previously from the
access should be considered invalid.
Every time, a Cursor
is requested from a Neighborhood
(where the neighborhood in turn is obtained from a cursor on the
IterableInterval returned by this method) a new Cursor
instance
is created. If you want to use enhanced for loops on the
neighborhoods
, consider using
Shape.neighborhoods(RandomAccessibleInterval)
which re-uses the same
instance every time (but therefore has to be used carefully).
neighborhoodsRandomAccessibleSafe
in interface Shape
source
- source image.RandomAccessibleInterval
that contains all
Neighborhoods
of the source image.public long getRadius()
public Interval getStructuringElementBoundingBox(int numDimensions)
Shape
Shape
with numDimensions
dimensions.
Providing numDimensions
is required since the input from which
neighborhoods
are generated is not known yet. The
bounding box is described by an Interval
with the center of the
bounding box located at zero.
The values of this bounding box should only be used to determine the extent
of the Shape
, ignoring the absolute min
and max
values.
getStructuringElementBoundingBox
in interface Shape
numDimensions
- dimensions of the Shape
Interval
that describes the bounding box of a
Shape
Copyright © 2015–2022 ImgLib2. All rights reserved.