FFTConvolution instead@Deprecated public class FourierConvolution<T extends RealType<T>,S extends RealType<S>> extends Object implements MultiThreaded, OutputAlgorithm<Img<T>>, Benchmark
Img or RandomAccessibleInterval
with an kernel. The computation is based on the Fourier convolution theorem
and computation time is therefore independent of the size of kernel (except
the kernel becomes bigger than the input, which makes limited sense).
It is possible to exchange the kernel or the image if a series of images is
convolved with the same kernel - or if an image has to be convolved with
multiple kernels.
The precision of the computation is ComplexFloatType.| Constructor and Description |
|---|
FourierConvolution(Img<T> image,
Img<S> kernel)
Deprecated.
Computes a convolution in Fourier space.
|
FourierConvolution(Img<T> image,
Img<S> kernel,
ImgFactory<ComplexFloatType> fftImgFactory)
Deprecated.
Computes a convolution in Fourier space.
|
FourierConvolution(RandomAccessibleInterval<T> image,
RandomAccessibleInterval<S> kernel,
ImgFactory<T> imgFactory,
ImgFactory<S> kernelImgFactory,
ImgFactory<ComplexFloatType> fftImgFactory)
Deprecated.
Computes a convolution in Fourier space.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkInput()
Deprecated.
|
static <T extends RealType<T>,S extends RealType<S>> |
convolve(Img<T> img,
Img<S> kernel)
Deprecated.
|
static <T extends RealType<T>,S extends RealType<S>> |
convolve(RandomAccessibleInterval<T> input,
RandomAccessibleInterval<S> kernel,
ImgFactory<T> imgFactory,
ImgFactory<S> kernelImgFactory,
ImgFactory<ComplexFloatType> fftImgFactory)
Deprecated.
|
static Img<FloatType> |
createGaussianKernel(ImgFactory<FloatType> factory,
double[] sigmas)
Deprecated.
|
static Img<FloatType> |
createGaussianKernel(ImgFactory<FloatType> factory,
double sigma,
int numDimensions)
Deprecated.
|
ImgFactory<ComplexFloatType> |
fftImgFactory()
Deprecated.
|
String |
getErrorMessage()
Deprecated.
|
boolean |
getKeepImgFFT()
Deprecated.
|
int |
getNumThreads()
Deprecated.
The number of threads used by the algorithm
|
long |
getProcessingTime()
Deprecated.
|
Img<T> |
getResult()
Deprecated.
|
ImgFactory<T> |
imgFactory()
Deprecated.
|
protected void |
multiply(RandomAccessibleInterval<ComplexFloatType> a,
RandomAccessibleInterval<ComplexFloatType> b)
Deprecated.
Multiply in Fourier Space
|
boolean |
process()
Deprecated.
|
boolean |
replaceInput(RandomAccessibleInterval<T> img)
Deprecated.
|
boolean |
replaceKernel(RandomAccessibleInterval<S> knl)
Deprecated.
|
void |
setKeepImgFFT(boolean keepImgFFT)
Deprecated.
By default, he will not do the computation in-place and keep the imgFFT
|
void |
setNumThreads()
Deprecated.
Sets the number of threads to the amount of processors available
|
void |
setNumThreads(int numThreads)
Deprecated.
Sets the number of threads
|
public FourierConvolution(RandomAccessibleInterval<T> image, RandomAccessibleInterval<S> kernel, ImgFactory<T> imgFactory, ImgFactory<S> kernelImgFactory, ImgFactory<ComplexFloatType> fftImgFactory)
image - - the input to be convolvedkernel - - the kernel for the convolution operationfftImgFactory - - the ImgFactory that is used to create the FFT'simgFactory - - the ImgFactory that is used to compute the convolved
imagekernelImgFactory - - the ImgFactory that is used to extend the kernel to
the right sizepublic FourierConvolution(Img<T> image, Img<S> kernel, ImgFactory<ComplexFloatType> fftImgFactory)
image - - the input Img to be convolvedkernel - - the kernel Img for the convolution operationfftImgFactory - - the ImgFactory that is used to create the FFT'spublic FourierConvolution(Img<T> image, Img<S> kernel) throws IncompatibleTypeException
image - - the input Img to be convolvedkernel - - the kernel Img for the convolution operationIncompatibleTypeException - if the factory of the input Img<T> is not compatible
with the ComplexFloatType (it needs to be a
NativeType)public static <T extends RealType<T>,S extends RealType<S>> Img<T> convolve(Img<T> img, Img<S> kernel) throws IncompatibleTypeException
IncompatibleTypeExceptionpublic static <T extends RealType<T>,S extends RealType<S>> Img<T> convolve(RandomAccessibleInterval<T> input, RandomAccessibleInterval<S> kernel, ImgFactory<T> imgFactory, ImgFactory<S> kernelImgFactory, ImgFactory<ComplexFloatType> fftImgFactory)
public ImgFactory<ComplexFloatType> fftImgFactory()
ImgFactory that is used to create the FFT'spublic ImgFactory<T> imgFactory()
ImgFactory that is used to compute the convolved
imagepublic boolean replaceInput(RandomAccessibleInterval<T> img)
public void setKeepImgFFT(boolean keepImgFFT)
keepImgFFT - public boolean getKeepImgFFT()
public boolean replaceKernel(RandomAccessibleInterval<S> knl)
public static final Img<FloatType> createGaussianKernel(ImgFactory<FloatType> factory, double sigma, int numDimensions)
public static final Img<FloatType> createGaussianKernel(ImgFactory<FloatType> factory, double[] sigmas)
protected void multiply(RandomAccessibleInterval<ComplexFloatType> a, RandomAccessibleInterval<ComplexFloatType> b)
a - b - public long getProcessingTime()
getProcessingTime in interface Benchmarkpublic void setNumThreads()
MultiThreadedsetNumThreads in interface MultiThreadedpublic void setNumThreads(int numThreads)
MultiThreadedsetNumThreads in interface MultiThreadednumThreads - - number of threads to usepublic int getNumThreads()
MultiThreadedgetNumThreads in interface MultiThreadedpublic boolean checkInput()
checkInput in interface Algorithmpublic String getErrorMessage()
getErrorMessage in interface AlgorithmCopyright © 2015–2022 ImgLib2. All rights reserved.