GClasses
GClasses::GRegionAreaIterator Class Reference

Detailed Description

Iterates over all the pixels in an image that have the same color and are transitively adjacent. In other words, if you were to flood-fill a the specified point, this returns all the pixels that would be changed.

#include <GRegion.h>

Public Member Functions

 GRegionAreaIterator (GImage *pImage, int nSampleX, int nSampleY)
 The point (nSampleX, nSampleY) should be somewhere in the region The image pImage should be a region mask, such that all points in the same region have exactly the same pixel value. More...
 
 ~GRegionAreaIterator ()
 
bool next (int *pX, int *pY)
 If it returns false, the current values are invalid and it's done. If it returns true, pX and pY will hold the coordinates of a pixel in the region. More...
 

Protected Attributes

int m_bottom
 
int m_left
 
unsigned int m_nRegion
 
GImagem_pImage
 
int m_right
 
int m_top
 
int m_x
 
int m_y
 

Constructor & Destructor Documentation

GClasses::GRegionAreaIterator::GRegionAreaIterator ( GImage pImage,
int  nSampleX,
int  nSampleY 
)

The point (nSampleX, nSampleY) should be somewhere in the region The image pImage should be a region mask, such that all points in the same region have exactly the same pixel value.

GClasses::GRegionAreaIterator::~GRegionAreaIterator ( )

Member Function Documentation

bool GClasses::GRegionAreaIterator::next ( int *  pX,
int *  pY 
)

If it returns false, the current values are invalid and it's done. If it returns true, pX and pY will hold the coordinates of a pixel in the region.

Member Data Documentation

int GClasses::GRegionAreaIterator::m_bottom
protected
int GClasses::GRegionAreaIterator::m_left
protected
unsigned int GClasses::GRegionAreaIterator::m_nRegion
protected
GImage* GClasses::GRegionAreaIterator::m_pImage
protected
int GClasses::GRegionAreaIterator::m_right
protected
int GClasses::GRegionAreaIterator::m_top
protected
int GClasses::GRegionAreaIterator::m_x
protected
int GClasses::GRegionAreaIterator::m_y
protected