#ifndef ROOT_TSpectrum2Transform
#define ROOT_TSpectrum2Transform
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
class TSpectrum2Transform : public TObject {
protected:
Int_t fSizeX;
Int_t fSizeY;
Int_t fTransformType;
Int_t fDegree;
Int_t fDirection;
Int_t fXmin;
Int_t fXmax;
Int_t fYmin;
Int_t fYmax;
Float_t fFilterCoeff;
Float_t fEnhanceCoeff;
public:
enum {
kTransformHaar =0,
kTransformWalsh =1,
kTransformCos =2,
kTransformSin =3,
kTransformFourier =4,
kTransformHartley =5,
kTransformFourierWalsh =6,
kTransformFourierHaar =7,
kTransformWalshHaar =8,
kTransformCosWalsh =9,
kTransformCosHaar =10,
kTransformSinWalsh =11,
kTransformSinHaar =12,
kTransformForward =0,
kTransformInverse =1
};
TSpectrum2Transform();
TSpectrum2Transform(Int_t sizeX, Int_t sizeY);
virtual ~TSpectrum2Transform();
protected:
void BitReverse(Float_t *working_space,Int_t num);
void BitReverseHaar(Float_t *working_space,Int_t shift,Int_t num,Int_t start);
void FourCos2(Float_t **working_matrix,Float_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type);
void Fourier(Float_t *working_space,Int_t num,Int_t hartley,Int_t direction,Int_t zt_clear);
void General2(Float_t **working_matrix,Float_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type,Int_t degree);
Int_t GeneralExe(Float_t *working_space,Int_t zt_clear,Int_t num,Int_t degree,Int_t type);
Int_t GeneralInv(Float_t *working_space,Int_t num,Int_t degree,Int_t type);
void Haar(Float_t *working_space,Int_t num,Int_t direction);
void HaarWalsh2(Float_t **working_matrix,Float_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type);
void Walsh(Float_t *working_space,Int_t num);
public:
void Enhance(const Float_t **fSource, Float_t **fDest);
void FilterZonal(const Float_t **fSource, Float_t **fDest);
void SetDirection(Int_t direction);
void SetEnhanceCoeff(Float_t enhanceCoeff);
void SetFilterCoeff(Float_t filterCoeff);
void SetRegion(Int_t xmin, Int_t xmax, Int_t ymin, Int_t ymax);
void SetTransformType(Int_t transType, Int_t degree);
void Transform(const Float_t **fSource, Float_t **fDest);
ClassDef(TSpectrum2Transform,1)
};
#endif