ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
hist
spectrum
inc
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
//////////////////////////////////////////////////////////////////////////
15
// //
16
// TSpectrum2Transform //
17
// //
18
// Class to carry out transforms of 2D spectra, its filtering and //
19
// enhancement. It allows to calculate classic Fourier, Cosine, Sin, //
20
// Hartley, Walsh, Haar transforms as well as mixed transforms (Fourier-//
21
// Walsh, Fourier-Haar, Walsh-Haar, Cosine-Walsh, Cosine-Haar, Sin-Walsh//
22
// and Sin-Haar). All the transforms are fast. //
23
// //
24
//////////////////////////////////////////////////////////////////////////
25
26
#ifndef ROOT_TNamed
27
#include "
TNamed.h
"
28
#endif
29
30
class
TSpectrum2Transform
:
public
TObject
{
31
protected
:
32
Int_t
fSizeX
;
//x length of transformed data
33
Int_t
fSizeY
;
//y length of transformed data
34
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)
35
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
36
Int_t
fDirection
;
//forward or inverse transform
37
Int_t
fXmin
;
//first channel x of filtered or enhanced region
38
Int_t
fXmax
;
//last channel x of filtered or enhanced region
39
Int_t
fYmin
;
//first channel y of filtered or enhanced region
40
Int_t
fYmax
;
//last channel y of filtered or enhanced region
41
Double_t
fFilterCoeff
;
//value set in the filtered region
42
Double_t
fEnhanceCoeff
;
//multiplication coefficient applied in enhanced region;
43
public
:
44
enum
{
45
kTransformHaar
=0,
46
kTransformWalsh
=1,
47
kTransformCos
=2,
48
kTransformSin
=3,
49
kTransformFourier
=4,
50
kTransformHartley
=5,
51
kTransformFourierWalsh
=6,
52
kTransformFourierHaar
=7,
53
kTransformWalshHaar
=8,
54
kTransformCosWalsh
=9,
55
kTransformCosHaar
=10,
56
kTransformSinWalsh
=11,
57
kTransformSinHaar
=12,
58
kTransformForward
=0,
59
kTransformInverse
=1
60
};
61
TSpectrum2Transform
();
62
TSpectrum2Transform
(
Int_t
sizeX,
Int_t
sizeY);
63
virtual
~TSpectrum2Transform
();
64
65
protected
:
66
void
BitReverse
(
Double_t
*working_space,
Int_t
num);
67
void
BitReverseHaar
(
Double_t
*working_space,
Int_t
shift,
Int_t
num,
Int_t
start);
68
void
FourCos2
(
Double_t
**working_matrix,
Double_t
*working_vector,
Int_t
numx,
Int_t
numy,
Int_t
direction,
Int_t
type
);
69
void
Fourier
(
Double_t
*working_space,
Int_t
num,
Int_t
hartley,
Int_t
direction,
Int_t
zt_clear);
70
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);
71
Int_t
GeneralExe
(
Double_t
*working_space,
Int_t
zt_clear,
Int_t
num,
Int_t
degree,
Int_t
type
);
72
Int_t
GeneralInv
(
Double_t
*working_space,
Int_t
num,
Int_t
degree,
Int_t
type
);
73
void
Haar
(
Double_t
*working_space,
Int_t
num,
Int_t
direction);
74
void
HaarWalsh2
(
Double_t
**working_matrix,
Double_t
*working_vector,
Int_t
numx,
Int_t
numy,
Int_t
direction,
Int_t
type
);
75
void
Walsh
(
Double_t
*working_space,
Int_t
num);
76
77
public
:
78
void
Enhance
(
const
Double_t
**fSource,
Double_t
**fDest);
79
void
FilterZonal
(
const
Double_t
**fSource,
Double_t
**fDest);
80
void
SetDirection
(
Int_t
direction);
81
void
SetEnhanceCoeff
(
Double_t
enhanceCoeff);
82
void
SetFilterCoeff
(
Double_t
filterCoeff);
83
void
SetRegion
(
Int_t
xmin
,
Int_t
xmax
,
Int_t
ymin
,
Int_t
ymax
);
84
void
SetTransformType
(
Int_t
transType,
Int_t
degree);
85
void
Transform
(
const
Double_t
**fSource,
Double_t
**fDest);
86
87
ClassDef
(
TSpectrum2Transform
,1)
//Spectrum2 Transformer, it calculates classic orthogonal 2D transforms
88
};
89
90
#endif
TSpectrum2Transform::SetRegion
void SetRegion(Int_t xmin, Int_t xmax, Int_t ymin, Int_t ymax)
SETTER FUNCION.
Definition:
TSpectrum2Transform.cxx:3226
TSpectrum2Transform::BitReverseHaar
void BitReverseHaar(Double_t *working_space, Int_t shift, Int_t num, Int_t start)
AUXILIARY FUNCION // // This function carries out bir-reverse reordering for Haar transform // Functi...
Definition:
TSpectrum2Transform.cxx:455
xmin
float xmin
Definition:
THbookFile.cxx:93
TSpectrum2Transform::fSizeY
Int_t fSizeY
Definition:
TSpectrum2Transform.h:33
TSpectrum2Transform::fTransformType
Int_t fTransformType
Definition:
TSpectrum2Transform.h:34
TSpectrum2Transform::TSpectrum2Transform
TSpectrum2Transform()
TSpectrum2Transform::kTransformSinHaar
Definition:
TSpectrum2Transform.h:57
TSpectrum2Transform::kTransformWalsh
Definition:
TSpectrum2Transform.h:46
TSpectrum2Transform::~TSpectrum2Transform
virtual ~TSpectrum2Transform()
destructor
Definition:
TSpectrum2Transform.cxx:127
ymin
float ymin
Definition:
THbookFile.cxx:93
TSpectrum2Transform::kTransformSinWalsh
Definition:
TSpectrum2Transform.h:56
TSpectrum2Transform::fFilterCoeff
Double_t fFilterCoeff
Definition:
TSpectrum2Transform.h:41
Int_t
int Int_t
Definition:
RtypesCore.h:41
TSpectrum2Transform::kTransformInverse
Definition:
TSpectrum2Transform.h:59
TSpectrum2Transform::kTransformCosWalsh
Definition:
TSpectrum2Transform.h:54
TSpectrum2Transform::SetDirection
void SetDirection(Int_t direction)
SETTER FUNCION.
Definition:
TSpectrum2Transform.cxx:3250
TSpectrum2Transform::kTransformForward
Definition:
TSpectrum2Transform.h:58
TSpectrum2Transform::Transform
void Transform(const Double_t **fSource, Double_t **fDest)
Definition:
TSpectrum2Transform.cxx:1733
TSpectrum2Transform::kTransformFourierHaar
Definition:
TSpectrum2Transform.h:52
TSpectrum2Transform::fXmax
Int_t fXmax
Definition:
TSpectrum2Transform.h:38
TSpectrum2Transform::kTransformFourier
Definition:
TSpectrum2Transform.h:49
TSpectrum2Transform::Haar
void Haar(Double_t *working_space, Int_t num, Int_t direction)
AUXILIARY FUNCION // // This function calculates Haar transform of a part of data // Function paramet...
Definition:
TSpectrum2Transform.cxx:145
TNamed.h
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TSpectrum2Transform::kTransformCosHaar
Definition:
TSpectrum2Transform.h:55
TSpectrum2Transform::fYmax
Int_t fYmax
Definition:
TSpectrum2Transform.h:40
TSpectrum2Transform::GeneralInv
Int_t GeneralInv(Double_t *working_space, Int_t num, Int_t degree, Int_t type)
AUXILIARY FUNCION // // This function calculates inverse generalized (mixed) transforms // Function p...
Definition:
TSpectrum2Transform.cxx:626
TSpectrum2Transform::FilterZonal
void FilterZonal(const Double_t **fSource, Double_t **fDest)
Definition:
TSpectrum2Transform.cxx:2310
TSpectrum2Transform::kTransformCos
Definition:
TSpectrum2Transform.h:47
TSpectrum2Transform
Advanced 2-dimentional orthogonal transform functions.
Definition:
TSpectrum2Transform.h:30
ymax
float ymax
Definition:
THbookFile.cxx:93
TSpectrum2Transform::SetFilterCoeff
void SetFilterCoeff(Double_t filterCoeff)
SETTER FUNCION.
Definition:
TSpectrum2Transform.cxx:3267
TSpectrum2Transform::GeneralExe
Int_t GeneralExe(Double_t *working_space, Int_t zt_clear, Int_t num, Int_t degree, Int_t type)
AUXILIARY FUNCION // // This function calculates generalized (mixed) transforms of different degrees/...
Definition:
TSpectrum2Transform.cxx:505
TSpectrum2Transform::fSizeX
Int_t fSizeX
Definition:
TSpectrum2Transform.h:32
xmax
float xmax
Definition:
THbookFile.cxx:93
TSpectrum2Transform::Enhance
void Enhance(const Double_t **fSource, Double_t **fDest)
Definition:
TSpectrum2Transform.cxx:2756
TSpectrum2Transform::kTransformHaar
Definition:
TSpectrum2Transform.h:45
TSpectrum2Transform::kTransformHartley
Definition:
TSpectrum2Transform.h:50
TSpectrum2Transform::SetEnhanceCoeff
void SetEnhanceCoeff(Double_t enhanceCoeff)
SETTER FUNCION.
Definition:
TSpectrum2Transform.cxx:3280
TSpectrum2Transform::SetTransformType
void SetTransformType(Int_t transType, Int_t degree)
SETTER FUNCION.
Definition:
TSpectrum2Transform.cxx:3189
TSpectrum2Transform::Walsh
void Walsh(Double_t *working_space, Int_t num)
AUXILIARY FUNCION // // This function calculates Walsh transform of a part of data // Function parame...
Definition:
TSpectrum2Transform.cxx:228
Double_t
double Double_t
Definition:
RtypesCore.h:55
TSpectrum2Transform::HaarWalsh2
void HaarWalsh2(Double_t **working_matrix, Double_t *working_vector, Int_t numx, Int_t numy, Int_t direction, Int_t type)
AUXILIARY FUNCION // // This function calculates 2D Haar and Walsh transforms // Function parameters:...
Definition:
TSpectrum2Transform.cxx:749
type
int type
Definition:
TGX11.cxx:120
TSpectrum2Transform::BitReverse
void BitReverse(Double_t *working_space, Int_t num)
AUXILIARY FUNCION // // This function carries out bir-reverse reordering of data // Function paramete...
Definition:
TSpectrum2Transform.cxx:286
TSpectrum2Transform::fDegree
Int_t fDegree
Definition:
TSpectrum2Transform.h:35
TSpectrum2Transform::Fourier
void Fourier(Double_t *working_space, Int_t num, Int_t hartley, Int_t direction, Int_t zt_clear)
AUXILIARY FUNCION // // This function calculates Fourier based transform of a part of data // Functio...
Definition:
TSpectrum2Transform.cxx:329
TSpectrum2Transform::fYmin
Int_t fYmin
Definition:
TSpectrum2Transform.h:39
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
TSpectrum2Transform::General2
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)
AUXILIARY FUNCION // // This function calculates generalized (mixed) 2D transforms // Function parame...
Definition:
TSpectrum2Transform.cxx:1116
TSpectrum2Transform::kTransformSin
Definition:
TSpectrum2Transform.h:48
TSpectrum2Transform::kTransformFourierWalsh
Definition:
TSpectrum2Transform.h:51
TSpectrum2Transform::kTransformWalshHaar
Definition:
TSpectrum2Transform.h:53
TSpectrum2Transform::fEnhanceCoeff
Double_t fEnhanceCoeff
Definition:
TSpectrum2Transform.h:42
TSpectrum2Transform::fXmin
Int_t fXmin
Definition:
TSpectrum2Transform.h:37
TSpectrum2Transform::fDirection
Int_t fDirection
Definition:
TSpectrum2Transform.h:36
TSpectrum2Transform::FourCos2
void FourCos2(Double_t **working_matrix, Double_t *working_vector, Int_t numx, Int_t numy, Int_t direction, Int_t type)
AUXILIARY FUNCION // // This function calculates 2D Fourier based transforms // Function parameters: ...
Definition:
TSpectrum2Transform.cxx:844