|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjfftw.DataArray
jfftw.ComplexDataArray
public class ComplexDataArray
Class to handle Complex Data arrays in either Real or Fourier space. This is the simplest fft interface with simple support for one, two and three dimensional complex data with, almost, all indexing problems covered by the support methods.
Novice users should start here, and use the more complex
RealDataArray or the low-level FFTW
if they want need either more efficient interface or have data
formatted other than the interleaved complex implemented here.
| Field Summary |
|---|
| Fields inherited from class jfftw.DataArray |
|---|
conversionFlag, currentWidth, dataBuffer, depth, errorStream, fftw, height, space, width |
| Constructor Summary | |
|---|---|
ComplexDataArray(BufferedImage bi,
int band)
Constructor to form the a two-dimensional ComplexDataArray from a band of a Java BufferedImage. |
|
ComplexDataArray(ComplexDataArray data)
Form a ComplexDataArray with all parameters taken from the specified ComplexDataArray. |
|
ComplexDataArray(int w)
Constructor to form a one-dimensional ComplexDataArray, which defaults to FFTW.REAL space. |
|
ComplexDataArray(int w,
int h)
Constructor to form a two-dimensional ComplexDataArray, which defaults to FFTW.REAL space. |
|
ComplexDataArray(int w,
int h,
int d)
Constructor to form a three-dimensional ComplexDataArray, which defaults to FFTW.REAL space. |
|
ComplexDataArray(int w,
int h,
int d,
double[] da)
Form a general ComplexDataArray with specified dimensional and supplied data array, which is NOT copied, it is used internally. |
|
ComplexDataArray(RealDataArray data)
Form a ComplexData array with real part of the data coming from a RealDataArray,
the imaginary part being zero. |
|
| Method Summary | |
|---|---|
void |
add(int i,
double a)
Add a double to real part of element |
void |
add(int i,
double a,
double b)
Add a Complex to specified |
void |
checker()
Method to apply a +/1 checker patterns to the Complex data, used to form centred FFTW. |
ComplexDataArray |
clone()
Form a deep clone of current ComplexDataArray, including data. |
void |
conjugate(int i)
Form the conjugate of the element on one-dimensions by negating the imaginary parts. |
void |
fourier()
Method to take in-place fft. |
Complex |
getComplex(int i)
Method to get a Complex element in one-dimensional case. |
double |
getDouble(int i)
Method to get the double value of the element on one-dimensions where the Complex real conversion is controlled by setConversion(), which defaults to
Complex.MODULUS. |
FFTWComplex |
getFFTW()
Method to get underlying FFTWComplex |
void |
mult(int i,
double a)
Multiply an element by a double |
void |
mult(int i,
double a,
double b)
Multiply an element by a Complex specified |
void |
setComplex(int i,
double a,
double b)
Method to set a Complex point in one-dimension with two doubles. |
void |
setDouble(int i,
double a)
Method to set the Real part of an element with a double, the imaginary part is not modified. |
| Methods inherited from class jfftw.DataArray |
|---|
add, add, add, add, add, add, centreFourier, clear, conjugate, conjugate, conjugate, getComplex, getComplex, getConversion, getCurrentWidth, getDataBuffer, getDepth, getDouble, getDouble, getHeight, getNormalisation, getRealDataArray, getRealDataArray, getSpace, getType, getWidth, isComplex, length, mult, mult, mult, mult, mult, mult, mult, mult, mult, multConjugate, normaliseDB, powerSpectrum, setComplex, setComplex, setComplex, setComplex, setComplex, setConversion, setDataBuffer, setDimensions, setDouble, setDouble, setNormalisation, setSpace, sizeMatch, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComplexDataArray(int w,
int h,
int d)
FFTW.REAL space.
All data is pre-initialised to zero.
w - the width (primary) dimensionh - the height (secondary) dimensiond - the depth (third) dimension
public ComplexDataArray(int w,
int h)
FFTW.REAL space.
w - the width (primary) dimensionh - the height (secondary) dimensionpublic ComplexDataArray(int w)
FFTW.REAL space.
w - the width (primary) dimensionpublic ComplexDataArray(ComplexDataArray data)
data - the ComplexDataArray
public ComplexDataArray(int w,
int h,
int d,
double[] da)
Use with care, you must format the supplied data in the
correct row interleaved format. If you are using this
in a main program, consider using the low-level level
FFTWComplex class.
w - the width (primary) dimensionh - the height (secondary) dimensiond - the depth (third) dimensionda - the data array.
IllegalArgumentException - if length of
data array does not match parameters.public ComplexDataArray(RealDataArray data)
RealDataArray,
the imaginary part being zero.
This is only valid for REAL space data.
data - the source RealDataArray
IllegalArgumentException - if
supplied ReadDataArray is not in real space.
public ComplexDataArray(BufferedImage bi,
int band)
BufferedImage. The
real parts are set by the image data, with the imaginary parts
set to zero.
bi - the BufferedImage supplying the size and databand - the band to be used. If negative or greater that
available bands, then the centre band will be used, so the
zero band on a monochrome image, or band 1 of a tricoloured image.| Method Detail |
|---|
public ComplexDataArray clone()
clone in class ObjectComplexDataArray cloned of current.public Complex getComplex(int i)
DataArray and handles the internal indexing.
For a multi-dimensional array this can be treated as
a one-dimensional array length
width*height*depth allowing more efficiency
one-dimensional access. This bypasses the array bound
checking.
getComplex in class DataArrayi - the element indexpublic double getDouble(int i)
setConversion(), which defaults to
Complex.MODULUS.
getDouble in class DataArrayi - the element index.
public void setComplex(int i,
double a,
double b)
setComplex in class DataArrayi - the element indexa - the real partb - the imaginary part
public void setDouble(int i,
double a)
setDouble in class DataArrayi - the element indexa - the double value
public void mult(int i,
double a)
mult in class DataArrayi - the element indexa - the multiplier
public void mult(int i,
double a,
double b)
mult in class DataArrayi - the element indexa - the real partb - the imaginary part
public void add(int i,
double a)
add in class DataArrayi - the element indexa - to be added to real part
public void add(int i,
double a,
double b)
add in class DataArrayi - the element indexa - the real partb - the imaginary partpublic void conjugate(int i)
conjugate in class DataArrayi - the element to be conjugated.public FFTWComplex getFFTW()
getFFTW in class DataArrayFFTWComplex used to do transforms.public void fourier()
true
fourier in class DataArrayDataArray.setNormalisation(boolean)public void checker()
checker in class DataArray
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||