Login  Register

Adjusting threshold without opening image window

Posted by kt7 on Feb 02, 2017; 4:57pm
URL: http://imagej.273.s1.nabble.com/Adjusting-threshold-without-opening-image-window-tp5018000.html

Whenever I run the following code I get an error that no windows are open. I know that i could rewrite as: IJ.open("path"+(i)+".jpg"); however i am trying t save the runtime from opening the windows for 900 images.
Thanks,
Kyle

for(int i=0; i<900; i++){
                        ImagePlus image1 =IJ.openImage("path"+(i)+".jpg");
                        ij.setThreshold(threshold, 255,"Black & White");
}