j2d.color
Class Octree

java.lang.Object
  extended by j2d.color.Octree

public class Octree
extends java.lang.Object


Constructor Summary
Octree()
           
 
Method Summary
 void addImagesSeen(short[][] r, short[][] g, short[][] b)
          Use the octree color reduction algorithm on a image sequence, so that you can have a consistent color map for each image in the sequence.
 int findColor(j2d.color.Octree.Node tree, j2d.color.Octree.RGB color)
           
 int findNearestEntry(j2d.color.Octree.RGB color)
          search the color lookup table for
 short[][] getB()
           
 j2d.color.Octree.RGB[] getColorLut()
           
 short[][] getG()
           
 int getK()
           
 int getLeafLevel()
           
 int getLevel()
           
static int getMAXDEPTH()
           
 int getMaxNodes()
           
 int getNumNodes()
           
 short[][] getR()
           
 j2d.color.Octree.Node[] getReduceList()
           
 int getSize()
           
 j2d.color.Octree.Node getTree()
           
 void initVGAPalette(j2d.color.Octree.Node tree, int[] index)
           
 j2d.color.Octree.Node insertNode(j2d.color.Octree.Node node, j2d.color.Octree.RGB color, int depth)
           
 j2d.color.Octree.Node killTree(j2d.color.Octree.Node tree)
           
 void octreeQuantization(short[][] ra, short[][] ga, short[][] ba, int ki)
           
 void reduceTree()
           
 void reMap(short[][] r, short[][] g, short[][] b)
           
 void setColor()
           
 void setLeafLevel(int leafLevel)
           
 void setLevel(int level)
           
 void setMaxNodes(int maxNodes)
           
 void setNumNodes(int numNodes)
           
 void setSize(int size)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Octree

public Octree()
Method Detail

octreeQuantization

public void octreeQuantization(short[][] ra,
                               short[][] ga,
                               short[][] ba,
                               int ki)

reMap

public void reMap(short[][] r,
                  short[][] g,
                  short[][] b)

addImagesSeen

public void addImagesSeen(short[][] r,
                          short[][] g,
                          short[][] b)
Use the octree color reduction algorithm on a image sequence, so that you can have a consistent color map for each image in the sequence. After you have added all the images, go back an remap each image. - DL

Parameters:
r -
g -
b -

setColor

public void setColor()

findColor

public int findColor(j2d.color.Octree.Node tree,
                     j2d.color.Octree.RGB color)

findNearestEntry

public int findNearestEntry(j2d.color.Octree.RGB color)
search the color lookup table for

Parameters:
color -
Returns:
an index of the closest entry.

insertNode

public j2d.color.Octree.Node insertNode(j2d.color.Octree.Node node,
                                        j2d.color.Octree.RGB color,
                                        int depth)

killTree

public j2d.color.Octree.Node killTree(j2d.color.Octree.Node tree)

reduceTree

public void reduceTree()

initVGAPalette

public void initVGAPalette(j2d.color.Octree.Node tree,
                           int[] index)

getMAXDEPTH

public static int getMAXDEPTH()

getNumNodes

public int getNumNodes()

setNumNodes

public void setNumNodes(int numNodes)

getMaxNodes

public int getMaxNodes()

setMaxNodes

public void setMaxNodes(int maxNodes)

getSize

public int getSize()

setSize

public void setSize(int size)

getLevel

public int getLevel()

setLevel

public void setLevel(int level)

getLeafLevel

public int getLeafLevel()

setLeafLevel

public void setLeafLevel(int leafLevel)

getTree

public j2d.color.Octree.Node getTree()

getK

public int getK()

getR

public short[][] getR()

getG

public short[][] getG()

getB

public short[][] getB()

getColorLut

public j2d.color.Octree.RGB[] getColorLut()

getReduceList

public j2d.color.Octree.Node[] getReduceList()