Re: Trouble using "endsWith" statements
Posted by
Herbie on
Mar 08, 2020; 3:03pm
URL: http://imagej.273.s1.nabble.com/Trouble-using-endsWith-statements-tp5023029p5023030.html
Greetings,
I don't think that plain ImageJ is able to open CZI-files. I think you
need to use the "Bio-Formats"-importer to do this.
That being said, I doubt what you've stated that "[...] the program I
wrote opens everything."
In principle your macro codes seems ok, but you should write:
saveAs( "TIFF", filename+"_Max.tif")
and
add the missing last curly brace at the end.
Regards
Herbie
::::::::::::::::::::::::::::::::::::::
Am 08.03.20 um 15:08 schrieb Franklin:
> dir1 = getDirectory("Select Input Directory");
> list = getFileList(dir1);
> for (i=0; i<list.length; i++)
> {
> showProgress(i+1, list.length);
> filename = dir1 + list[i];
> if(endsWith(filename,"czi")){
> open(filename);
> run("Z Project...", "projection=[Max Intensity]");
> saveAs("TIFF", dir1+list[i]+"Max");
> close();
> }
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html