ImgPageIterator Class Reference

ImgPageIterator Class Reference

#include <image.h>

Class Description

Iterates over a specified region of an image in optimal order.

It does not lock the region of the image or otherwise cause it to be present in CPU memory – for that, use ImgLockPageIterator... Note that the regions returned are the tiles, stripes or pages that intersect the requested region – they may encompass a larger area than you request, or even the entire image.

Definition at line 1198 of file image.h.

+ Inheritance diagram for ImgPageIterator:

Public Member Functions

 ImgPageIterator (Image *img, const ImgTile *srcTile=0, bool writing=false)
 Create an iterator to cover the specified region of the image. More...
 
virtual ~ImgPageIterator ()
 
virtual bool next ()
 
voiddataPtr ()
 
- Public Member Functions inherited from ImgTile
 ImgTile ()
 Create a default empty tile. More...
 
 ImgTile (int X, int Y, int NX, int NY)
 Create a tile as specified in the parameters. More...
 
 ImgTile (const ImgTile &a, const ImgTile &b)
 Construct a tile by computing the intersection fo the two input tiles. More...
 
bool isEqualTile (const ImgTile &t) const
 
bool operator== (const ImgTile &t) const
 
bool operator!= (const ImgTile &t) const
 
bool isEmpty () const
 return true of this tile is empty More...
 
void setEmpty ()
 
bool contains (const ImgTile &a) const
 return true if this tile includes the specified tile More...
 
bool contains (int x_, int y_) const
 return true if this tile includes the specified point More...
 
void clipPositive ()
 Clip the tile so it will not extend into the negative quadrants. More...
 
void ExpandToInclude (int x_, int y_)
 Expand this tile to include the specified point. More...
 
void Expand (int numPixels=1)
 Grow the tile by the specified number of pixels on all 4 sides. More...
 
int numPixels () const
 return the number of pixels contained in this tile More...
 

Protected Attributes

voidm_BlindData
 
Imagem_Image
 
int m_Type
 
voidm_PixelData
 
ImgTile m_SrcTile
 

Additional Inherited Members

- Public Attributes inherited from ImgTile
int x
 x origin of the tile More...
 
int y
 y origin of the tile More...
 
int nx
 x size of the tile (width) More...
 
int ny
 y size of the tile (height) More...
 

Constructor & Destructor Documentation

ImgPageIterator ( Image img,
const ImgTile srcTile = 0,
bool  writing = false 
)

Create an iterator to cover the specified region of the image.

Parameters
imgA pointer to the image that you are iterating over
srcTileA const pointer to the region of the image to be iterated over – NULL means the bounds of the image
virtual ~ImgPageIterator ( )
virtual

Member Function Documentation

virtual bool next ( )
virtual

Reimplemented in ImgLockPageIterator.

void* dataPtr ( )
inline

Definition at line 1219 of file image.h.

1219 { return m_PixelData; }

Member Data Documentation

void* m_BlindData
protected

Definition at line 1200 of file image.h.

Image* m_Image
protected

Definition at line 1201 of file image.h.

int m_Type
protected

Definition at line 1202 of file image.h.

void* m_PixelData
protected

Definition at line 1203 of file image.h.

ImgTile m_SrcTile
protected

Definition at line 1204 of file image.h.


The documentation for this class was generated from the following file: