|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.color.GrayAndVariance org.shapelogic.color.GrayRange
public class GrayRange
GrayRange describes a range of colors in the Gray 8 bit.
Used for color clustering, and particle counter.
Field Summary | |
---|---|
protected int |
_colorCenter
Color encoded in an int. |
protected IColorDistance |
_distance
Distance from colorCenter that will be accepted in this Range. |
protected boolean |
_frozen
|
Fields inherited from class org.shapelogic.color.GrayAndVariance |
---|
_grayStatistic, _maxColor, _maxDistance, _minColor |
Constructor Summary | |
---|---|
GrayRange()
|
Method Summary | |
---|---|
boolean |
colorInRange(int color)
Whether a color belong to the ColorRange. |
double |
distanceFromRange(int color)
Distance of input color from this ColorRange. |
double |
distanceFromRangeCenter(int color)
Distance of input color from this ColorRange. |
int |
getColorCenter()
|
IColorDistance |
getDistance()
|
double |
getMaxDistance()
|
boolean |
isRangeFrozen()
If the ColorRange can change. |
void |
merge(IColorAndVariance colorAndVariance)
|
void |
putPixel(int x,
int y,
int color)
Add the color for a given point (x,y). |
void |
setColorCenter(int center)
|
void |
setDistance(IColorDistance distance)
|
void |
setMaxDistance(double distance)
|
Methods inherited from class org.shapelogic.color.GrayAndVariance |
---|
getArea, getColorChannels, getMeanBlue, getMeanColor, getMeanGray, getMeanGreen, getMeanRed, getPixelArea, getStandardDeviation, setPixelArea, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.shapelogic.color.IColorAndVariance |
---|
getMeanBlue, getMeanColor, getMeanGreen, getMeanRed, getStandardDeviation |
Methods inherited from interface org.shapelogic.color.ColorChannels |
---|
getColorChannels |
Methods inherited from interface org.shapelogic.imageutil.HasArea |
---|
getArea |
Methods inherited from interface org.shapelogic.imageutil.HasPixelArea |
---|
getPixelArea, setPixelArea |
Field Detail |
---|
protected IColorDistance _distance
protected int _colorCenter
protected boolean _frozen
Constructor Detail |
---|
public GrayRange()
Method Detail |
---|
public void putPixel(int x, int y, int color)
GrayAndVariance
putPixel
in interface PixelHandler
putPixel
in class GrayAndVariance
public boolean colorInRange(int color)
IColorRange
colorInRange
in interface IColorRange
public double distanceFromRange(int color)
IColorRange
distanceFromRange
in interface IColorRange
public boolean isRangeFrozen()
IColorRange
isRangeFrozen
in interface IColorRange
public double getMaxDistance()
getMaxDistance
in interface IColorRange
public void setMaxDistance(double distance)
setMaxDistance
in interface IColorRange
public int getColorCenter()
getColorCenter
in interface IColorRange
public void setColorCenter(int center)
setColorCenter
in interface IColorRange
public double distanceFromRangeCenter(int color)
IColorRange
distanceFromRangeCenter
in interface IColorRange
public void merge(IColorAndVariance colorAndVariance)
merge
in interface IColorAndVariance
merge
in class GrayAndVariance
public IColorDistance getDistance()
getDistance
in interface IColorRange
public void setDistance(IColorDistance distance)
setDistance
in interface IColorRange
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |