|
Hello
I'm writing a plugin which requires the image to be thresholded first so that I can save the threshold values into variables for later use. I googled and searched this list and the best method is to record the process in ImageJ. However when I use the recorded code ImageJ doesn't wait for me to perform any threshold before it records the values it then takes no notice of the threshold values I use. My code is below does anyone know how to make ImageJ wait for my input before proceeding to the next step. I tried the IJ.wait(10000) command which works but seems an ugly way of doing it
public void run(ImageProcessor ip) {
IJ.run("Threshold...","method='Default'");
upperthresh = ip.getMaxThreshold();
lowerthresh = ip.getMinThreshold();
}
Any help appreciated
|