SaveAs Measurements in Batch mode

Dear All,

I hope my first question is not causing any pain to the readers. I have the following problem:
I’m processing multiple color images in batch mode, the script is quite easy and has a segmentation step followed by the transfer of multiple RoIs to the original colored image and subsequent measurement. If I’m running it manually, the ‘Results’ window opens and I can “File>Save as…” and the table appears with all the rows. In the batch mode I wanted to do the same but only the last appears. Of course I can print out every measurement in a single file (though for loop), but is not the desired output.
How can I overcome this difference between manual and batch mode?

I tried the following approaches:

  • for loop
n = roiManager("count");
for (i = 0; i < n; i++) {
    roiManager("select", i);
saveAs("Results",  name+"resultsTable.txt");

  • using RoI manager
roiManager("Show All");
saveAs("Results",  name+"resultsTable.txt");

  • using Multi-Measurement
roiManager("multi-measure measure_all append");
saveAs("Results",  name+"resultsTable.txt");

PS: during batch processing, seems that no Results window even exist “No window with the title “Results” found.”