public class FFTMethods extends Object
Constructor and Description |
---|
FFTMethods() |
Modifier and Type | Method and Description |
---|---|
static <T extends ComplexType<T>> |
complexConjugate(RandomAccessibleInterval<T> complexData) |
static <C extends ComplexType<C>> |
complexToComplex(RandomAccessibleInterval<C> data,
int dim,
boolean forward)
Computes a complex-to-complex forward or inverse FFT transform of an
n-dimensional dataset in a certain dimension.
|
static <C extends ComplexType<C>> |
complexToComplex(RandomAccessibleInterval<C> data,
int dim,
boolean forward,
boolean scale)
Computes a complex-to-complex forward or inverse FFT transform of an
n-dimensional dataset in a certain dimension.
|
static <C extends ComplexType<C>> |
complexToComplex(RandomAccessibleInterval<C> data,
int dim,
boolean forward,
boolean scale,
ExecutorService service)
Computes a complex-to-complex forward or inverse FFT transform of an
n-dimensional dataset in a certain dimension.
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
int dim)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
int dim,
boolean scale,
ExecutorService service)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
int dim,
boolean scale,
int nThreads)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
Interval interval,
int dim)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
Interval interval,
int dim,
boolean scale)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
Interval interval,
int dim,
boolean scale,
ExecutorService service)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <C extends ComplexType<C>,R extends RealType<R>> |
complexToReal(RandomAccessibleInterval<C> input,
RandomAccessibleInterval<R> output,
Interval interval,
int dim,
boolean scale,
int nThreads)
Computes a complex-to-real inverse FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static void |
dimensionsComplexToComplexFast(Dimensions inputDimensions,
long[] paddedDimensions)
Computes the supported dimensionality of an input dataset (of complex
numbers) for a forward/inverse FFT of the entire dataset AS FAST AS
POSSIBLE
|
static void |
dimensionsComplexToComplexSmall(Dimensions inputDimensions,
long[] paddedDimensions)
Computes the supported dimensionality of an input dataset (of complex
numbers) for a forward/inverse FFT of the entire dataset AS SMALL AS
POSSIBLE
|
static void |
dimensionsComplexToRealFast(Dimensions inputDimensions,
long[] paddedDimensions,
long[] realSize)
Computes the supported dimensionality of an input dataset (of complex
numbers) for an inverse FFT of the entire dataset AS FAST AS POSSIBLE
|
static void |
dimensionsComplexToRealSmall(Dimensions inputDimensions,
long[] paddedDimensions,
long[] realSize)
Computes the supported dimensionality of an input dataset (of complex
numbers) for an inverse FFT of the entire dataset AS SMALL AS POSSIBLE
|
static boolean |
dimensionsEqual(Dimensions interval,
Dimensions padded)
A helper method to test if padding is actually necessary
|
static boolean |
dimensionsEqual(Interval interval,
long[] paddedDimensions)
A helper method to test if padding is actually necessary
|
static void |
dimensionsRealToComplexFast(Dimensions inputDimensions,
long[] paddedDimensions,
long[] fftDimensions)
Computes the supported dimensionality of an input dataset (of real numbers)
for a forward FFT of the entire dataset AS FAST AS POSSIBLE
|
static void |
dimensionsRealToComplexSmall(Dimensions inputDimensions,
long[] paddedDimensions,
long[] fftDimensions)
Computes the supported dimensionality of an input dataset (of real numbers)
for a forward FFT of the entire dataset AS SMALL AS POSSIBLE
|
static Interval |
paddingIntervalCentered(Interval input,
Dimensions paddingDimensions)
Computes the padding interval required to perform an FFT when the padding
dimensions are known.
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
int dim)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
int dim,
boolean scale)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
int dim,
boolean scale,
ExecutorService service)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
int dim,
boolean scale,
int nThreads)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
Interval interval,
int dim)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
Interval interval,
int dim,
boolean scale)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
Interval interval,
int dim,
boolean scale,
ExecutorService service)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static <R extends RealType<R>,C extends ComplexType<C>> |
realToComplex(RandomAccessibleInterval<R> input,
RandomAccessibleInterval<C> output,
Interval interval,
int dim,
boolean scale,
int nThreads)
Computes a real-to-complex forward FFT transform of an n-dimensional
dataset in a certain dimension (typically dim = 0).
|
static Interval |
unpaddingIntervalCentered(Interval fftDimensions,
Dimensions originalDimensions)
Computes the un-padding interval required to extract the original sized
image from an inverse FFT when padding was applying upon the FFT.
|
protected static boolean |
verifyComplexToComplexfftDimensions(int inputSize,
int outputSize) |
protected static boolean |
verifyRealToComplexfftDimensions(int inputSize,
int outputSize) |
public static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, int dim)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetdim
- - the dimension to compute the inverse FFT inpublic static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, Interval interval, int dim)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetinterval
- - if just a subset of the real-values output is required it
can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the inverse FFT inpublic static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, Interval interval, int dim, boolean scale)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetinterval
- - if just a subset of the real-values output is required it
can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the inverse FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagepublic static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, int dim, boolean scale, int nThreads)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetdim
- - the dimension to compute the inverse FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagenThreads
- - number of threads to utilizepublic static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, Interval interval, int dim, boolean scale, int nThreads)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetinterval
- - if just a subset of the real-values output is required it
can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the inverse FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagenThreads
- - number of threads to utilizepublic static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, int dim, boolean scale, ExecutorService service)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetdim
- - the dimension to compute the inverse FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imageservice
- - service providing threads for multi-threading (if numDims
> 1)public static final <C extends ComplexType<C>,R extends RealType<R>> boolean complexToReal(RandomAccessibleInterval<C> input, RandomAccessibleInterval<R> output, Interval interval, int dim, boolean scale, ExecutorService service)
input
- - the complex-valued input datasetoutput
- - the real-valued output datasetinterval
- - if just a subset of the real-values output is required it
can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the inverse FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imageservice
- - service providing threads for multi-threading (if numDims
> 1)public static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, int dim)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetdim
- - the dimension to compute the FFT inpublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, Interval interval, int dim)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetinterval
- - if just a subset of the complex-valued output is required
it can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the FFT inpublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, int dim, boolean scale)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetdim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagepublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, Interval interval, int dim, boolean scale)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetinterval
- - if just a subset of the complex-valued output is required
it can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagepublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, int dim, boolean scale, int nThreads)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetdim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagenThreads
- - number of threads to utilizepublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, Interval interval, int dim, boolean scale, int nThreads)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetinterval
- - if just a subset of the complex-valued output is required
it can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imagenThreads
- - number of threads to utilizepublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, int dim, boolean scale, ExecutorService service)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetdim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imageservice
- - service providing threads for multi-threadingpublic static final <R extends RealType<R>,C extends ComplexType<C>> boolean realToComplex(RandomAccessibleInterval<R> input, RandomAccessibleInterval<C> output, Interval interval, int dim, boolean scale, ExecutorService service)
input
- - the real-valued input datasetoutput
- - the complex-valued output datasetinterval
- - if just a subset of the complex-valued output is required
it can be defined here (otherwise it can just be equal to output)dim
- - the dimension to compute the FFT inscale
- - define if each pixel is divided by the sum of all pixels in
the imageservice
- - service providing threads for multi-threading (if numDims
> 1)public static final <C extends ComplexType<C>> boolean complexToComplex(RandomAccessibleInterval<C> data, int dim, boolean forward)
data
- - the complex-valued dataset (FFT performed in-place)dim
- - the dimension to compute the inverse FFT inforward
- - true means forward FFT transform, false means inverse FFT
transformpublic static final <C extends ComplexType<C>> boolean complexToComplex(RandomAccessibleInterval<C> data, int dim, boolean forward, boolean scale)
data
- - the complex-valued dataset (FFT performed in-place)dim
- - the dimension to compute the inverse FFT inforward
- - true means forward FFT transform, false means inverse FFT
transformscale
- - define if each pixel is divided by the sum of all pixels in
the imagepublic static final <C extends ComplexType<C>> boolean complexToComplex(RandomAccessibleInterval<C> data, int dim, boolean forward, boolean scale, ExecutorService service)
data
- - the complex-valued dataset (FFT performed in-place)dim
- - the dimension to compute the inverse FFT inforward
- - true means forward FFT transform, false means inverse FFT
transformscale
- - define if each pixel is divided by the sum of all pixels in
the imageservice
- - service providing threads for multi-threading (if numDims
> 1)public static final Interval paddingIntervalCentered(Interval input, Dimensions paddingDimensions)
input
- - the input intervalpaddingDimensions
- - the dimensions of the paddingpublic static final Interval unpaddingIntervalCentered(Interval fftDimensions, Dimensions originalDimensions)
fftDimensions
- - the input intervaloriginalDimensions
- - the dimensions of the paddingpublic static final void dimensionsComplexToRealSmall(Dimensions inputDimensions, long[] paddedDimensions, long[] realSize)
inputDimensions
- - the dimensions of the complex-valued inputpaddedDimensions
- - the required dimensions of the complex-valued
input (computed)realSize
- - the dimensions of the real-valued output after the
inverse fast fourier transform (computed), i.e. which dimensions
are required for the outputpublic static final void dimensionsComplexToRealFast(Dimensions inputDimensions, long[] paddedDimensions, long[] realSize)
inputDimensions
- - the dimensions of the complex-valued inputpaddedDimensions
- - the required dimensions of the complex-valued
input (computed)realSize
- - the dimensions of the real-valued output after the
inverse fast fourier transform (computed), i.e. which dimensions
are required for the outputpublic static final boolean dimensionsEqual(Interval interval, long[] paddedDimensions)
interval
- - the dimensions of a datasetpaddedDimensions
- - the dimensions of a datasetpublic static final boolean dimensionsEqual(Dimensions interval, Dimensions padded)
interval
- - the dimensions of a datasetpadded
- - the dimensions of a datasetpublic static final void dimensionsRealToComplexFast(Dimensions inputDimensions, long[] paddedDimensions, long[] fftDimensions)
inputDimensions
- - the dimensions of the real-valued inputpaddedDimensions
- - the required dimensions of the real-valued input
(computed)fftDimensions
- - the dimensions of the complex-valued fft after the
fast fourier transform (computed), i.e. which dimensions are
required for the outputpublic static final void dimensionsRealToComplexSmall(Dimensions inputDimensions, long[] paddedDimensions, long[] fftDimensions)
inputDimensions
- - the dimensions of the real-valued inputpaddedDimensions
- - the required dimensions of the real-valued input
(computed)fftDimensions
- - the dimensions of the complex-valued fft after the
fast fourier transform (computed), i.e. which dimensions are
required for the outputpublic static final void dimensionsComplexToComplexFast(Dimensions inputDimensions, long[] paddedDimensions)
inputDimensions
- - the dimensions of the inputpaddedDimensions
- - the required dimensions of the input/output
(computed)public static final void dimensionsComplexToComplexSmall(Dimensions inputDimensions, long[] paddedDimensions)
inputDimensions
- - the dimensions of the inputpaddedDimensions
- - the required dimensions of the input/output
(computed)protected static final boolean verifyRealToComplexfftDimensions(int inputSize, int outputSize)
protected static final boolean verifyComplexToComplexfftDimensions(int inputSize, int outputSize)
public static final <T extends ComplexType<T>> void complexConjugate(RandomAccessibleInterval<T> complexData)
Copyright © 2015–2022 ImgLib2. All rights reserved.