Batch mode messed up my folder

Tags: #<Tag:0x00007fd542ea7440> #<Tag:0x00007fd542ea7300>


I am experiencing some frustrating behavior after I tried to Batch to apply a macro to a folder of images. Now FIJI will not let me open images from this folder (and copies of this folder).

I’m pretty sure that I did the following
Analyze > Batch > Macro
I selected a folder containing images (.tif) and other files as the input and output path.
I pasted in my big macro into the text box, clicked Process.
An error was given right away because my macro was too big, and as far as I can tell – no output file was created.
Now when I try to open any of the files from this folder in FIJI, a ‘Bio-Formats Import Options’ window opens instead of my image (below). This error persists with a copied version of the folder.

Has this happened to other people? Does anyone have ideas of change what is going on? And how I can undo it?


Does your images still open after your click OK here in this window? If not, you can try to use the ‘Windowless’ mode while opening your files. This can be configured under Plugins>>Bio-Formats>>Bio formats configurations >> Formats.


Clicking OK in the Import window doesn’t open the images. It throws the following error.
‘Opener window’ > “File is not supported format, a reader plugin is not available, or it was not found.”

I tried setting the Bio-Formats windowless configuration and that did not fix it. Would uninstalling the Bio-Format plugin fix this?


Do you think you could share the macro you wanted to use?


I’ve given up on the idea of batch applying my macro for 2 reasons. 1) It requires user input, (setting thresholds and clicking buttons for approval) and 2) it’s >900 lines. I don’t think I’ll ever get it below the size limit. But here’s the link to the version I tried using nontheless.
Could the macro have influenced the Batch setting for this folder if it never ran?

My main objectives for this thread are to 1) undo the Batch settings I unwittingly applied and 2) gain a better understanding of how Batch works, what these settings are and why they persist once they are set.
If you have advice or links to resources that could provide insight to this, I think that would be most helpful.


I’ve come across this problem again useing a smaller macro.
I’m not clear on what / how / why Bioformat is opening

I have a folder with 2 .tiff images (3 channels), the small macro I’m running is to make new folders named for the images using the batch mode. When I run the macro below on the directory in the ‘Test’ option of batch mode, it works fine.
When I run “process” in batch mode, the macro is executed (folders are made) but I think the image files are edited or saved in a different format. The windows icon changes and when I try to open the file in Fiji, the BioFormat importer window appears.

Here is the macro I’m trying to run through batch processing.

mainTitle_path = substring(mainTitle, 0, lengthOf(mainTitle)-4);//remove tiff
input = “C:\Users\alpeterson7\Desktop\macro material\test\”;
dirCropOutput = input+mainTitle_path;

Why are the tiff files changed this way when they are run through batch processing? Is there a way to turn off BioFormat?

I don’t really understand how BioFormat in working under the hood of Fiji with the Batch processing, I may be missing a major point of why BioFormat can’t be turned off. I am still learning how to feed macros into the batch processing.


Dear @petersoapes,

did you set the input and the output folder to the same directory? Does the same thing happen, when you have the output folder empty?

The ImageJ manual on that topic:

Output… […] Note that original files will not be saved if this field is left empty.

This implies that your input files will indeed be replaced when output folder == input folder.



Thank you Stefan. I guess I was dealing with a beginer’s mistake. I did set input and output as the same folder. Changing it or leaving it empty fixed it.