Possible Bug in saveAs Function


#1

I have been trying to batch convert bunch of .raw files to .tif. When I use the FIJI Gui to save the images in a different format, the conversion is fine, as expected. However, since I have thousands of images, I am using a script to convert these images to .tif (script attached below). The problem is when I use this script on Mac OS, the converted images have some aberrations in the form of intensity variations from original image. But when I run the same script on Linux, I get the perfect conversion, as I get from manually saving the file in tif in Fiji Gui. I suspect this maybe because of a bug in saveAs function in script for converting file formats. Can someone please confirm this so I can report it as a bug? I have attached my script (The system is not allowing to upload my .raw images here as this extension is not allowed).

Script

dir1 = getDirectory("firstDirectory"); 
dir2 = getDirectory("secondDirectory"); 
list = getFileList(dir1); 
setBatchMode(true); 

for (i=0; i<list.length; i++) { 
        showProgress(i+1, list.length); 
        if(endsWith(list[i], ".raw")) { 
                run("Raw...", "open="+dir1+list[i]+" image=[16-bit Unsigned] width=512 height=512 offset=0 number=60 gap=0"); 
                saveAs("tif", dir2+list[i]); 
                close(); 
        } 
}

#2

Dear @mp007,

What exactly do you mean by that?

In general, it is worth checking if you have SCIFIO enabled one machine and not on the other: Edit > Options > ImageJ2 > Enable SCIFIO. That could explain a difference in the output of your macro.

Best,
Stefan