STIRA
0.1
|
parent class to compute FFT based real- and complex-valued steerable pyramids (decomposition/reconstruction) More...
#include <PyramidMaster.h>
Public Member Functions | |
PyramidMaster (ArrayGrid< double > *pGridIn, int myNrScales, int myNrOrientations) | |
constructor More... | |
virtual | ~PyramidMaster () |
destructor More... | |
virtual bool | Decompose ()=0 |
decomposes the source image in an steerable pyramid | |
virtual bool | Reconstruct ()=0 |
reconstructs the steerable pyramid back to an image | |
virtual bool | Diagnose ()=0 |
diagnoses the current steerable pyramid | |
fouriertools::FFTBand * | SumFFTBands (std::vector< fouriertools::FFTBand * > fftSubbandSet) |
calculates the sum over a set of FFTBands creates a new FFTBand that becomes the responsability of the caller to delete More... | |
ArrayGrid< double > * | GetCopyOfReconstructedGrid () |
creates a copy of the grid after reconstruction This becomes the responsability of the caller to delete; the local member which contains the reconstructed grid is then deleted by the destructor of this class More... | |
Pyramid< T > * | GetPyramid () |
gets a pointer to the actual pyramid data | |
void | SetPyramid (Pyramid< T > *pPyramid) |
sets a pointer to new pyramid data if old data exists already, they are deleted first More... | |
Protected Member Functions | |
ArrayGrid< double > * | ExtractL0 () |
extracts the first L0 band | |
fouriertools::FFTBand * | ExtractB0 (common::NumberMode myMode) |
extracts a B0 band with given orientation index More... | |
ArrayGrid< double > * | ExtractL () |
extracts recursive L band | |
fouriertools::FFTBand * | ExtractB (common::NumberMode myMode) |
extracts a B band with given orientation index More... | |
fouriertools::FFTBand * | ReconstructL0 (std::vector< fouriertools::FFTBand * > vpFFTBandSet) |
reconstructs the first L0 band Output is still in Fourier domain to save FFT's More... | |
fouriertools::FFTBand * | ReconstructB0 (ArrayGrid< T > *pGridIn, common::NumberMode myMode) |
reconstructs a B0 band with given orientation index Output is still in Fourier domain to save FFT's More... | |
fouriertools::FFTBand * | ReconstructL (ArrayGrid< double > *pGridIn) |
reconstructs L band Output is still in Fourier domain to save FFT's More... | |
fouriertools::FFTBand * | ReconstructB (ArrayGrid< T > *pGridIn, common::NumberMode myMode) |
reconstructs a B0 band with given orientation index Output is still in Fourier domain to save FFT's More... | |
ArrayGrid< double > * | MergeAndReconstructFFTBands (std::vector< fouriertools::FFTBand * > fftSubbandSet) |
computes sum, followed by inverse Fourier Transform More... | |
void | ClearFFTVector (std::vector< fouriertools::FFTBand * > &set) |
clears an STL vector with FFTBands also deletes elements in the vector More... | |
void | SetFFTBand (fouriertools::FFTBand *pFFTBand) |
sets current input FFTBand For computational efficiency, we compute the FFT of the input grid for a scale just once and keep this to extract the different bands from it More... | |
fouriertools::FFTBand * | GetFFTBand () |
gets current input FFTBand For computational efficiency, we compute the FFT of the input grid for a scale just once and keep this to extract the different bands from it | |
void | CleanFFTBand () |
cleans current input FFTBand Also sets its pointer to 0 | |
bool | ViewTransferFunction (fouriertools::FFTBand *pTransferFunction, std::string token, int scale, int orientation, int maxNrOfOrientations, bool isForward) |
Writes a transfer function to PGM for diagnostics. More... | |
Protected Attributes | |
Pyramid< T > * | mpPyramid |
the pyramid bands | |
ArrayGrid< double > * | mpSourceGrid |
the source data grid | |
ArrayGrid< double > * | mpReconstructedGrid |
the data grid after reconstruction | |
int | mNrScales |
nr of scales in the pyramid | |
int | mNrOrientations |
nr of orientations (in paper called K) per scale in the pyramid | |
int | mWidth |
width of the source image | |
int | mHeight |
height of the source image | |
bool | mIsForwardTransform |
flag if we are computing the forward transform | |
ArrayGrid< double > * | mpTmpHighpassGrid |
tmp member in order to avoid recomputation of this transfer function for each oriented subband | |
std::complex< double > | mDecompositionFactor |
modulation factor for oriented bands (-i)^(K-1) during decomposition | |
std::complex< double > | mReconstructionFactor |
modulation factor for oriented bands (-i)^(K-1) during reconstruction | |
fouriertools::FFTBand * | mpFFTBand |
FFT of the input grid for a scale. | |
int | mCurrentScale |
current scale we are at (while decomposing or reconstructing) | |
int | mCurrentOrientation |
current orientation within current scale we are at (while decomposing or reconstructing) | |
parent class to compute FFT based real- and complex-valued steerable pyramids (decomposition/reconstruction)
stira::steerable::PyramidMaster< T >::PyramidMaster | ( | ArrayGrid< double > * | pGridIn, |
int | myNrScales, | ||
int | myNrOrientations | ||
) |
constructor
pGridIn | source input grid data |
myNrScales | nr of scales in which to decompose the image |
myNrOrientations | nr of orientations in which to decompose the image |
References stira::imagedata::ArrayGrid< T >::GetWidth().
|
virtual |
destructor
|
protected |
clears an STL vector with FFTBands also deletes elements in the vector
set | STL vector with FFTBands to clean |
|
protected |
extracts a B band with given orientation index
myMode | indicates whether we deal with real-valued or complex-valued pyramid |
References stira::fouriertools::FFT::ApplyTransferFunction(), stira::fouriertools::FFTBand::ExportAbsImage(), stira::fouriertools::TransferFunctionGenerator::GenerateOrientedTransferFunction(), stira::fouriertools::FFTBand::GetHeight(), stira::fouriertools::FFTBand::GetWidth(), and stira::fouriertools::FFTBand::Multiply().
|
protected |
extracts a B0 band with given orientation index
myMode | indicates whether we deal with real-valued or complex-valued pyramid |
References stira::fouriertools::FFT::ApplyTransferFunction(), stira::fouriertools::FFTBand::ExportAbsImage(), stira::fouriertools::TransferFunctionGenerator::GenerateOrientedTransferFunction(), stira::fouriertools::FFTBand::GetHeight(), stira::fouriertools::FFTBand::GetWidth(), stira::fouriertools::TransferFunctionGenerator::HighFrequencyCrossMask(), and stira::fouriertools::FFTBand::Multiply().
ArrayGrid< double > * stira::steerable::PyramidMaster< T >::GetCopyOfReconstructedGrid | ( | ) |
creates a copy of the grid after reconstruction This becomes the responsability of the caller to delete; the local member which contains the reconstructed grid is then deleted by the destructor of this class
In case no grid is available, 0 is returned.
References stira::imagedata::ArrayGrid< T >::Clone().
Referenced by stira::deconvolve::GNCDeconvolve::Run().
|
protected |
computes sum, followed by inverse Fourier Transform
fftSubbandSet | stl vector with FFTBands to merge |
References stira::fouriertools::FFTBand::ApplyInverseTransform(), stira::fouriertools::FFTBand::ConvertToRealGrid(), and stira::fouriertools::FFTBand::SwitchQuadrants().
|
protected |
reconstructs a B0 band with given orientation index Output is still in Fourier domain to save FFT's
pGridIn | input B0 band (spatial domain) |
myMode | indicates whether we deal with real-valued or complex-values pyramid |
References stira::fouriertools::FFT::ApplyTransferFunctionFFT(), stira::fouriertools::TransferFunctionGenerator::GenerateOrientedTransferFunction(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::fouriertools::FFTBand::Multiply().
|
protected |
reconstructs a B0 band with given orientation index Output is still in Fourier domain to save FFT's
pGridIn | input B0 band (spatial domain) |
myMode | indicates whether we deal with real-valued or complex-values pyramid |
References stira::fouriertools::FFT::ApplyTransferFunctionFFT(), stira::fouriertools::TransferFunctionGenerator::GenerateOrientedTransferFunction(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetWidth(), stira::fouriertools::TransferFunctionGenerator::HighFrequencyCrossMask(), and stira::fouriertools::FFTBand::Multiply().
|
protected |
reconstructs L band Output is still in Fourier domain to save FFT's
pGridIn | input L band (spatial domain) |
References stira::fouriertools::FFT::ApplyTransferFunctionFFT(), stira::fouriertools::TransferFunctionGenerator::GenerateLowPassTransferFunction(), stira::imagedata::ArrayGrid< T >::GetHeight(), and stira::imagedata::ArrayGrid< T >::GetWidth().
|
protected |
reconstructs the first L0 band Output is still in Fourier domain to save FFT's
vpFFTBandSet | set of input bands (already in Fourier domain) |
References stira::fouriertools::TransferFunctionGenerator::GenerateLowPassTransferFunction(), stira::fouriertools::FFTBand::GetHeight(), stira::fouriertools::FFTBand::GetWidth(), and stira::fouriertools::FFTBand::Multiply().
|
protected |
sets current input FFTBand For computational efficiency, we compute the FFT of the input grid for a scale just once and keep this to extract the different bands from it
pFFTBand | the input FFTBand |
void stira::steerable::PyramidMaster< T >::SetPyramid | ( | Pyramid< T > * | pPyramid | ) |
sets a pointer to new pyramid data if old data exists already, they are deleted first
pPyramid | pointer to new pyramid data |
fouriertools::FFTBand * stira::steerable::PyramidMaster< T >::SumFFTBands | ( | std::vector< fouriertools::FFTBand * > | fftSubbandSet | ) |
calculates the sum over a set of FFTBands creates a new FFTBand that becomes the responsability of the caller to delete
fftSubbandSet | stl vector with FFTBands to sum |
References stira::fouriertools::FFTBand::GetHeight(), and stira::fouriertools::FFTBand::SetValue().
|
protected |
Writes a transfer function to PGM for diagnostics.
pTransferFunction | transfer function to be visualized |
token | file name token |
scale | number of scale to be incorporated in file name |
orientation | number of orientation to be incorporated in file name |
maxNrOfOrientations | max number of orientations, needed to make grid real-valued again |
isForward | flag if transfer function is in forward or backward transform, needed to make grid real-valued again |
References stira::fouriertools::FFTBand::GetHeight(), stira::fouriertools::FFTBand::GetValue(), stira::fouriertools::FFTBand::GetWidth(), stira::imagetools::ImageIO::GRADIENT_OUT, stira::imagedata::ArrayGrid< T >::SetValue(), and stira::imagetools::ImageIO::WritePGM().