VIPER REFERENCE MANUAL


NAME
iflTileIter - tile iterator

INHERITS FROM
iflTile2D : iflTile3D

HEADER FILE
#include <ifl/iflTileIter.h>

PUBLIC METHOD SUMMARY

   Constructors
iflTileIter ( const iflTile3Dint& parent, const iflSize& pageSize, int cSize, const iflConfig* config=NULL, int tileAligned=FALSE);
iflTileIter ( const iflTile3Dint& parent, int cSize, const iflConfig* config=NULL, int tileAligned=FALSE);

   Iteration
int more (  );
int getCount (  );

   Initialization
void setPageSize ( const iflSize& pageSize);
void setTile ( const iflTile3Dint& parent, int cSize, const iflConfig* cfg=NULL, int tileAligned=0);
void setPageBorder ( const iflXYZint& border, int includeBorder=FALSE);

PUBLIC MEMBER SUMMARY
int c;
int nc;

PROTECTED METHOD SUMMARY
iflTileIter (  );

INHERITED PUBLIC METHODS

   Inherited from iflTile3D
iflTile3D& boundingBox ( const iflTile3D& a, const iflTile3D& b, const iflTile3D& c);
iflTile3D& boundingBox ( const iflTile3D& a, const iflTile3D& b);
int contains ( const iflTile3D& tile) const;
int contains ( const iflTile3D& tile, tileType xMax, tileType yMax, tileType zMax) const;
int contains ( tileType X, tileType Y, tileType Z) const;
void grow ( const iflXYZ<tileType>& delta);
void grow ( const iflXY<tileType>& delta);
iflTile3D& init ( tileType X, tileType Y, tileType Z, tileType Nx, tileType Ny, tileType Nz);
iflTile3D& init ( const iflTile3D& tile);
iflTile3D& init ( const iflTile2D<tileType>& tile, tileType Z=0, tileType Nz=1);
iflTile3D& intersect ( const iflTile3D& a, const iflTile3D& b);
iflTile3D& intersect ( const iflTile3D& a, const iflTile3D& b, const iflTile3D& c);
int operator!= ( const iflTile3D& tile) const;
void operator+= ( const iflXY<tileType>& offset);
void operator+= ( const iflXYZ<tileType>& offset);
void operator-= ( const iflXYZ<tileType>& offset);
void operator-= ( const iflXY<tileType>& offset);
iflTile3D& operator= ( const iflTile2D<tileType>& tile);
iflTile3D& operator= ( const iflTile3D& tile);
int operator== ( const iflTile3D& tile) const;
tileType& origin ( iflAxis axis);
void shrink ( const iflXY<tileType>& delta);
void shrink ( const iflXYZ<tileType>& delta);
tileType& size ( iflAxis axis);

   Inherited from iflTile2D
iflTile2D& boundingBox ( const iflTile2D& a, const iflTile2D& b);
iflTile2D& boundingBox ( const iflTile2D& a, const iflTile2D& b, const iflTile2D& c);
int contains ( tileType X, tileType Y) const;
int contains ( const iflTile2D& tile) const;
int contains ( const iflTile2D& tile, tileType xMax, tileType yMax) const;
void grow ( const iflXY<tileType>& delta);
iflTile2D& init ( tileType X, tileType Y, tileType Nx, tileType Ny);
iflTile2D& init ( const iflTile2D& tile);
iflTile2D& intersect ( const iflTile2D& a, const iflTile2D& b);
iflTile2D& intersect ( const iflTile2D& a, const iflTile2D& b, const iflTile2D& c);
int operator!= ( const iflTile2D& tile) const;
void operator+= ( const iflXY<tileType>& offset);
void operator-= ( const iflXY<tileType>& offset);
int operator== ( const iflTile2D& tile) const;
tileType& origin ( iflAxis axis);
void shrink ( const iflXY<tileType>& delta);
tileType& size ( iflAxis axis);

CLASS DESCRIPTION
This class is primarily used to iterate through the pages covering a tile. It assumes that pages are fixed size and that the origin of the first page is aligned with (0,0). The alignment assumption can be overridden by setting the tileAligned flag, either in the constructor or in the setTile() method. Pages are assumed to be abutted unless the page border attribute is set using setPageBorder(); in this case, the page origins will be altered so that each page overlaps its neigbors by twice the page border and the first page will have it's origin at (-bx,-by,-bz).

The iflTileIter class contains eight public member variables, six of which are derived from iflTile3D<int>, that together specify the current page:

int (x,y,z,c)
The origin of the current page.

int (nx,ny,nz,nc)
The size of the current page. (These values are constant.)

METHOD DESCRIPTIONS

   iflTileIter()
iflTileIter ( const iflTile3Dint& parent, const iflSize& pageSize, int cSize, const iflConfig* config=NULL, int tileAligned=FALSE);
iflTileIter ( const iflTile3Dint& parent, int cSize, const iflConfig* config=NULL, int tileAligned=FALSE);

The first constructor takes a parent tile and a page size (pageSize). This will make a tile with the same size as the page that can be stepped across the parent tile in a row by row fashion. The constructed tile will have its origin aligned to a multiple of its size (unless tileAligned is TRUE, in which case this tile will have is origin aligned to the parent's origin). The constructor also takes the number of channels in the parent tile, cSize, and a channel list/channel offset (in cfg), to control stepping in the channel dimension.

The second version of the constructor defers setting the page size to a later call to setPageSize().

   iflTileIter()
iflTileIter (  );

The protected constructor is used by derived classes, which are responsible initializing the object.

   getCount()
int getCount (  );

This method returns the total number of pages that will be iterated through for the current parameter values.

   more()
int more (  );

This method is used to iterate through the page locations that cover the parent tile. It must be called prior to accessing the first page location. It will return FALSE when there are no more page locations to iterate through, TRUE otherwise. After each call to more() the public member variables, (x,y,z,c), will indicate to origin of the next page.

   setPageBorder()
void setPageBorder ( const iflXYZint& border, int includeBorder=FALSE);

This method is used to apply a page border, (border) to this tile; this will cause the iterated locations to overlap by twice the page border in each dimension; reflecting the way pages with borders are stored in an image cache. If includeBorder is TRUE then pages that only supply border data will be included (useful when iterating for write access to a cache).

   setPageSize()
void setPageSize ( const iflSize& pageSize);

This method sets the size of this tile (i.e. the page size that will be iterated).

   setTile()
void setTile ( const iflTile3Dint& parent, int cSize, const iflConfig* cfg=NULL, int tileAligned=0);

This method resets the dimensions of the parent tile that will be iterated across. The parameters have the same meanings as on the constructor.

MEMBER DESCRIPTIONS

   c
int c;

The current channel.

   
nc
int nc;

The number of channels per page.

SEE ALSO
iflTile2D, iflTile3D