STIRA  0.1
Public Member Functions | List of all members
stira::fouriertools::FFTBand Class Reference

data structure for FFT manipulations More...

#include <FFTBand.h>

Public Member Functions

 FFTBand (ArrayGrid< double > *pGrid, bool isreal=true)
 Constructor: build a complex band initialized by a real-valued grid. More...
 
 FFTBand (ArrayGrid< std::complex< double > > *pGrid)
 Constructor: build a complex band initialized by a complex-valued grid. More...
 
 FFTBand (int width, int height, std::complex< double > initValue=std::complex< double >(0.0, 0.0))
 Constructor: build a complex band initialized by zeros. More...
 
 FFTBand (FFTBand &otherFFTBand)
 Copy constructor.
 
 ~FFTBand ()
 destructor
 
FFTBandClone ()
 clones the current band
 
std::complex< double > GetValue (int x, int y) const
 Get a value from the complex band. More...
 
void SetValue (int x, int y, std::complex< double > complexValue)
 Set a value in the complex band using a complex data type from STL. More...
 
void SetValue (int x, int y, double realValue, double imagValue)
 Set a value in the complex band using two double representing the real and imaginary part of the complex number. More...
 
int GetWidth () const
 Get width of data grid.
 
int GetHeight () const
 Get height of data grid.
 
void ApplyForwardTransform ()
 Replaces the current FFTBand with a forward transformed one.
 
void ApplyInverseTransform ()
 Replaces the current FFTBand with an inverse transformed one.
 
void PointMirrorBand ()
 Mirrors the whole band around the center of the band Changes the original data structure (not creating a new one)
 
ArrayGrid< double > * ConvertToRealGrid ()
 creates a real-valued ArrayGrid with the real component of the complex values in this FFTBand
 
ArrayGrid< double > * ConvertToImaginaryGrid ()
 creates a real-valued ArrayGrid with the imaginary component of the complex values in this FFTBand
 
ArrayGrid< std::complex< double > > * ConvertToComplexGrid ()
 creates a complex-valued ArrayGrid with the complex values in this FFTBand
 
void ExportAbsImage (std::string fileName)
 export abs of current FFTBand to a PGM file More...
 
void SwitchQuadrants ()
 switches upper left with lower right quadrant and lower left with upper right Changes the original data structure (not creating a new one)
 
void Conjugate ()
 changes all complex grid values in their complex conjugate values Changes the original data structure (not creating a new one)
 
double GetBandMaximum (FFTDataType type)
 gets maximum value of real or imaginary components in the band More...
 
double GetBandMinimum (FFTDataType type)
 gets minimum value of real or imaginary components in the band More...
 
void Multiply (FFTBand *other)
 multiplies this FFTBand point by point with another FFTBand More...
 
void Multiply (ArrayGrid< double > *grid)
 multiplies this FFTBand point by point with an ArrayGrid More...
 
void Multiply (std::complex< double > myFactor)
 multiplies this FFTBand point by point with a real-valued factor More...
 
void Multiply (double myFactor)
 multiplies this FFTBand point by point with a complex-valued factor More...
 

Detailed Description

data structure for FFT manipulations

Constructor & Destructor Documentation

stira::fouriertools::FFTBand::FFTBand ( ArrayGrid< double > *  pGrid,
bool  isreal = true 
)

Constructor: build a complex band initialized by a real-valued grid.

Parameters
pGridgrid to initialize this complex band with
isrealflag if real-valued grid values should be used as the real components of the complex numbers (if false: use as imag components)

References stira::imagedata::ArrayGrid< T >::GetHeight(), and stira::imagedata::ArrayGrid< T >::GetWidth().

stira::fouriertools::FFTBand::FFTBand ( ArrayGrid< std::complex< double > > *  pGrid)

Constructor: build a complex band initialized by a complex-valued grid.

Parameters
pGridgrid to initialize this complex band with

References stira::imagedata::ArrayGrid< T >::GetHeight(), and stira::imagedata::ArrayGrid< T >::GetWidth().

stira::fouriertools::FFTBand::FFTBand ( int  width,
int  height,
std::complex< double >  initValue = std::complex< double >( 0.0, 0.0 ) 
)

Constructor: build a complex band initialized by zeros.

Parameters
widthwidth of the band to construct
heightheight of the band to construct
initValueoptional value to initialize this band with

Member Function Documentation

void stira::fouriertools::FFTBand::ExportAbsImage ( std::string  fileName)
double stira::fouriertools::FFTBand::GetBandMaximum ( FFTDataType  type)

gets maximum value of real or imaginary components in the band

Parameters
typereal or imaginary component
double stira::fouriertools::FFTBand::GetBandMinimum ( FFTDataType  type)

gets minimum value of real or imaginary components in the band

Parameters
typereal or imaginary component
complex< double > stira::fouriertools::FFTBand::GetValue ( int  x,
int  y 
) const
void stira::fouriertools::FFTBand::Multiply ( FFTBand other)
void stira::fouriertools::FFTBand::Multiply ( ArrayGrid< double > *  grid)

multiplies this FFTBand point by point with an ArrayGrid

Parameters
gridthe ArrayGrid
Warning
works directly on the band data; original data is lost

References stira::imagedata::ArrayGrid< T >::GetValue().

void stira::fouriertools::FFTBand::Multiply ( std::complex< double >  myFactor)

multiplies this FFTBand point by point with a real-valued factor

Parameters
myFactorfactor to multiply every value in the grid with
Warning
works directly on the band data; original data is lost
void stira::fouriertools::FFTBand::Multiply ( double  myFactor)

multiplies this FFTBand point by point with a complex-valued factor

Parameters
myFactorfactor to multiply every value in the grid with
Warning
works directly on the band data; original data is lost
void stira::fouriertools::FFTBand::SetValue ( int  x,
int  y,
std::complex< double >  complexValue 
)
void stira::fouriertools::FFTBand::SetValue ( int  x,
int  y,
double  realValue,
double  imagValue 
)

Set a value in the complex band using two double representing the real and imaginary part of the complex number.

Parameters
xx coordinate of the value to set
yy coordinate of the value to set
realValuereal part of the complex number to set
imagValueimaginary part of the complex number to set

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