HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_VoxelFFT Class Reference

#include <GU_VoxelFFT.h>

Classes

class  gu_fft
 

Public Member Functions

 GU_VoxelFFT ()
 
virtual ~GU_VoxelFFT ()
 
void fft (UT_VoxelArrayF &re, UT_VoxelArrayF &im, bool invert, bool shift, bool normalize, int sliceaxis=-1, bool realdata=false)
 
void fft (const UT_ValArray< UT_VoxelArrayF * > &re, const UT_ValArray< UT_VoxelArrayF * > &im, bool invert, bool shift, bool normalize, int sliceaxis=-1, bool realdata=false)
 

Protected Member Functions

void computeFFTDims (const UT_VoxelArrayF &re, int &sliceaxis, int &ndims, int *dims, int &slicetransforms, UT_Vector3I &axes)
 
virtual void fftSequence (const UT_ValArray< UT_VoxelArrayF * > &realvox, const UT_ValArray< UT_VoxelArrayF * > &imagvox, int begin, int end, bool invert, bool shift, bool normalize, int sliceaxis, bool realdata)
 
void fftSequence (gu_fft &fft, const UT_ValArray< UT_VoxelArrayF * > &realvox, const UT_ValArray< UT_VoxelArrayF * > &imagvox, int begin, int end, bool invert, bool shift, bool normalize, int sliceaxis, bool realdata)
 
 THREADED_METHOD8 (GU_VoxelFFT, resrc.numTiles() > 16, copyToComplex, const UT_VoxelArrayF &, resrc, const UT_VoxelArrayF &, imsrc, UT_ComplexF *, dst, const UT_Vector3I &, axes, bool, shift, bool, sliced, bool, realonly, bool, hermitian)
 
void copyToComplexPartial (const UT_VoxelArrayF &resrc, const UT_VoxelArrayF &imsrc, UT_ComplexF *dst, const UT_Vector3I &axes, bool shift, bool sliced, bool realonly, bool hermitian, const UT_JobInfo &info)
 
 THREADED_METHOD9 (GU_VoxelFFT, redst.numTiles() > 16, copyFromComplex, const UT_ComplexF *, src, UT_VoxelArrayF &, redst, UT_VoxelArrayF &, imdst, fpreal32, scale, const UT_Vector3I &, axes, bool, shift, bool, sliced, bool, realonly, bool, hermitian)
 
void copyFromComplexPartial (const UT_ComplexF *src, UT_VoxelArrayF &redst, UT_VoxelArrayF &imdst, fpreal32 scale, const UT_Vector3I &axes, bool shift, bool sliced, bool realonly, bool hermitian, const UT_JobInfo &info)
 
 THREADED_METHOD4 (GU_VoxelFFT, redst.numTiles() > 16, copyFromReal, const fpreal32 *, src, UT_VoxelArrayF &, redst, fpreal32, scale, const UT_Vector3I &, axes)
 
void copyFromRealPartial (const fpreal32 *src, UT_VoxelArrayF &redst, fpreal32 scale, const UT_Vector3I &axes, const UT_JobInfo &info)
 
 THREADED_METHOD4 (GU_VoxelFFT, resrc.numTiles() > 16, copyToReal, const UT_VoxelArrayF &, resrc, fpreal32 *, dst, fpreal32, scale, const UT_Vector3I &, axes)
 
void copyToRealPartial (const UT_VoxelArrayF &resrc, fpreal32 *dst, fpreal32 scale, const UT_Vector3I &axes, const UT_JobInfo &info)
 

Detailed Description

Definition at line 21 of file GU_VoxelFFT.h.

Constructor & Destructor Documentation

GU_VoxelFFT::GU_VoxelFFT ( )
inline

Definition at line 25 of file GU_VoxelFFT.h.

virtual GU_VoxelFFT::~GU_VoxelFFT ( )
virtual

Member Function Documentation

void GU_VoxelFFT::computeFFTDims ( const UT_VoxelArrayF re,
int sliceaxis,
int ndims,
int dims,
int slicetransforms,
UT_Vector3I axes 
)
protected
void GU_VoxelFFT::copyFromComplexPartial ( const UT_ComplexF src,
UT_VoxelArrayF redst,
UT_VoxelArrayF imdst,
fpreal32  scale,
const UT_Vector3I axes,
bool  shift,
bool  sliced,
bool  realonly,
bool  hermitian,
const UT_JobInfo info 
)
protected
void GU_VoxelFFT::copyFromRealPartial ( const fpreal32 src,
UT_VoxelArrayF redst,
fpreal32  scale,
const UT_Vector3I axes,
const UT_JobInfo info 
)
protected
void GU_VoxelFFT::copyToComplexPartial ( const UT_VoxelArrayF resrc,
const UT_VoxelArrayF imsrc,
UT_ComplexF dst,
const UT_Vector3I axes,
bool  shift,
bool  sliced,
bool  realonly,
bool  hermitian,
const UT_JobInfo info 
)
protected
void GU_VoxelFFT::copyToRealPartial ( const UT_VoxelArrayF resrc,
fpreal32 dst,
fpreal32  scale,
const UT_Vector3I axes,
const UT_JobInfo info 
)
protected
void GU_VoxelFFT::fft ( UT_VoxelArrayF re,
UT_VoxelArrayF im,
bool  invert,
bool  shift,
bool  normalize,
int  sliceaxis = -1,
bool  realdata = false 
)

Perform a forward or inverse FFT on the pair of 2D or 3D voxel arrays representing real and imaginary parts of the complex input and output. If invert is true, this function computes an inverse FFT. Shift assumes the frequency-space data is shifted on input or output so that the DC (zero-th) frequency is in the center, similar to Matlab's fftshift and ifftshift functions. Normalize applies a 1/N normalization factor to the inverse FFT so that a forward FFT followed by inverse FFT yields the original input. If sliceaxis is 0, 1, or 2, a 3D input array will be treated as a series of 2D FFTs sliced along the specified axis. NOTE: as with most FFTs, performance is best with input arrays whose dimensions are powers of 2.

void GU_VoxelFFT::fft ( const UT_ValArray< UT_VoxelArrayF * > &  re,
const UT_ValArray< UT_VoxelArrayF * > &  im,
bool  invert,
bool  shift,
bool  normalize,
int  sliceaxis = -1,
bool  realdata = false 
)

Performs forward or inverse FFT's on several pairs of 2D or 3D voxel arrays representing real and imaginary parts of the complex input and output. All sequential complex pairs with the same resolution are transformed at once, which can yield signicant speedups. If invert is true, this function computes an inverse FFT. Shift assumes the frequency-space data is shifted on input or output so that the DC (zero-th) frequency is in the center, similar to Matlab's fftshift and ifftshift functions. Normalize applies a 1/N normalization factor to the inverse FFT so that a forward FFT followed by inverse FFT yields the original input. If sliceaxis is 0, 1, or 2, a 3D input array will be treated as a series of 2D FFTs sliced along the specified axis. NOTE: as with most FFTs, performance is best with input arrays whose dimensions are powers of 2.

virtual void GU_VoxelFFT::fftSequence ( const UT_ValArray< UT_VoxelArrayF * > &  realvox,
const UT_ValArray< UT_VoxelArrayF * > &  imagvox,
int  begin,
int  end,
bool  invert,
bool  shift,
bool  normalize,
int  sliceaxis,
bool  realdata 
)
protectedvirtual
void GU_VoxelFFT::fftSequence ( gu_fft fft,
const UT_ValArray< UT_VoxelArrayF * > &  realvox,
const UT_ValArray< UT_VoxelArrayF * > &  imagvox,
int  begin,
int  end,
bool  invert,
bool  shift,
bool  normalize,
int  sliceaxis,
bool  realdata 
)
protected
GU_VoxelFFT::THREADED_METHOD4 ( GU_VoxelFFT  ,
redst.  numTiles(),
16  ,
copyFromReal  ,
const fpreal32 ,
src  ,
UT_VoxelArrayF ,
redst  ,
fpreal32  ,
scale  ,
const UT_Vector3I ,
axes   
)
protected
GU_VoxelFFT::THREADED_METHOD4 ( GU_VoxelFFT  ,
resrc.  numTiles(),
16  ,
copyToReal  ,
const UT_VoxelArrayF ,
resrc  ,
fpreal32 ,
dst  ,
fpreal32  ,
scale  ,
const UT_Vector3I ,
axes   
)
protected
GU_VoxelFFT::THREADED_METHOD8 ( GU_VoxelFFT  ,
resrc.  numTiles(),
16  ,
copyToComplex  ,
const UT_VoxelArrayF ,
resrc  ,
const UT_VoxelArrayF ,
imsrc  ,
UT_ComplexF ,
dst  ,
const UT_Vector3I ,
axes  ,
bool  ,
shift  ,
bool  ,
sliced  ,
bool  ,
realonly  ,
bool  ,
hermitian   
)
protected
GU_VoxelFFT::THREADED_METHOD9 ( GU_VoxelFFT  ,
redst.  numTiles(),
16  ,
copyFromComplex  ,
const UT_ComplexF ,
src  ,
UT_VoxelArrayF ,
redst  ,
UT_VoxelArrayF ,
imdst  ,
fpreal32  ,
scale  ,
const UT_Vector3I ,
axes  ,
bool  ,
shift  ,
bool  ,
sliced  ,
bool  ,
realonly  ,
bool  ,
hermitian   
)
protected

The documentation for this class was generated from the following file: