Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::FFT Class Reference

Wrapper to the fftw3 library. More...

#include <MathAlgo/FFT.hh>

+ Inheritance diagram for BIAS::FFT:
+ Collaboration diagram for BIAS::FFT:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
void Compute (double *in)
 slow, memcopys in to internal input data More...
 
void Compute (Vector< double > &in)
 slow, memcopys in to internal input data More...
 
void Compute ()
 input must be filled before with GetInput More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void DumpResult (std::ostream &os=std::cout)
 
 FFT ()
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
double * GetInput ()
 returns the internal data. More...
 
void GetMagnitude (double *mag)
 returns the resulting magnitude, mag must be of length size/2+1 (rounded downwards) More...
 
void GetMagnitude (Vector< double > &mag)
 returns the phase More...
 
void GetPhase (double *phase)
 returns the resulting phase, phase must be of length size/2+1 (rounded downwards) More...
 
void GetPhase (Vector< double > &phase)
 returns the magnitude More...
 
std::complex< double > * GetResult ()
 returns the internal data. More...
 
void Init (int size)
 initializes the internal variables. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void Release ()
 cal this before a second call to Init() More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ~FFT ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

double * _in
 
size_t _InputSize
 
long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
fftw_complex * _out
 
int _OutNum
 
fftw_plan _p
 
int _Size
 
std::map< std::string, long int > _String2Debuglevel
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

Wrapper to the fftw3 library.

Note
Use fast as follows:

a slow interface for Vector<double> also exists an example exists in Examples/ExampleFFT, see ExampleFFT.cpp

Author
woelk 03/2004
Examples:
ExampleFFT.cpp.

Definition at line 57 of file FFT.hh.

Constructor & Destructor Documentation

FFT::FFT ( )

Definition at line 36 of file FFT.cpp.

FFT::~FFT ( )

Definition at line 44 of file FFT.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

void FFT::Compute ( double *  in)

slow, memcopys in to internal input data

Examples:
ExampleFFT.cpp.

Definition at line 77 of file FFT.cpp.

void FFT::Compute ( Vector< double > &  in)

slow, memcopys in to internal input data

Definition at line 83 of file FFT.cpp.

References BIAS::Vector< T >::GetData(), and BIAS::Vector< T >::Size().

void BIAS::FFT::Compute ( )
inline

input must be filled before with GetInput

Definition at line 82 of file FFT.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void FFT::DumpResult ( std::ostream &  os = std::cout)
Examples:
ExampleFFT.cpp.

Definition at line 138 of file FFT.cpp.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

double* BIAS::FFT::GetInput ( )
inline

returns the internal data.

Do not delete

Examples:
ExampleFFT.cpp.

Definition at line 72 of file FFT.hh.

void FFT::GetMagnitude ( double *  mag)

returns the resulting magnitude, mag must be of length size/2+1 (rounded downwards)

Examples:
ExampleFFT.cpp.

Definition at line 105 of file FFT.cpp.

void FFT::GetMagnitude ( Vector< double > &  mag)

returns the phase

Definition at line 127 of file FFT.cpp.

References TNT::Vector< T >::newsize(), and BIAS::Vector< T >::Size().

void FFT::GetPhase ( double *  phase)

returns the resulting phase, phase must be of length size/2+1 (rounded downwards)

Examples:
ExampleFFT.cpp.

Definition at line 94 of file FFT.cpp.

void FFT::GetPhase ( Vector< double > &  phase)

returns the magnitude

Definition at line 116 of file FFT.cpp.

References TNT::Vector< T >::newsize(), and BIAS::Vector< T >::Size().

std::complex<double>* BIAS::FFT::GetResult ( )
inline

returns the internal data.

Do not delete res is of length size/2+1

Definition at line 95 of file FFT.hh.

void FFT::Init ( int  size)

initializes the internal variables.

This may take some time (i.e. several seconds) since some measurements are done

Examples:
ExampleFFT.cpp.

Definition at line 49 of file FFT.cpp.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void FFT::Release ( )

cal this before a second call to Init()

Definition at line 66 of file FFT.cpp.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

double* BIAS::FFT::_in
protected

Definition at line 108 of file FFT.hh.

size_t BIAS::FFT::_InputSize
protected

Definition at line 110 of file FFT.hh.

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

fftw_complex* BIAS::FFT::_out
protected

Definition at line 107 of file FFT.hh.

int BIAS::FFT::_OutNum
protected

Definition at line 112 of file FFT.hh.

fftw_plan BIAS::FFT::_p
protected

Definition at line 109 of file FFT.hh.

int BIAS::FFT::_Size
protected

Definition at line 111 of file FFT.hh.

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.


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