Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSpectrum2Transform.h
Go to the documentation of this file.
1// @(#)root/spectrum:$Id$
2// Author: Miroslav Morhac 25/09/06
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TSpectrum2Transform
12#define ROOT_TSpectrum2Transform
13
14#include "TObject.h"
15
17protected:
18 Int_t fSizeX; ///< x length of transformed data
19 Int_t fSizeY; ///< y length of transformed data
20 Int_t fTransformType; ///< type of transformation (Haar, Walsh, Cosine, Sine, Fourier, Hartley, Fourier-Walsh, Fourier-Haar, Walsh-Haar, Cosine-Walsh, Cosine-Haar, Sine-Walsh, Sine-Haar)
21 Int_t fDegree; ///< degree of mixed transform, applies only for Fourier-Walsh, Fourier-Haar, Walsh-Haar, Cosine-Walsh, Cosine-Haar, Sine-Walsh, Sine-Haar transforms
22 Int_t fDirection; ///< forward or inverse transform
23 Int_t fXmin; ///< first channel x of filtered or enhanced region
24 Int_t fXmax; ///< last channel x of filtered or enhanced region
25 Int_t fYmin; ///< first channel y of filtered or enhanced region
26 Int_t fYmax; ///< last channel y of filtered or enhanced region
27 Double_t fFilterCoeff; ///< value set in the filtered region
28 Double_t fEnhanceCoeff; ///< multiplication coefficient applied in enhanced region;
29public:
30 enum {
46 };
48 TSpectrum2Transform(Int_t sizeX, Int_t sizeY);
49 ~TSpectrum2Transform() override;
50
51protected:
52 void BitReverse(Double_t *working_space,Int_t num);
53 void BitReverseHaar(Double_t *working_space,Int_t shift,Int_t num,Int_t start);
54 void FourCos2(Double_t **working_matrix,Double_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type);
55 void Fourier(Double_t *working_space,Int_t num,Int_t hartley,Int_t direction,Int_t zt_clear);
56 void General2(Double_t **working_matrix,Double_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type,Int_t degree);
57 Int_t GeneralExe(Double_t *working_space,Int_t zt_clear,Int_t num,Int_t degree,Int_t type);
58 Int_t GeneralInv(Double_t *working_space,Int_t num,Int_t degree,Int_t type);
59 void Haar(Double_t *working_space,Int_t num,Int_t direction);
60 void HaarWalsh2(Double_t **working_matrix,Double_t *working_vector,Int_t numx,Int_t numy,Int_t direction,Int_t type);
61 void Walsh(Double_t *working_space,Int_t num);
62
63public:
64 void Enhance(const Double_t **fSource, Double_t **fDest);
65 void FilterZonal(const Double_t **fSource, Double_t **fDest);
66 void SetDirection(Int_t direction);
67 void SetEnhanceCoeff(Double_t enhanceCoeff);
68 void SetFilterCoeff(Double_t filterCoeff);
70 void SetTransformType(Int_t transType, Int_t degree);
71 void Transform(const Double_t **fSource, Double_t **fDest);
72
73 ClassDefOverride(TSpectrum2Transform,1) //Spectrum2 Transformer, it calculates classic orthogonal 2D transforms
74};
75
76#endif
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
float xmin
float ymin
float xmax
float ymax
Mother of all ROOT objects.
Definition TObject.h:41
Advanced 2-dimensional orthogonal transform functions.
void Fourier(Double_t *working_space, Int_t num, Int_t hartley, Int_t direction, Int_t zt_clear)
This function calculates Fourier based transform of a part of data.
void BitReverse(Double_t *working_space, Int_t num)
This function carries out bit-reverse reordering of data.
Int_t fYmin
first channel y of filtered or enhanced region
~TSpectrum2Transform() override
Destructor.
void SetRegion(Int_t xmin, Int_t xmax, Int_t ymin, Int_t ymax)
This function sets the filtering or enhancement region:
void SetTransformType(Int_t transType, Int_t degree)
This function sets the following parameters for transform:
void Haar(Double_t *working_space, Int_t num, Int_t direction)
This function calculates Haar transform of a part of data.
void FourCos2(Double_t **working_matrix, Double_t *working_vector, Int_t numx, Int_t numy, Int_t direction, Int_t type)
This function calculates 2D Fourier based transforms Function parameters:
Int_t GeneralInv(Double_t *working_space, Int_t num, Int_t degree, Int_t type)
This function calculates inverse generalized (mixed) transforms Function parameters:
void SetEnhanceCoeff(Double_t enhanceCoeff)
This function sets the enhancement coefficient:
Int_t fDegree
degree of mixed transform, applies only for Fourier-Walsh, Fourier-Haar, Walsh-Haar,...
void Enhance(const Double_t **fSource, Double_t **fDest)
This function transforms the source spectrum.
Int_t fSizeY
y length of transformed data
Double_t fEnhanceCoeff
multiplication coefficient applied in enhanced region;
Int_t fTransformType
type of transformation (Haar, Walsh, Cosine, Sine, Fourier, Hartley, Fourier-Walsh,...
void BitReverseHaar(Double_t *working_space, Int_t shift, Int_t num, Int_t start)
This function carries out bit-reverse reordering for Haar transform.
Int_t fDirection
forward or inverse transform
void Walsh(Double_t *working_space, Int_t num)
This function calculates Walsh transform of a part of data.
void SetFilterCoeff(Double_t filterCoeff)
This function sets the filter coefficient:
Int_t fYmax
last channel y of filtered or enhanced region
Int_t GeneralExe(Double_t *working_space, Int_t zt_clear, Int_t num, Int_t degree, Int_t type)
This function calculates generalized (mixed) transforms of different degrees.
Double_t fFilterCoeff
value set in the filtered region
void Transform(const Double_t **fSource, Double_t **fDest)
This function transforms the source spectrum.
void SetDirection(Int_t direction)
This function sets the direction of the transform:
Int_t fSizeX
x length of transformed data
void FilterZonal(const Double_t **fSource, Double_t **fDest)
This function transforms the source spectrum.
Int_t fXmin
first channel x of filtered or enhanced region
Int_t fXmax
last channel x of filtered or enhanced region
void General2(Double_t **working_matrix, Double_t *working_vector, Int_t numx, Int_t numy, Int_t direction, Int_t type, Int_t degree)
This function calculates generalized (mixed) 2D transforms Function parameters:
void HaarWalsh2(Double_t **working_matrix, Double_t *working_vector, Int_t numx, Int_t numy, Int_t direction, Int_t type)
This function calculates 2D Haar and Walsh transforms Function parameters:
TSpectrum2Transform()
Default constructor.