|
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.OctreeNode
A single node in an octree.
OctreeColorQuantizer
Field Summary |
Fields inherited from interface net.sourceforge.jiu.data.RGBIndex |
INDEX_BLUE, INDEX_GREEN, INDEX_RED |
Constructor Summary | |
OctreeNode()
|
Method Summary | |
static boolean |
add(OctreeNode root,
int red,
int green,
int blue,
int bitsPerSample)
Add a color red-green-blue to the octree, given by its root node. |
int |
compare(Object o1,
Object o2)
Compares the two argument objects and returns their relation. |
void |
copyChildSums()
Adds the sums for red, green and blue values and the pixel count values of all child nodes and stores the results in this node. |
void |
determineRepresentativeColor()
|
int |
getBlue()
|
OctreeNode[] |
getChildren()
|
int |
getGreen()
|
int |
getNumChildren()
|
int |
getPaletteIndex()
|
int |
getRed()
|
boolean |
isLeaf()
|
int |
map(int[] origRgb,
int[] quantizedRgb)
Returns the index of the best match for origRgb in the palette or -1 if the best match could not be determined. |
void |
setChildren(OctreeNode[] newChildren)
|
void |
setPaletteIndex(int index)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OctreeNode()
Method Detail |
public static boolean add(OctreeNode root, int red, int green, int blue, int bitsPerSample)
root
- root node of the octreered
- the red intensity value of the color to be addedgreen
- the green intensity value of the color to be addedblue
- the blue intensity value of the color to be addedbitsPerSample
- public int compare(Object o1, Object o2)
ComparatorInterface
o1
is smaller than o2
,o1
is equal to o2
ando1
is greater than o2
.
compare
in interface ComparatorInterface
public void copyChildSums()
public void determineRepresentativeColor()
public int getBlue()
public OctreeNode[] getChildren()
public int getGreen()
public int getNumChildren()
public int getPaletteIndex()
public int getRed()
public boolean isLeaf()
public int map(int[] origRgb, int[] quantizedRgb)
public void setChildren(OctreeNode[] newChildren)
public void setPaletteIndex(int index)
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |