29 #ifndef PGF_WAVELETTRANSFORM_H
30 #define PGF_WAVELETTRANSFORM_H
38 #define FilterHeight 3
40 #ifdef __PGFROISUPPORT__
51 CROIs(
int levels) :
m_nLevels(levels), m_ROIs(0), m_indices(0) { ASSERT(levels > 0); }
57 void Destroy() {
delete[] m_ROIs; m_ROIs = 0;
delete[] m_indices; m_indices = 0; }
60 void ComputeIndices(UINT32 width, UINT32 height,
const PGFRect& rect);
61 void SetROI(
int level,
const PGFRect& rect) { ASSERT(m_ROIs); ASSERT(level >= 0 && level <
m_nLevels); m_ROIs[level] = rect; }
62 const PGFRect& GetIndices(
int level)
const { ASSERT(m_indices); ASSERT(level >= 0 && level <
m_nLevels);
return m_indices[level]; }
63 UINT32 Left(
int level)
const { ASSERT(m_ROIs); ASSERT(level >= 0 && level <
m_nLevels);
return m_ROIs[level].left; }
64 UINT32 Top(
int level)
const { ASSERT(m_ROIs); ASSERT(level >= 0 && level <
m_nLevels);
return m_ROIs[level].top; }
65 bool ROIisSupported()
const {
return m_ROIs != 0; }
66 void ComputeTileIndex(UINT32 width, UINT32 height, UINT32 pos,
bool horizontal,
bool isMin);
72 UINT32 GetNofTiles(
int level)
const { ASSERT(level >= 0 && level <
m_nLevels);
return 1 << (
m_nLevels - level - 1); }
77 const PGFRect& GetROI(
int level)
const { ASSERT(m_ROIs); ASSERT(level >= 0 && level <
m_nLevels);
return m_ROIs[level]; }
85 #endif //__PGFROISUPPORT__
135 #ifdef __PGFROISUPPORT__
139 void SetROI(
const PGFRect& rect);
148 const PGFRect& GetTileIndices(
int level)
const {
return m_ROIs.GetIndices(level); }
153 UINT32 GetNofTiles(
int level)
const {
return m_ROIs.GetNofTiles(level); }
158 const PGFRect& GetROI(
int level)
const {
return m_ROIs.GetROI(level); }
160 #endif // __PGFROISUPPORT__
164 #ifdef __PGFROISUPPORT__
174 #ifdef __PGFROISUPPORT__
176 #endif //__PGFROISUPPORT__
182 #endif //PGF_WAVELETTRANSFORM_H