/** * Creates a new instance of Nearest. Note, this function uses a KdTree which is calculated in * this constructor. * * @see KdTree */ public Nearest(RealColorImage paletteImage) { tree2 = new KdTree(3); tree2.buildTreePalette(paletteImage); }