public final class Gauss3 extends Object
Constructor and Description |
---|
Gauss3() |
Modifier and Type | Method and Description |
---|---|
static <S extends NumericType<S>,T extends NumericType<T>> |
gauss(double[] sigma,
RandomAccessible<S> source,
RandomAccessibleInterval<T> target)
Apply Gaussian convolution to source and write the result to target.
|
static <S extends NumericType<S>,T extends NumericType<T>> |
gauss(double[] sigma,
RandomAccessible<S> source,
RandomAccessibleInterval<T> target,
ExecutorService service)
Deprecated.
Deprecated. Please use
gauss(sigma, source, target) instead. The ExecutorService used to
calculate the Gaussion convolution may by set with the
Parallelization context, as show in this example:
Apply Gaussian convolution to source and write the result to output. In-place operation (source==target) is supported.
If the target type T is |
static <S extends NumericType<S>,T extends NumericType<T>> |
gauss(double[] sigma,
RandomAccessible<S> source,
RandomAccessibleInterval<T> target,
int numThreads)
Deprecated.
Deprecated. Please use
gauss(sigma, source, target) instead. The number of threads used to
calculate the Gaussion convolution may by set with the
Parallelization context, as show in this example:
Apply Gaussian convolution to source and write the result to output. In-place operation (source==target) is supported.
If the target type T is |
static <S extends NumericType<S>,T extends NumericType<T>> |
gauss(double sigma,
RandomAccessible<S> source,
RandomAccessibleInterval<T> target)
Apply Gaussian convolution to source and write the result to target.
|
static double[] |
halfkernel(double sigma,
int size,
boolean normalize)
Returns a gaussian half kernel with the given sigma and size.
|
static double[][] |
halfkernels(double[] sigma) |
static int[] |
halfkernelsizes(double[] sigma) |
public static <S extends NumericType<S>,T extends NumericType<T>> void gauss(double sigma, RandomAccessible<S> source, RandomAccessibleInterval<T> target) throws IncompatibleTypeException
If the target type T is DoubleType
, all calculations are done in
double precision. For all other target RealTypes
float
precision is used. General NumericTypes
are computed
in their own precision. The source type S and target type T are either
both RealTypes
or both the same type.
Computation may be multi-threaded, according to the current
Parallelization
context. (By default, it will use the
common ForkJoinPool
)
S
- source typeT
- target typesigma
- standard deviation of isotropic Gaussian.source
- source image, must be sufficiently padded (e.g.
Views.extendMirrorSingle(RandomAccessibleInterval)
) to
provide values for the target interval plus a border of half
the kernel size.target
- target imageIncompatibleTypeException
- if source and target type are not compatible (they must be
either both RealTypes
or the same type).public static <S extends NumericType<S>,T extends NumericType<T>> void gauss(double[] sigma, RandomAccessible<S> source, RandomAccessibleInterval<T> target) throws IncompatibleTypeException
If the target type T is DoubleType
, all calculations are done in
double precision. For all other target RealTypes
float
precision is used. General NumericTypes
are computed
in their own precision. The source type S and target type T are either
both RealTypes
or both the same type.
Computation may be multi-threaded, according to the current
Parallelization
context. (By default, it will use the
common ForkJoinPool
)
S
- source typeT
- target typesigma
- standard deviation in every dimension.source
- source image, must be sufficiently padded (e.g.
Views.extendMirrorSingle(RandomAccessibleInterval)
) to
provide values for the target interval plus a border of half
the kernel size.target
- target imageIncompatibleTypeException
- if source and target type are not compatible (they must be
either both RealTypes
or the same type).@Deprecated public static <S extends NumericType<S>,T extends NumericType<T>> void gauss(double[] sigma, RandomAccessible<S> source, RandomAccessibleInterval<T> target, int numThreads) throws IncompatibleTypeException
gauss(sigma, source, target)
instead. The number of threads used to
calculate the Gaussion convolution may by set with the
Parallelization
context, as show in this example:
Parallelization.runWithNumThreads( numThreads,
() -> gauss( sigma, source, target )
);
Apply Gaussian convolution to source and write the result to output. In-place operation (source==target) is supported.
If the target type T is DoubleType
, all calculations are done in
double precision. For all other target RealTypes
float
precision is used. General NumericTypes
are computed
in their own precision. The source type S and target type T are either
both RealTypes
or both the same type.
S
- source typeT
- target typesigma
- standard deviation in every dimension.source
- source image, must be sufficiently padded (e.g.
Views.extendMirrorSingle(RandomAccessibleInterval)
) to
provide values for the target interval plus a border of half
the kernel size.target
- target imagenumThreads
- how many threads to use for the computation.IncompatibleTypeException
- if source and target type are not compatible (they must be
either both RealTypes
or the same type).@Deprecated public static <S extends NumericType<S>,T extends NumericType<T>> void gauss(double[] sigma, RandomAccessible<S> source, RandomAccessibleInterval<T> target, ExecutorService service) throws IncompatibleTypeException
gauss(sigma, source, target)
instead. The ExecutorService used to
calculate the Gaussion convolution may by set with the
Parallelization
context, as show in this example:
Parallelization.runWithExecutor( executorService,
() -> gauss( sigma, source, target )
);
Apply Gaussian convolution to source and write the result to output. In-place operation (source==target) is supported.
If the target type T is DoubleType
, all calculations are done in
double precision. For all other target RealTypes
float
precision is used. General NumericTypes
are computed
in their own precision. The source type S and target type T are either
both RealTypes
or both the same type.
S
- source typeT
- target typesigma
- standard deviation in every dimension.source
- source image, must be sufficiently padded (e.g.
Views.extendMirrorSingle(RandomAccessibleInterval)
) to
provide values for the target interval plus a border of half
the kernel size.target
- target imageservice
- service providing threads for multi-threadingIncompatibleTypeException
- if source and target type are not compatible (they must be
either both RealTypes
or the same type).public static double[][] halfkernels(double[] sigma)
public static int[] halfkernelsizes(double[] sigma)
public static double[] halfkernel(double sigma, int size, boolean normalize)
The edges are smoothed by a second degree polynomial. This improves the first derivative and the fourier spectrum of the gaussian kernel.
Copyright © 2015–2022 ImgLib2. All rights reserved.