I’m very new to FIJI, coding, and scripting, and need some help troubleshooting a laughably simple macro that stopped working after the most recent FIJI update. Before the update, all I had to do was run the macro and choose an input .lif file, and FIJI would open every series in the file (every series was a z stack view of a different macaque brain region), separate them into separate .tif files, then I would select the output folder I wanted to save them to. Some of my .lif files can still be processed just fine; when the series of views were collected by simply selecting regions of brain using the confocal microscope, each image was labeled as “Series 1 through n” by the microscope, followed by the naming convention chosen for that experiment (Note that the naming convention doesn’t get added until I’ve chosen an output folder. I’ve included a screenshot of what it looks like when I open a .lif file that works directly in FIJI).
For the .lif files that crash the macro, the fields of view were collected first by the grad student selecting a random spot to orient himself, then using the “Mark and Find” function of the microscope to pre-select the spots he wanted to image, then allowing the microscope to collect each image. FIJI will open the first series in the file, save it to my selected output folder, and then I get the error shown below when I try to save the second series in the file to any selected folder.
When I open the problematic .lif files in FIJI directly and it asks which of the series I’d like to open, they’re labelled differently; all of the fields of view are still preceded by “Series 1 through n,” but the first randomly-selected field of view is labeled “Series001”, and the following fields of view are labeled “Mark and Find/Position001 through n” or “Mark and Find001/Position1 through n” depending on the microscope used (I’ve included an example of each below).
I’m guessing the problematic thing here is the “Mark and Find” addition to the name, which my macro doesn’t know how to account for. Either the addition of that label is the problem, or the mismatch between the Series number (n) and the Mark and Find position number (n-1). Unfortunately I don’t know how to selectively remove the first series from the .lif file, so the series number and Mark and Find position number match up, so I haven’t been able to test that. I’ve included a screenshot of my macro below; I think the problem is at line 10. The Series number is defined, and the macro is told to begin at Series 1 and continue running until Series n is opened, but maybe since the position isn’t defined, it gets stuck.