Re: Help: Batch conversion RAW to TIFF 16-bit
Posted by ved sharma-2 on Sep 08, 2010; 4:22am
URL: http://imagej.273.s1.nabble.com/Help-Batch-conversion-RAW-to-TIFF-16-bit-tp3686996p3686999.html
Hi Simone,
See if the following code works:
//-----------Code starts here---------------------
dir1 = getDirectory("Choose Source Directory ");
dir2 = getDirectory("Choose Destination Directory ");
list = getFileList(dir1);
setBatchMode(true);
for (i=0; i<list.length; i++) {
showProgress(i+1, list.length);
if(endsWith(list[i], ".CCN")) {
run("Raw...", "open="+dir1+list[i]+" image=[16-bit Unsigned] width=640 height=480 offset=359 number=1 gap=0");
saveAs("tiff", dir2+list[i]);
close();
}
}
//-----------Code ends here------------------------
Ved