BALL
1.4.1
|
#include <BALL/MATHS/FFT3D.h>
A class to perform Fast Fourier Transforms and inverse Fast Fourier Transforms on regularly spaced three dimensional data.
typedef std::complex<typename ComplexTraits::ComplexPrecision> BALL::TFFT3D< ComplexTraits >::Complex |
typedef TRegularData3D<std::complex<typename ComplexTraits::ComplexPrecision> > BALL::TFFT3D< ComplexTraits >::ComplexVector |
BALL::TFFT3D< ComplexTraits >::TFFT3D | ( | ) |
BALL::TFFT3D< ComplexTraits >::TFFT3D | ( | const TFFT3D< ComplexTraits > & | data | ) |
Copy constructor.
BALL::TFFT3D< ComplexTraits >::TFFT3D | ( | Size | ldnX, |
Size | ldnY, | ||
Size | ldnZ, | ||
double | stepPhysX = 1. , |
||
double | stepPhysY = 1. , |
||
double | stepPhysZ = 1. , |
||
Vector3 | origin = Vector3(0., 0., 0) , |
||
bool | inFourierSpace = false |
||
) |
Detailed constructor.
ldnX | The binary logarithm of the number of grid points in X direction (we use the logarithm to ensure that the number of points is a power of two, which is important for the FFT) |
ldnY | The binary logarithm of the number of grid points in Y direction |
ldnZ | The binary logarithm of the number of grid points in Z direction |
stepPhysX | The step width in X direction in physical space |
stepPhysY | The step width in Y direction in physical space |
stepPhysZ | The step width in Z direction in physical space |
origin | The origin of the coordinate system |
inFourierSpace | Flag to decide whether the data is assumed to be in physical or Fourier space |
virtual BALL::TFFT3D< ComplexTraits >::~TFFT3D | ( | ) | [virtual] |
Destructor.
virtual void BALL::TFFT3D< ComplexTraits >::clear | ( | ) | [virtual] |
Clear the contents.
Reimplemented from BALL::TRegularData3D< std::complex< ComplexTraits::ComplexPrecision > >.
virtual void BALL::TFFT3D< ComplexTraits >::destroy | ( | ) | [virtual] |
Clear the contents and reset all attributes.
void BALL::TFFT3D< ComplexTraits >::doFFT | ( | ) |
Perform a single fast Fourier transform on the data.
void BALL::TFFT3D< ComplexTraits >::doiFFT | ( | ) |
Perform a single inverse Fourier transform on the data.
TFFT3D< ComplexTraits >::Complex BALL::TFFT3D< ComplexTraits >::getData | ( | const Vector3 & | pos | ) | const |
Returns the data at the grid position closest to pos , and automatically includes the correct phase factor and (symmetric) normalization.
Exception::OutOfGrid | if pos is outside the grid boundaries |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMaxX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMaxY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMaxZ | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMinX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMinY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierSpaceMinZ | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierStepWidthX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierStepWidthY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getFourierStepWidthZ | ( | ) | const |
Vector3 BALL::TFFT3D< ComplexTraits >::getGridCoordinates | ( | Position | position | ) | const |
TFFT3D< ComplexTraits >::Complex BALL::TFFT3D< ComplexTraits >::getInterpolatedValue | ( | const Vector3 & | pos | ) | const |
Returns the data at point pos. If pos is not a point on the grid, the data is linearly interpolated. This method automatically includes the correct phase factor and (symmetric) normalization.
Exception::OutOfGrid | if pos is outside the grid boundaries |
Reimplemented from BALL::TRegularData3D< std::complex< ComplexTraits::ComplexPrecision > >.
Size BALL::TFFT3D< ComplexTraits >::getMaxXIndex | ( | ) | const |
Size BALL::TFFT3D< ComplexTraits >::getMaxYIndex | ( | ) | const |
Size BALL::TFFT3D< ComplexTraits >::getMaxZIndex | ( | ) | const |
Size BALL::TFFT3D< ComplexTraits >::getNumberOfInverseTransforms | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMaxX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMaxY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMaxZ | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMinX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMinY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysSpaceMinZ | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysStepWidthX | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysStepWidthY | ( | ) | const |
double BALL::TFFT3D< ComplexTraits >::getPhysStepWidthZ | ( | ) | const |
bool BALL::TFFT3D< ComplexTraits >::isInFourierSpace | ( | ) | const |
const TFFT3D& BALL::TFFT3D< ComplexTraits >::operator= | ( | const TFFT3D< ComplexTraits > & | fft_3d | ) |
Assignment operator.
bool BALL::TFFT3D< ComplexTraits >::operator== | ( | const TFFT3D< ComplexTraits > & | fft3d | ) | const |
TFFT3D< ComplexTraits >::Complex & BALL::TFFT3D< ComplexTraits >::operator[] | ( | const Vector3 & | pos | ) |
Access the data at the grid position closest to pos . This function returns the "raw" data at that position.
Exception::OutOfGrid | if pos is outside the grid boundaries |
const TFFT3D< ComplexTraits >::Complex & BALL::TFFT3D< ComplexTraits >::operator[] | ( | const Vector3 & | pos | ) | const |
Access the data at the grid position closest to pos . This function returns the "raw" data at that position.
Exception::OutOfGrid | if pos is outside the grid boundaries |
Complex& BALL::TFFT3D< ComplexTraits >::operator[] | ( | const Position & | pos | ) | [inline] |
Access the (raw) data at Position pos.
Exception::OutOfGrid | if pos is outside the grid boundaries |
const Complex& BALL::TFFT3D< ComplexTraits >::operator[] | ( | const Position & | pos | ) | const [inline] |
Access the (raw) data at Position pos. Const method.
Exception::OutOfGrid | if pos is outside the grid boundaries |
TFFT3D< ComplexTraits >::Complex BALL::TFFT3D< ComplexTraits >::phase | ( | const Vector3 & | pos | ) | const |
void BALL::TFFT3D< ComplexTraits >::setData | ( | const Vector3 & | pos, |
Complex | val | ||
) |
Sets the data point at the grid position closest to pos to the value val , and -- if called in Fourier space -- automatically includes the correct phase factor and (symmetric) normalization.
Exception::OutOfGrid | if pos is outside the grid boundaries |
void BALL::TFFT3D< ComplexTraits >::setNumberOfFFTTransforms | ( | Size | num | ) | [inline] |
void BALL::TFFT3D< ComplexTraits >::setNumberOfiFFTTransforms | ( | Size | num | ) | [inline] |
bool BALL::TFFT3D< ComplexTraits >::setPhysStepWidth | ( | double | new_width_x, |
double | new_width_y, | ||
double | new_width_z | ||
) |
Set the step width in physical space to {new_width_x, new_width_y, new_width_z}. The step width in Fourier space is automatically adjusted accordingly. {new_width_x, new_width_y and new_width_z} must be positive, otherwise the function does nothing and retuns false .
bool BALL::TFFT3D< ComplexTraits >::translate | ( | const Vector3 & | trans_origin | ) |
Complex* BALL::TFFT3D< ComplexTraits >::dataAdress_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::dataLength_ [protected] |
bool BALL::TFFT3D< ComplexTraits >::inFourierSpace_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::lengthX_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::lengthY_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::lengthZ_ [protected] |
Vector3 BALL::TFFT3D< ComplexTraits >::maxFourier_ [protected] |
Vector3 BALL::TFFT3D< ComplexTraits >::maxPhys_ [protected] |
Vector3 BALL::TFFT3D< ComplexTraits >::minFourier_ [protected] |
Vector3 BALL::TFFT3D< ComplexTraits >::minPhys_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::numFourierToPhys_ [protected] |
Size BALL::TFFT3D< ComplexTraits >::numPhysToFourier_ [protected] |
Vector3 BALL::TFFT3D< ComplexTraits >::origin_ [protected] |
Origin of the grid (offset)
Reimplemented from BALL::TRegularData3D< std::complex< ComplexTraits::ComplexPrecision > >.
ComplexTraits::FftwPlan BALL::TFFT3D< ComplexTraits >::planBackward_ [protected] |
bool BALL::TFFT3D< ComplexTraits >::planCalculated_ [protected] |
ComplexTraits::FftwPlan BALL::TFFT3D< ComplexTraits >::planForward_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepFourierX_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepFourierY_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepFourierZ_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepPhysX_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepPhysY_ [protected] |
double BALL::TFFT3D< ComplexTraits >::stepPhysZ_ [protected] |