Hello, I’ve just started using ImageJ (Fiji, actually) a couple of weeks ago and trying to understand how its macro works (also new field to me). Could someone tell me if “Array.sort” function can only work when all file names in an array only contain either numbers or strings? I mean, it can work for “001.tif, 002.tif, 003.tif” or “aaa.tif, bbb.tif, ccc.tif” but NOT for “aaa_001.tif, aaa_002.tif, aaa_003.tif”?
I saw information at the following link but wasn’t sure if I understood correctly.
I asked this because I’m trying to understand batch processing scripts, whose open examples often contain Array.sort macro.
Like this one:
However, my default file names are like “aaa_ch01, aaa_ch02, bbb_ch01, bbb_ch02, ccc_ch01, ccc_ch02, …” where ch01 and ch02 represents different detectors on each image. And so far I couldn’t find a solution to sort these files properly in an array (made from getFileList macro).
Of course I can assemble them in different folders at first and change file names so that they only contain numbers or strings. But I was curious if there’s any smarter way…
Thanks in advance for any help!