|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.color.quantization.RGBColorList
Holds an array of RGBColor
objects.
Field Summary |
Fields inherited from interface net.sourceforge.jiu.data.RGBIndex |
INDEX_BLUE, INDEX_GREEN, INDEX_RED |
Constructor Summary | |
RGBColorList(Histogram3D hist)
Creates a new list and initializes it with the argument histogram. |
Method Summary | |
int[] |
findExtrema(int i1,
int i2)
In a given interval of the list this method searches for the color axis that has the largest distribution of values. |
RGBColor |
getColor(int index)
Returns an RGBColor object from this list, given by its zero-based
index value. |
int |
getNumEntries()
Returns the number of color objects in this list. |
void |
sortByAxis(int index1,
int index2,
int axis)
Sorts an interval of the array of colors by one of the three components (RGB). |
void |
sortByCounter(int index1,
int index2)
Sorts an interval of the array of colors by their counters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RGBColorList(Histogram3D hist)
hist
- the histogram from which the list will be initialized
IllegalArgumentException
- thrown if no histogram entry has a non-zero counterMethod Detail |
public int[] findExtrema(int i1, int i2)
public RGBColor getColor(int index)
RGBColor
object from this list, given by its zero-based
index value.
index
- zero-based index into the list; must be smaller than getNumEntries()
public int getNumEntries()
public void sortByAxis(int index1, int index2, int axis)
index1
- the index of the first element in the intervalindex2
- the index of the last element in the intervalaxis
- the color component by which the interval is to be sorted, RGBIndex.INDEX_RED
, RGBIndex.INDEX_GREEN
or RGBIndex.INDEX_BLUE
public void sortByCounter(int index1, int index2)
index1
- the index of the first element in the intervalindex2
- the index of the last element in the interval
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |