ROI and tile support.
More...
#include <WaveletTransform.h>
List of all members.
Detailed Description
ROI and tile support.
PGF ROI and tile support. This is a helper class for CWaveletTransform.
- Author:
- C. Stamm
Definition at line 45 of file WaveletTransform.h.
Constructor & Destructor Documentation
CROIs::CROIs |
( |
int |
levels | ) |
[inline, private] |
Constructor: Creates a ROI helper object
- Parameters:
-
levels | The number of levels (>= 0) |
Definition at line 51 of file WaveletTransform.h.
CROIs::~CROIs |
( |
| ) |
[inline, private] |
Member Function Documentation
void CROIs::ComputeIndices |
( |
UINT32 |
width, |
|
|
UINT32 |
height, |
|
|
const PGFRect & |
rect |
|
) |
| [private] |
Compute tile indices for given rectangle (ROI)
- Parameters:
-
width | PGF image width |
height | PGF image height |
rect | ROI |
Definition at line 596 of file WaveletTransform.cpp.
{
ComputeTileIndex(width, height, rect.left, true, true);
ComputeTileIndex(width, height, rect.top, false, true);
ComputeTileIndex(width, height, rect.right, true, false);
ComputeTileIndex(width, height, rect.bottom, false, false);
}
void CROIs::ComputeTileIndex |
( |
UINT32 |
width, |
|
|
UINT32 |
height, |
|
|
UINT32 |
pos, |
|
|
bool |
horizontal, |
|
|
bool |
isMin |
|
) |
| [private] |
Computes a tile index either in x- or y-direction for a given image position.
- Parameters:
-
width | PGF image width |
height | PGF image height |
pos | A valid image position: (0 <= pos < width) or (0 <= pos < height) |
horizontal | If true, then pos must be a x-value, otherwise a y-value |
isMin | If true, then pos is left/top, else pos right/bottom |
Definition at line 554 of file WaveletTransform.cpp.
{
ASSERT(m_indices);
UINT32 m;
UINT32 tileIndex = 0;
UINT32 tileMin = 0, tileMax = (horizontal) ? width : height;
ASSERT(pos <= tileMax);
for (int i=m_nLevels - 1; i >= 0; i--) {
if (horizontal) {
if (isMin) {
m_indices[i].left = tileIndex;
} else {
m_indices[i].right = tileIndex + 1;
}
} else {
if (isMin) {
m_indices[i].top = tileIndex;
} else {
m_indices[i].bottom = tileIndex + 1;
}
}
tileIndex <<= 1;
m = (tileMin + tileMax)/2;
if (pos >= m) {
tileMin = m;
tileIndex++;
} else {
tileMax = m;
}
}
}
void CROIs::CreateIndices |
( |
| ) |
[private] |
void CROIs::CreateROIs |
( |
| ) |
[private] |
void CROIs::Destroy |
( |
| ) |
[inline, private] |
const PGFRect& CROIs::GetIndices |
( |
int |
level | ) |
const [inline, private] |
UINT32 CROIs::GetNofTiles |
( |
int |
level | ) |
const [inline] |
Returns the number of tiles at a given level.
- Parameters:
-
level | A wavelet transform pyramid level (>= 0 && < Levels()) |
Definition at line 72 of file WaveletTransform.h.
const PGFRect& CROIs::GetROI |
( |
int |
level | ) |
const [inline] |
Return region of interest at a given level.
- Parameters:
-
level | A wavelet transform pyramid level (>= 0 && < Levels()) |
Definition at line 77 of file WaveletTransform.h.
UINT32 CROIs::Left |
( |
int |
level | ) |
const [inline, private] |
bool CROIs::ROIisSupported |
( |
| ) |
const [inline, private] |
void CROIs::SetROI |
( |
int |
level, |
|
|
const PGFRect & |
rect |
|
) |
| [inline, private] |
UINT32 CROIs::Top |
( |
int |
level | ) |
const [inline, private] |
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files: