Posted by
Curtis Rueden on
Jun 07, 2019; 4:34pm
URL: http://imagej.273.s1.nabble.com/How-to-resolve-no-plot-window-tp5022234p5022236.html
Hi,
It seems like an issue with batch mode. It works for me when I comment out
the setBatchMode(true).
Also, as an aside, you may want to change:
saveAs("Results", output + filename);
To:
saveAs("Results", output + filename + ".txt");
So that your results aren't saved into files that look like (but are not)
images.
Regards,
Curtis
--
Curtis Rueden
LOCI software architect -
https://loci.wisc.edu/softwareImageJ2 lead, Fiji maintainer -
https://imagej.net/User:RuedenHave you tried the Image.sc Forum?
https://forum.image.sc/On Fri, Jun 7, 2019 at 8:14 AM fieryice12 <
[hidden email]>
wrote:
> I am writing a macro to batch process multiple files in a folder. When I
> run
> this code, I'm getting the error message "No plot window in line 6". What
> is
> causing this and how can it be fixed? Thanks in advance.
>
> function action(output, filename)
> {
> open(input + filename);
> makeRectangle(75, 47, 40, 42);
> run("Plot Z-axis Profile", "profile=time");
> Plot.showValues();
> saveAs("Results", output + filename);
> close();
> }
>
> input = "C:/Users/Admin/Desktop/Input/";
> output = "C:/Users/Admin/Desktop/Output/";
>
> setBatchMode(true);
> list = getFileList(input);
> for (i = 0; i < list.length; i++)
> {
> action(output, list[i]);
> }
> setBatchMode(false);
>
>
>
> --
> Sent from:
http://imagej.1557.x6.nabble.com/>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html