class that implements a simple flood fill Based on recursive implementation described in http://en.wikipedia.org/wiki/Flood_fill
More...
#include <FloodFill.h>
|
static ArrayGrid< int > * | PrepareValues (ArrayGrid< double > *pGrid, int lowerBound, int upperBound, int targetValue) |
| allows to prepare a help grid to deal with filling between two thresholds instead of filling a single value in a grid More...
|
|
class that implements a simple flood fill Based on recursive implementation described in http://en.wikipedia.org/wiki/Flood_fill
Gets the bounding box of the region that was flooded if the region was empty, the point (0,0) is returned.
- Warning
- call is only valid after Run was called!!!
- Returns
- point that is center of gravity of the pixels that were flooded during the Run
common::Point< double > stira::imageanalysis::FloodFill::GetCenterOfGravity |
( |
| ) |
|
Gets the center of gravity of the region that was flooded if the region was empty, the point (0,0) is returned.
- Warning
- call is only valid after Run was called!!!
- Returns
- point that is center of gravity of the pixels that were flooded during the Run
std::vector< Point< int > > stira::imageanalysis::FloodFill::GetFloodedPixels |
( |
| ) |
|
Gets a vector with the pixels that were flooded during the Run.
- Warning
- call is only valid after Run was called!!!
- Returns
- vector with the pixels that were flooded during the Run
ArrayGrid< int > * stira::imageanalysis::FloodFill::PrepareValues |
( |
ArrayGrid< double > * |
pGrid, |
|
|
int |
lowerBound, |
|
|
int |
upperBound, |
|
|
int |
targetValue |
|
) |
| |
|
static |
int stira::imageanalysis::FloodFill::Run |
( |
ArrayGrid< int > * |
pGrid, |
|
|
int |
nodeX, |
|
|
int |
nodeY, |
|
|
int |
targetValue, |
|
|
int |
replacementValue, |
|
|
bool |
fill8Connected = true |
|
) |
| |
Run method of the fill.
- Parameters
-
pGrid | grid to be filled |
nodeX | x coordinate of starting seed |
nodeY | y coordinate of starting seed |
targetValue | value to be replaced |
replacementValue | value to replace targetValue by |
- Returns
- the number of pixels filled by this flooding
The documentation for this class was generated from the following files:
- imageanalysis/imageanalysis/FloodFill.h
- imageanalysis/imageanalysis/FloodFill.cpp