-1

I wrote the code as follows in ImageJ. But the image window is not created in open.

enter image description here

I want to load all the tif files into the folder and see them.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 20 '22 at 21:26

1 Answers1

0

The problem is the line setBatchMode(true);

If you delete that line, or set it to false, your script will open all the files in the folder in a way that you can see them. BatchMode allows a script to run without drawing the window and is intended for use in an automated script.

dir1 = getDirectory("Choose Source Directory");
list = getFileList(dir1);

for (i = 0; i < list.length; i++) {
    showProgress(i+1,list.length);
    filename = dir1 + list[i];
    if(endsWith(filename, "tif"));
    {
        open(filename);
    }
}
quantixed
  • 287
  • 3
  • 12