public synchronized void itemStateChanged(ItemEvent e) {
		if (IJ.debugMode) IJ.log("ColorThresolder.itemStateChanged");
		ImagePlus imp = WindowManager.getCurrentImage();
		if (imp==null) return;
		Object source = e.getSource();
		if (source==methodChoice) {
			method = methodChoice.getSelectedItem();
		} else if (source==modeChoice) {
			mode = modeChoice.getSelectedIndex();
		} else if (source==colorSpaceChoice) {
			colorSpace = ((Choice)source).getSelectedIndex();
			flag = true;
			//originalB.setEnabled(false);
			filteredB.setEnabled(false);
			minHue=minSat=minBri=0;
			maxHue=maxSat=maxBri=255;
			bandPassH.setState(true);
			bandPassS.setState(true);
			bandPassB.setState(true);
		} else if (source==darkBackground) {
		}
		reset(imp);
		if (source==methodChoice || source==colorSpaceChoice || source==darkBackground)
			autoSetThreshold();
		checkImage(); //new
		updateNames();
		notify();
	}