org.hd.d.pg2k.svrCore.MIME
Class Quantize.Cube.Node

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.MIME.Quantize.Cube.Node
Enclosing class:
Quantize.Cube

static class Quantize.Cube.Node
extends java.lang.Object

A single Node in the tree.


Field Summary
(package private)  Quantize.Cube.Node[] child
           
(package private)  int color_number
           
(package private)  Quantize.Cube cube
           
(package private)  int id
           
(package private)  int level
           
(package private)  int mid_blue
           
(package private)  int mid_green
           
(package private)  int mid_red
           
(package private)  int nchild
           
(package private)  int number_pixels
           
(package private)  Quantize.Cube.Node parent
           
(package private)  int total_blue
           
(package private)  int total_green
           
(package private)  int total_red
           
(package private)  int unique
           
 
Constructor Summary
Quantize.Cube.Node(Quantize.Cube.Node parent, int id, int level)
           
Quantize.Cube.Node(Quantize.Cube cube)
           
 
Method Summary
(package private)  void closestColor(int red, int green, int blue, Quantize.Cube.Search search)
           
(package private)  void colormap()
           
(package private) static int distance(int color, int r, int g, int b)
          Figure out the distance between this node and som color.
(package private)  void pruneChild()
          Remove this child node, and make sure our parent absorbs our pixel statistics.
(package private)  void pruneLevel()
          Prune the lowest layer of the tree.
(package private)  int reduce(int threshold, int next_threshold)
          Remove any nodes that have fewer than threshold pixels.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cube

Quantize.Cube cube

parent

Quantize.Cube.Node parent

child

Quantize.Cube.Node[] child

nchild

int nchild

id

int id

level

int level

mid_red

int mid_red

mid_green

int mid_green

mid_blue

int mid_blue

number_pixels

int number_pixels

unique

int unique

total_red

int total_red

total_green

int total_green

total_blue

int total_blue

color_number

int color_number
Constructor Detail

Quantize.Cube.Node

Quantize.Cube.Node(Quantize.Cube cube)

Quantize.Cube.Node

Quantize.Cube.Node(Quantize.Cube.Node parent,
                   int id,
                   int level)
Method Detail

pruneChild

void pruneChild()
Remove this child node, and make sure our parent absorbs our pixel statistics.


pruneLevel

void pruneLevel()
Prune the lowest layer of the tree.


reduce

int reduce(int threshold,
           int next_threshold)
Remove any nodes that have fewer than threshold pixels. Also, as long as we're walking the tree: - figure out the color with the fewest pixels - recalculate the total number of colors in the tree


colormap

void colormap()

closestColor

void closestColor(int red,
                  int green,
                  int blue,
                  Quantize.Cube.Search search)

distance

static final int distance(int color,
                          int r,
                          int g,
                          int b)
Figure out the distance between this node and som color.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.