public void run(String arg) {
		
		if (IJ.versionLessThan("1.37f")) return;
		int[] wList = WindowManager.getIDList();

		// 1 - Obtain the currently active image if necessary:

                // 2 - Ask for parameters:
		boolean  whiteParticles =Prefs.blackBackground, connect4=false;
		GenericDialog gd = new GenericDialog("Binary Label");
		gd.addMessage("Binary Label v 1.0");
		gd.addCheckbox("White particles on black background", whiteParticles);
		gd.addCheckbox("4 connected", false);
		gd.showDialog();
		if (gd.wasCanceled()) return
;
		// 3 - Retrieve parameters from the dialog
		whiteParticles = gd.getNextBoolean();
		connect4 = gd.getNextBoolean();
		ImagePlus imp1 = WindowManager.getCurrentImage();

		//if (imp1.getStackSize()>1 || imp2.getStackSize()>1) {
		//	IJ.showMessage("Error", "Stacks not supported");
		//	return;
		//}
		if (imp1.getBitDepth()!=8 ) {
			IJ.showMessage("Error", "Only 8-bit images are supported");
			return;
		}

		ImageStatistics stats;

		// Check images are binary. You must check this before calling the exec method.
		// 
		stats = imp1.getStatistics();
		if (stats.histogram[0] + stats.histogram[255] != stats.pixelCount){
			IJ.error("8-bit binary mask image (0 and 255) required.");
			return;
		}

		String name = "Labelled";

		 // 4 - Execute!
		Object[] result = exec(imp1,  name,  whiteParticles, connect4);
 
		// 5 - If all went well, show the image:
		if (null != result) {
			ImagePlus resultImage = (ImagePlus) result[1];

		resultImage.show();
		//IJ.log(""+result[2]);
		}
	}