|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjfftw.FFTW
jfftw.FFTWReal
public class FFTWReal
Class to implement simple one-off Real to Complex and Complex to RealFourier transforms using fftw as a native library.
A new plan is created for each FFT. This is sub-optimal for a large number of FFTs, but reasonable for ``one-off''s.
| Field Summary |
|---|
| Fields inherited from class jfftw.FFTW |
|---|
BACKWARD, errorStream, ESTIMATE, EXHAUSTIVE, FORWARD, FOURIER, loaded, PATIENT, planFlag, REAL, version |
| Constructor Summary | |
|---|---|
FFTWReal()
Default constructor. |
|
FFTWReal(boolean systemWisdom)
Constructor to optionally load system wisdom file if available. |
|
FFTWReal(FFTW fft)
Constructor to for a FFTWReal from a FFTW, The PlanFlag is also copied. |
|
FFTWReal(File wisdomFile)
Constructor to load specified wisdom file is available. |
|
FFTWReal(String wisdomFile)
Constructor to load specified wisdom file by name. |
|
| Method Summary | |
|---|---|
double[] |
oneDimensionalBackward(double[] complexArray)
Method to take a one dimensional Backward FFT of a complex hermition array to give Real output. |
double[] |
oneDimensionalForward(double[] realArray)
Method to take a one dimensional Forward FFT of a real data array of n elements. |
double[] |
threeDimensionalBackward(int width,
int height,
int depth,
double[] complexArray)
Method to take the three dimensional backward DFT of a hermition complex DFT held in a double array with real/imag parts in even/odd elements, with the i,j Complex components in : * |
double[] |
threeDimensionalForward(int width,
int height,
int depth,
double[] realArray)
Method to take the three dimensional Forward DFT of a real cube held in one dimensional double array. |
double[] |
twoDimensionalBackward(int width,
int height,
double[] complexArray)
Method to take the two dimensional backward DFT of a hermition complex DFT held in a double array with real/imag parts in even/odd elements, with the k,l Complex components in |
double[] |
twoDimensionalForward(int width,
int height,
double[] realArray)
Method to take the two-dimensional Forward FFT of a real data held in one dimensional double array. |
| Methods inherited from class jfftw.FFTW |
|---|
addPlanFlag, clearWisdom, exportWisdom, getPlanFlag, getVersion, getWisdom, loadWisdom, loadWisdom, loadWisdom, readWisdom, setErrorStream, setPlanFlag, setSystemWisdom, writeWisdom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FFTWReal()
public FFTWReal(FFTW fft)
fft - the FFTWpublic FFTWReal(boolean systemWisdom)
systemWisdom - if true loads system wisdom file.public FFTWReal(File wisdomFile)
wisdomFile - public FFTWReal(String wisdomFile)
wisdomFile - | Method Detail |
|---|
public double[] oneDimensionalForward(double[] realArray)
The output is Complex, held in a double[]
array with alternative
real/imaginary parts with a total of n/2+1 complex pairs.
Note the input and output arrays are of different length.
This method implements out-of-place transforms only, and the input real array is not modified.
realArray - the input real array (not changed)
public double[] oneDimensionalBackward(double[] complexArray)
n/2+1 Complex pairs.
The output is a double array of n elements;
note the input and output arrays are of different length.
This method implements out-of-place transforms.
complexArray - array of n/2+1 complex parts
public double[] twoDimensionalForward(int width,
int height,
double[] realArray)
i,j pixel of the real image is located in array element j*width + i.
The Complex FFT is returned in a double array with real/imag parts in
even/odd elements, with the k,l Complex components in
Real part in location 2(l x wft + k)
Imag part in location 2(l x wft + k) + 1
where wft = width/2 + 1
width - the image width.height - the image height.realArray - the image data in double[] of length width*height.
double[] DFT packed into one dimensional array
IllegalArgumentException - if width*height does not match the array length.
public double[] twoDimensionalBackward(int width,
int height,
double[] complexArray)
k,l Complex components in
Real part located at 2(j * wft + i)
Imag part located at 2(j * wft + i) + 1
where wft = width/2 + 1.
The transformed real data is returned in a one-dimension double array
with pixel i,j located at element j*width + i.
width - the image widthheight - the image heightcomplexArray - the Fourier data packed in a 1-d array.
double[] DFT packed into one dimensional array
IllegalArgumentException - if width*height is not consistent with array length.
public double[] threeDimensionalForward(int width,
int height,
int depth,
double[] realArray)
i,j,k pixel of the real cube is located in array element
k * width * height + j * width + i
The Complex DFT is returned in a double array with real/imag parts in even/odd elements, with the i,j Complex components in : *
Real part located at 2(k * wft * height + j * wft + i)
Imag part located at 2(k * wft * height + j * wft + i) + 1
where wft = width/2 + 1.
width - the cube widthheight - the cube heightdepth - the cube depthrealArray - the cube data in double[] of length width*height*depth
double[] DFT packed into one dimensional array
IllegalArgumentException - if width*height*depth is not equal the array length.
public double[] threeDimensionalBackward(int width,
int height,
int depth,
double[] complexArray)
Real part located at 2(k x wft x height + j x wft + i)
Imag part located at 2(k x wft x height + j x wft + i) + 1
where wft = width/2 + 1.
The transformed real data is returned in a one-dimensional double array
with pixel i,j located at element k x width x height + j x width + i.
width - the cube widthheight - the cube heightdepth - the cube depthcomplexArray - Fourier data packed in a 1-d array.
IllegalArgumentException - if width, height, depth is not consistent with array length.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||