node = node.children[id]; node.numPixels += SHIFT[level];
node.numPixels++;
        void classification() {            addTransparency = false;            firstColor = 0;            for (int i = 0; i < pixels.length; i++) {                int pixel = pixels[i];                int red = (pixel >> 16) & 0xff;                int green = (pixel >> 8) & 0xff;                int blue = (pixel >> 0) & 0xff;                int alpha = (pixel >> 24) & 0xff;                if (alphaToBitmask)                    alpha = alpha < 0x80 ? 0 : 0xff;                if (alpha > 0) {                    // a hard limit on the number of nodes in the tree                    if (numNodes > MAX_NODES) {                        //	System.out.println("pruning");                        root.pruneLevel();                        --depth;                    }                    // walk the tree to depth, increasing the                    // numPixels count for each node                    Node node = root;                    for (int level = 1; level <= depth; ++level) {                        int id = (((red > node.midRed ? 1 : 0) << 0)                            | ((green > node.midGreen ? 1 : 0) << 1)                            | ((blue > node.midBlue ? 1 : 0) << 2) | ((alpha > node.midAlpha ? 1                            : 0) << 3));                        if (node.children[id] == null) {                            new Node(node, id, level);                        }                        node = node.children[id];                        node.numPixels += SHIFT[level];                    }                    ++node.unique;                    node.totalRed += red;                    node.totalGreen += green;                    node.totalBlue += blue;                    node.totalAlpha += alpha;                } else if (!addTransparency) {                    addTransparency = true;                    numColors++;                    firstColor = 1; // start at 1 as 0 will be the transparent                                    // color                }            }        }