Problem with Batch mode - IJ.openImage() returned null

Until yesterday my Batch mode was working, but today I am getting the following response when I am trying to run the “test” : IJ.openImage() returned null. After that I tried to open the image through Batch mode as well, but it says the “file is too large”.

Just to know I am using OS Sierra and I tried to copy and paste the .app to overcome “Path Randomization”, when I installed the program.

Welcome to the forum, @bruno.ono!

To be able to help, we’ll need more information:

  • What is the macro code you’re trying to run?
  • How large is your image file, and what format?
  • Can you maybe post an example image file to reproduce the issue?

Hi imagejan,

Thank you for answering. My images are in tiff format and they have more or less 5 mb.

The macro code is the following:

// This will display the image at the batch mode
setAutoThreshold("Default dark");
call("ij.plugin.frame.ThresholdAdjuster.setMode", "Over/Under");
waitForUser("Set Threshold","After the threshold selection press ok!");
// This were setted to mannualy change the threshold
// After set the threshold press ok to continue 
run("ROI Manager...");
roiManager("Show All with labels");
roiManager("Associate", "false");
roiManager("Centered", "false");
roiManager("UseNames", "true");
roiManager("Set Color", "yellow");
roiManager("Set Line Width", 0);
setForegroundColor(14, 14, 14);
waitForUser("Add cells","After select and cut the cells press ok!");
// This function will get the name of the file
run("Clear Results");

I do not know why this problem is occurring, but I notice too that the batch is not working even for other macro runs and images of low files (2 mb). But when I try to open the same images through File>open it works. =S

Dear @bruno.ono,

Is it possible that you have .DS_Store files in that folder (since you are using macOS)?

You could try to set the file name filter (File name contains) to TIFF (depending on what the filename extension of your files is) in the Batch processing dialog to solve the issue. Or delete the .DS_Store files in it before starting the batch processing.


1 Like