private void rebuildColourMap() {
		ArrayList<Integer> tempMap = new ArrayList<Integer>();
		tempMap.add(Integer.valueOf(0));
		for (ImageBean i : this.imageBeans) {
			int[] pixels = i.getPixels();
			for (int x : pixels) {
				if (!tempMap.contains(Integer.valueOf(x))) {
					tempMap.add(Integer.valueOf(x));
				}
			}
		}
		this.colourCount = tempMap.size();
		this.colourMap = new int[this.colourCount];
		for (int i = 0; i < this.colourCount; i++)
			this.colourMap[i] = ((Integer)tempMap.get(i)).intValue();
	}