public class Erosion extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends RealType<T>> |
erode(Img<T> source,
List<? extends Shape> strels,
int numThreads)
|
static <T extends Type<T> & Comparable<T>> |
erode(Img<T> source,
List<? extends Shape> strels,
T maxVal,
int numThreads)
|
static <T extends RealType<T>> |
erode(Img<T> source,
Shape strel,
int numThreads)
|
static <T extends Type<T> & Comparable<T>> |
erode(Img<T> source,
Shape strel,
T maxVal,
int numThreads)
|
static <T extends RealType<T>> |
erode(RandomAccessible<T> source,
IterableInterval<T> target,
List<? extends Shape> strels,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessible as a source and writing results in an
IterableInterval . |
static <T extends Type<T> & Comparable<T>> |
erode(RandomAccessible<T> source,
IterableInterval<T> target,
List<? extends Shape> strels,
T maxVal,
int numThreads)
Performs the erosion morphological operation, using a
RandomAccessible as a source and writing results in an
IterableInterval . |
static <T extends RealType<T>> |
erode(RandomAccessible<T> source,
IterableInterval<T> target,
Shape strel,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessible as a source and writing results in an
IterableInterval . |
static <T extends Type<T> & Comparable<T>> |
erode(RandomAccessible<T> source,
IterableInterval<T> target,
Shape strel,
T maxVal,
int numThreads)
Performs the erosion morphological operation, using a
RandomAccessible as a source and writing results in an
IterableInterval . |
static <T extends RealType<T>> |
erodeFull(Img<T> source,
List<? extends Shape> strels,
int numThreads)
|
static <T extends Type<T> & Comparable<T>> |
erodeFull(Img<T> source,
List<? extends Shape> strels,
T maxVal,
int numThreads)
|
static <T extends RealType<T>> |
erodeFull(Img<T> source,
Shape strel,
int numThreads)
|
static <T extends Type<T> & Comparable<T>> |
erodeFull(Img<T> source,
Shape strel,
T maxVal,
int numThreads)
|
static <T extends RealType<T>> |
erodeInPlace(RandomAccessible<T> source,
Interval interval,
List<? extends Shape> strels,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessibleInterval using a Shape as a flat
structuring element. |
static <T extends RealType<T>> |
erodeInPlace(RandomAccessible<T> source,
Interval interval,
Shape strel,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessibleInterval using a Shape as a flat
structuring element. |
static <T extends Type<T> & Comparable<T>> |
erodeInPlace(RandomAccessibleInterval<T> source,
Interval interval,
List<? extends Shape> strels,
T maxVal,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessibleInterval using a Shape as a flat
structuring element. |
static <T extends Type<T> & Comparable<T>> |
erodeInPlace(RandomAccessibleInterval<T> source,
Interval interval,
Shape strel,
T maxVal,
int numThreads)
Performs the erosion morphological operation, on a
RealType
RandomAccessibleInterval using a Shape as a flat
structuring element. |
public static <T extends RealType<T>> Img<T> erode(Img<T> source, List<? extends Shape> strels, int numThreads)
RealType
Img
using a list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned.
The result image has the same dimensions that of the source image. It is
limited to flat structuring elements, only having on/off
pixels, contrary to grayscale structuring elements. This allows to simply
use a Shape
as a type for these structuring elements.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends RealType
.source
- the source image.strels
- the structuring element as a list of Shape
s.numThreads
- the number of threads to use for the calculation.Img
, of same dimensions than the source.public static <T extends Type<T> & Comparable<T>> Img<T> erode(Img<T> source, List<? extends Shape> strels, T maxVal, int numThreads)
Img
using a
list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
The result image has the same dimensions that of the source image. It is
limited to flat structuring elements, only having on/off
pixels, contrary to grayscale structuring elements. This allows to simply
use a Shape
as a type for these structuring elements.
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source image.strels
- the structuring element, as a list of Shape
s.maxVal
- a T containing set to a value larger than any of the values in
the source Img
(against Comparable
. This is
required to perform a proper mathematical erosion. Because we
operate on a generic Type
, it has to be provided
manually.numThreads
- the number of threads to use for the calculation.Img
, of same dimensions than the source.public static <T extends RealType<T>> Img<T> erode(Img<T> source, Shape strel, int numThreads)
RealType
Img
using a Shape
as a flat structuring element.
See
Erosion_(morphology).
The result image has the same dimensions that of the source image. It is
limited to flat structuring elements, only having on/off
pixels, contrary to grayscale structuring elements. This allows to simply
use a Shape
as a type for these structuring elements.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends RealType
.source
- the source image.strel
- the structuring element as a Shape
.numThreads
- the number of threads to use for the calculation.Img
, of same dimensions than the source.public static <T extends Type<T> & Comparable<T>> Img<T> erode(Img<T> source, Shape strel, T maxVal, int numThreads)
Img
using a
Shape
as a flat structuring element.
See
Erosion_(morphology).
The result image has the same dimensions that of the source image. It is
limited to flat structuring elements, only having on/off
pixels, contrary to grayscale structuring elements. This allows to simply
use a Shape
as a type for these structuring elements.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source image.strel
- the structuring element as a Shape
.maxVal
- a T containing set to a value larger than any of the values in
the source Img
(against Comparable
. This is
required to perform a proper mathematical erosion. Because we
operate on a generic Type
, it has to be provided
manually.numThreads
- the number of threads to use for the calculation.Img
, of same dimensions than the source.public static <T extends RealType<T>> void erode(RandomAccessible<T> source, IterableInterval<T> target, List<? extends Shape> strels, int numThreads)
RealType
RandomAccessible
as a source and writing results in an
IterableInterval
.
See
Erosion_(morphology).
Careful: Target must point to a different structure than source. In place operation will not work but will not generate an error.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
It is limited to flat structuring elements, only having
on/off
pixels, contrary to grayscale structuring elements.
This allows to simply use a Shape
as a type for these structuring
elements.
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the target is left untouched.
source
- the source RandomAccessible
, must be sufficiently
padded.target
- the target image.strels
- the structuring element, as a list of Shape
s.numThreads
- the number of threads to use for the calculation.public static <T extends Type<T> & Comparable<T>> void erode(RandomAccessible<T> source, IterableInterval<T> target, List<? extends Shape> strels, T maxVal, int numThreads)
RandomAccessible
as a source and writing results in an
IterableInterval
.
See
Erosion_(morphology).
Careful: Target must point to a different structure than source. In place operation will not work but will not generate an error.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
It is limited to flat structuring elements, only having
on/off
pixels, contrary to grayscale structuring elements.
This allows to simply use a Shape
as a type for these structuring
elements.
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the target is left untouched.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source RandomAccessible
, must be sufficiently
padded.target
- the target image.strels
- the structuring element, as a list of Shape
s.maxVal
- a T containing set to a value larger than any of the values in
the source (against Comparable
. This is required to
perform a proper mathematical erosion. Because we operate on a
generic Type
, it has to be provided manually.numThreads
- the number of threads to use for the calculation.public static <T extends RealType<T>> void erode(RandomAccessible<T> source, IterableInterval<T> target, Shape strel, int numThreads)
RealType
RandomAccessible
as a source and writing results in an
IterableInterval
.
See
Erosion_(morphology).
Careful: Target must point to a different structure than source. In place operation will not work but will not generate an error.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
It is limited to flat structuring elements, only having
on/off
pixels, contrary to grayscale structuring elements.
This allows to simply use a Shape
as a type for these structuring
elements.
source
- the source RandomAccessible
, must be sufficiently
padded.target
- the target image.strel
- the structuring element, as a Shape
.numThreads
- the number of threads to use for the calculation.public static <T extends Type<T> & Comparable<T>> void erode(RandomAccessible<T> source, IterableInterval<T> target, Shape strel, T maxVal, int numThreads)
RandomAccessible
as a source and writing results in an
IterableInterval
.
See
Erosion_(morphology).
Careful: Target must point to a different structure than source. In place operation will not work but will not generate an error.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
It is limited to flat structuring elements, only having
on/off
pixels, contrary to grayscale structuring elements.
This allows to simply use a Shape
as a type for these structuring
elements.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source RandomAccessible
, must be sufficiently
padded.target
- the target image.strel
- the structuring element, as a Shape
.maxVal
- a T containing set to a value larger than any of the values in
the source (against Comparable
. This is required to
perform a proper mathematical erosion. Because we operate on a
generic Type
, it has to be provided manually.numThreads
- the number of threads to use for the calculation.public static <T extends RealType<T>> Img<T> erodeFull(Img<T> source, List<? extends Shape> strels, int numThreads)
RealType
Img
using a list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
This method performs what is called the 'full' erosion. That is: the
result image has its dimension enlarged by the structuring element, with
respect to the source image. It is limited to flat structuring elements,
only having on/off
pixels, contrary to grayscale structuring
elements. This allows to simply use a Shape
as a type for these
structuring elements.
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned.
Warning: Current implementation does not do stricto sensu
the full erosion. Indeed, if the structuring element has more dimensions
than the source Img
, they are ignored, and the returned
Img
has the same number of dimensions that of the source (but
eroded). This is due to the fact that we use a Shape
for
structuring elements, and that it does not return a number of dimensions.
The neighborhood created have therefore at most as many dimensions as the
source image. The real, full erosion results should have a number of
dimensions equals to the maximum of the number of dimension of both
source and structuring element.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends RealType
.source
- the source image.strels
- the structuring element as a list of Shape
s.numThreads
- the number of threads to use for the calculation.Img
, possibly of larger dimensions than the source.public static <T extends Type<T> & Comparable<T>> Img<T> erodeFull(Img<T> source, List<? extends Shape> strels, T maxVal, int numThreads)
Img
using a
list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
This method performs what is called the 'full' erosion. That is: the
result image has its dimension enlarged by the structuring element, with
respect to the source image. It is limited to flat structuring elements,
only having on/off
pixels, contrary to grayscale structuring
elements. This allows to simply use a Shape
as a type for these
structuring elements.
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
Warning: Current implementation does not do stricto sensu
the full erosion. Indeed, if the structuring element has more dimensions
than the source Img
, they are ignored, and the returned
Img
has the same number of dimensions that of the source (but
eroded). This is due to the fact that we use a Shape
for
structuring elements, and that it does not return a number of dimensions.
The neighborhood created have therefore at most as many dimensions as the
source image. The real, full erosion results should have a number of
dimensions equals to the maximum of the number of dimension of both
source and structuring element.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source image.strels
- the structuring element as a list of Shape
s.maxVal
- a T containing set to a value larger than any of the values in
the source Img
(against Comparable
. This is
required to perform a proper mathematical erosion. Because we
operate on a generic Type
, it has to be provided
manually.numThreads
- the number of threads to use for the calculation.Img
, possibly of larger dimensions than the source.public static <T extends RealType<T>> Img<T> erodeFull(Img<T> source, Shape strel, int numThreads)
RealType
Img
using a list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
This method performs what is called the 'full' erosion. That is: the
result image has its dimension enlarged by the structuring element, with
respect to the source image. It is limited to flat structuring elements,
only having on/off
pixels, contrary to grayscale structuring
elements. This allows to simply use a Shape
as a type for these
structuring elements.
Warning: Current implementation does not do stricto sensu
the full erosion. Indeed, if the structuring element has more dimensions
than the source Img
, they are ignored, and the returned
Img
has the same number of dimensions that of the source (but
eroded). This is due to the fact that we use a Shape
for
structuring elements, and that it does not return a number of dimensions.
The neighborhood created have therefore at most as many dimensions as the
source image. The real, full erosion results should have a number of
dimensions equals to the maximum of the number of dimension of both
source and structuring element.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends RealType
.source
- the source image.strel
- the structuring element as Shape
.numThreads
- the number of threads to use for the calculation.Img
, possibly of larger dimensions than the source.public static <T extends Type<T> & Comparable<T>> Img<T> erodeFull(Img<T> source, Shape strel, T maxVal, int numThreads)
Img
using a
list of Shape
s as a flat structuring element.
See
Erosion_(morphology).
This method performs what is called the 'full' erosion. That is: the
result image has its dimension enlarged by the structuring element, with
respect to the source image. It is limited to flat structuring elements,
only having on/off
pixels, contrary to grayscale structuring
elements. This allows to simply use a Shape
as a type for these
structuring elements.
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
Warning: Current implementation does not do stricto sensu
the full erosion. Indeed, if the structuring element has more dimensions
than the source Img
, they are ignored, and the returned
Img
has the same number of dimensions that of the source (but
eroded). This is due to the fact that we use a Shape
for
structuring elements, and that it does not return a number of dimensions.
The neighborhood created have therefore at most as many dimensions as the
source image. The real, full erosion results should have a number of
dimensions equals to the maximum of the number of dimension of both
source and structuring element.
T
- the type of the source image and the erosion result. Must be a
sub-type of T extends Comparable & Type
.source
- the source image.strel
- the structuring element as a Shape
.maxVal
- a T containing set to a value larger than any of the values in
the source Img
(against Comparable
. This is
required to perform a proper mathematical erosion. Because we
operate on a generic Type
, it has to be provided
manually.numThreads
- the number of threads to use for the calculation.Img
, possibly of larger dimensions than the source.public static <T extends RealType<T>> void erodeInPlace(RandomAccessible<T> source, Interval interval, List<? extends Shape> strels, int numThreads)
RealType
RandomAccessibleInterval
using a Shape
as a flat
structuring element.
See
Erosion_(morphology).
The result is written in the source image. This method is limited to flat
structuring elements, only having on/off
pixels, contrary to
grayscale structuring elements. This allows to simply use a Shape
as a type for these structuring elements.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned.
T
- the type of the source image. Must be a sub-type of
T extends RealType
.source
- the source image.interval
- an interval in the source image to process.strels
- the structuring element as a list of Shape
s.numThreads
- the number of threads to use for the calculation.public static <T extends Type<T> & Comparable<T>> void erodeInPlace(RandomAccessibleInterval<T> source, Interval interval, List<? extends Shape> strels, T maxVal, int numThreads)
RealType
RandomAccessibleInterval
using a Shape
as a flat
structuring element.
See
Erosion_(morphology).
The result is written in the source image. This method is limited to flat
structuring elements, only having on/off
pixels, contrary to
grayscale structuring elements. This allows to simply use a Shape
as a type for these structuring elements.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
*
The structuring element is specified through a list of Shape
s, to
allow for performance optimization through structuring element
decomposition. Each shape is processed in order as given in the list. If
the list is empty, the source image is returned. *
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image. Must be a sub-type of
T extends Comparable & Type
.source
- the source image.interval
- an interval in the source image to process.strels
- the structuring element as a list of Shape
s.maxVal
- a T containing set to a value larger than any of the values in
the source (against Comparable
. This is required to
perform a proper mathematical erosion. Because we operate on a
generic Type
, it has to be provided manually.numThreads
- the number of threads to use for the calculation.public static <T extends RealType<T>> void erodeInPlace(RandomAccessible<T> source, Interval interval, Shape strel, int numThreads)
RealType
RandomAccessibleInterval
using a Shape
as a flat
structuring element.
See
Erosion_(morphology).
The result is written in the source image. This method is limited to flat
structuring elements, only having on/off
pixels, contrary to
grayscale structuring elements. This allows to simply use a Shape
as a type for these structuring elements.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
T
- the type of the source image. Must be a sub-type of
T extends RealType
.source
- the source image.interval
- an interval in the source image to process.strel
- the structuring element as a Shape
.numThreads
- the number of threads to use for the calculation.public static <T extends Type<T> & Comparable<T>> void erodeInPlace(RandomAccessibleInterval<T> source, Interval interval, Shape strel, T maxVal, int numThreads)
RealType
RandomAccessibleInterval
using a Shape
as a flat
structuring element.
See
Erosion_(morphology).
The result is written in the source image. This method is limited to flat
structuring elements, only having on/off
pixels, contrary to
grayscale structuring elements. This allows to simply use a Shape
as a type for these structuring elements.
It is the caller responsibility to ensure that the source is sufficiently
padded to properly cover the target range plus the shape size. See
e.g. Views.extendValue(RandomAccessibleInterval, Type)
*
This method relies on a specified maximal value to start comparing to
other pixels in the neighborhood. For this code to properly perform
erosion, it is sufficient that the specified max value is larger (against
Comparable
) than any of the value found in the source image. This
normally unseen parameter is required to operate on
T extends Comparable & Type
.
T
- the type of the source image. Must be a sub-type of
T extends Comparable & Type
.source
- the source image.interval
- an interval in the source image to process.strel
- the structuring element as a Shape
.maxVal
- a T containing set to a value larger than any of the values in
the source (against Comparable
. This is required to
perform a proper mathematical erosion. Because we operate on a
generic Type
, it has to be provided manually.numThreads
- the number of threads to use for the calculation.Copyright © 2015–2022 ImgLib2. All rights reserved.