public class FillResult extends Object
RegionalizeOpImage and FloodFiller
to record data describing an image region that has just been flood-filled.
Although public, it is not intended for general use unless you are modifying or sub-classing the flood fill classes.
| Constructor and Description |
|---|
FillResult(int id,
double value,
List<FloodFiller.ScanSegment> segments)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int x,
int y)
Checks if this region contains the given location.
|
void |
expand(FillResult other)
Merges the given region into this region.
|
Rectangle |
getBounds()
Gets the bounds of this region.
|
int |
getID()
Gets the ID of this region.
|
int |
getNumPixels()
Gets the number of pixels within this region.
|
double |
getValue()
Gets the reference value of this region.
|
public FillResult(int id,
double value,
List<FloodFiller.ScanSegment> segments)
id - unique ID assigned to this regionvalue - representative value of pixels in this regionsegments - list of line segments making up this regionpublic boolean contains(int x,
int y)
x - X ordinatey - Y ordinatetrue if the region contains the location;
false otherwisepublic void expand(FillResult other)
At present, this method doesn't bother about merging scan segments, it just adds the other region's segments and updates the index and bounds as necessary.
other - other regionpublic int getID()
public Rectangle getBounds()
public int getNumPixels()
public double getValue()
Copyright © 2009–2018. All rights reserved.