public class RealFFTUtils_3D extends Object
DoubleFFT_3D.realForward(double[])
DoubleFFT_3D.realForward(DoubleLargeArray)
DoubleFFT_3D.realForward(double[][][])
FloatFFT_3D.realForward(float[])
FloatFFT_3D.realForward(FloatLargeArray)
FloatFFT_3D.realForward(float[][][])
DoubleFFT_3D fft = new DoubleFFT_2D(slices, rows, columns); double[] data = new double[2 * slices * rows * columns]; ... fft.realForwardFull(data); data[(s1 * rows + r1) * 2 * columns + c1] = val1; val2 = data[(s2 * rows + r2) * 2 * columns + c2];is equivalent to
DoubleFFT_3D fft = new DoubleFFT_3D(slices, rows, columns); RealFFTUtils_3D unpacker = new RealFFTUtils_3D(slices, rows, columns); double[] data = new double[slices * rows * columns]; ... fft.realForward(data); unpacker.pack(val1, s1, r1, c1, data); val2 = unpacker.unpack(s2, r2, c2, data, 0);Even (resp. odd) values of
c
correspond to the real (resp.
imaginary) part of the Fourier mode.
DoubleFFT_3D fft = new DoubleFFT_3D(slices, rows, columns); double[][][] data = new double[slices][rows][2 * columns]; ... fft.realForwardFull(data); data[s1][r1][c1] = val1; val2 = data[s2][r2][c2];is equivalent to
DoubleFFT_3D fft = new DoubleFFT_3D(slices, rows, columns); RealFFTUtils_3D unpacker = new RealFFTUtils_3D(slices, rows, columns); double[][][] data = new double[slices][rows][columns]; ... fft.realForward(data); unpacker.pack(val1, s1, r1, c1, data); val2 = unpacker.unpack(s2, r2, c2, data, 0);Even (resp. odd) values of
c
correspond to the real (resp.
imaginary) part of the Fourier mode.Constructor and Description |
---|
RealFFTUtils_3D(long slices,
long rows,
long columns)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex(int s,
int r,
int c)
Returns the 1d index of the specified 3d Fourier mode.
|
long |
getIndex(long s,
long r,
long c)
Returns the 1d index of the specified 3d Fourier mode.
|
void |
pack(double val,
int s,
int r,
int c,
double[][][] packed)
Sets the specified Fourier mode of the transformed data.
|
void |
pack(double val,
int s,
int r,
int c,
double[] packed,
int pos)
Sets the specified Fourier mode of the transformed data.
|
void |
pack(double val,
long s,
long r,
long c,
pl.edu.icm.jlargearrays.DoubleLargeArray packed,
long pos)
Sets the specified Fourier mode of the transformed data.
|
void |
pack(float val,
int s,
int r,
int c,
float[][][] packed)
Sets the specified Fourier mode of the transformed data.
|
void |
pack(float val,
int s,
int r,
int c,
float[] packed,
int pos)
Sets the specified Fourier mode of the transformed data.
|
void |
pack(float val,
long s,
long r,
long c,
pl.edu.icm.jlargearrays.FloatLargeArray packed,
long pos)
Sets the specified Fourier mode of the transformed data.
|
double |
unpack(int s,
int r,
int c,
double[][][] packed)
Returns the specified Fourier mode of the transformed data.
|
double |
unpack(int s,
int r,
int c,
double[] packed,
int pos)
Returns the specified Fourier mode of the transformed data.
|
float |
unpack(int s,
int r,
int c,
float[][][] packed)
Returns the specified Fourier mode of the transformed data.
|
float |
unpack(int s,
int r,
int c,
float[] packed,
int pos)
Returns the specified Fourier mode of the transformed data.
|
double |
unpack(long s,
long r,
long c,
pl.edu.icm.jlargearrays.DoubleLargeArray packed,
long pos)
Returns the specified Fourier mode of the transformed data.
|
float |
unpack(long s,
long r,
long c,
pl.edu.icm.jlargearrays.FloatLargeArray packed,
long pos)
Returns the specified Fourier mode of the transformed data.
|
public RealFFTUtils_3D(long slices, long rows, long columns)
DoubleFFT_3D
or FloatFFT_3D
must be specified.slices
- number of slicesrows
- number of rowscolumns
- number of columnspublic int getIndex(int s, int r, int c)
packed
contains the transformed data following a call to
DoubleFFT_3D.realForwardFull(double[])
or
FloatFFT_3D.realForward(float[])
, then the returned value
index
gives access to the [s][r][c]
Fourier
mode
index == Integer.MIN_VALUE
, then the Fourier
mode is zero,index ≥ 0
, then the Fourier mode is
packed[index]
,index < 0
, then the Fourier mode is
-packed[-index]
,s
- the slice indexr
- the row indexc
- the column indexindex
public long getIndex(long s, long r, long c)
packed
contains the transformed data following a call to
DoubleFFT_3D.realForwardFull(double[])
or
FloatFFT_3D.realForward(float[])
, then the returned value
index
gives access to the [s][r][c]
Fourier
mode
index == Integer.MIN_VALUE
, then the Fourier
mode is zero,index ≥ 0
, then the Fourier mode is
packed[index]
,index < 0
, then the Fourier mode is
-packed[-index]
,s
- the slice indexr
- the row indexc
- the column indexindex
public void pack(double val, int s, int r, int c, double[] packed, int pos)
DoubleFFT_3D.realForward(double[])
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
public void pack(double val, long s, long r, long c, pl.edu.icm.jlargearrays.DoubleLargeArray packed, long pos)
DoubleFFT_3D.realForward(DoubleLargeArray)
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
public void pack(double val, int s, int r, int c, double[][][] packed)
DoubleFFT_3D.realForward(double[][][])
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapublic void pack(float val, int s, int r, int c, float[] packed, int pos)
FloatFFT_3D.realForward(float[])
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
public void pack(float val, long s, long r, long c, pl.edu.icm.jlargearrays.FloatLargeArray packed, long pos)
FloatFFT_3D.realForward(FloatLargeArray)
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
public void pack(float val, int s, int r, int c, float[][][] packed)
FloatFFT_3D.realForward(float[][][])
.val
- the new value of the [s][r][c]
Fourier modes
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapublic double unpack(int s, int r, int c, double[] packed, int pos)
DoubleFFT_3D.realForward(double[])
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
[s][r][c]
Fourier modepublic double unpack(long s, long r, long c, pl.edu.icm.jlargearrays.DoubleLargeArray packed, long pos)
DoubleFFT_3D.realForward(DoubleLargeArray)
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
[s][r][c]
Fourier modepublic double unpack(int s, int r, int c, double[][][] packed)
DoubleFFT_3D.realForward(double[][][])
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed data[s][r][c]
Fourier modepublic float unpack(int s, int r, int c, float[] packed, int pos)
FloatFFT_3D.realForward(float[])
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
[s][r][c]
Fourier modepublic float unpack(long s, long r, long c, pl.edu.icm.jlargearrays.FloatLargeArray packed, long pos)
FloatFFT_3D.realForward(FloatLargeArray)
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed datapos
- index of the first element in array packed
[s][r][c]
Fourier modepublic float unpack(int s, int r, int c, float[][][] packed)
FloatFFT_3D.realForward(float[][][])
.s
- the slice indexr
- the row indexc
- the column indexpacked
- the transformed data[s][r][c]
Fourier modeCopyright © 2015. All rights reserved.