Logging in Icy protocols


currently I use quite often the sequence file batch block in protocols to process a group of images. Sometimes an error occurs in one of my javascript blocks because, for instance, the segmentation beforehand failed for some reason.
In such a case I would like to log this event, stop the execution of that particular image and go on to the next. Is that somehow feasible? Even if I could just log the failure (together with the filename of the sequence) would be great.
One alternative I see for now is to not use sequence batch but run “single” protocols via a shell script from the command line and do a “throw(message)” in case something goes wrong.

Thanks already for any help or advice on this!

PS: The command line option seems not to work in my case as in the protocol I use the ImageJ plugin MorpholibJ and I receive in this mode the error: Unrecognized command: “Morphological Filters (3D)”. In GUI mode all runs fine.

1 Like

Found a workaround: I continue to use sequence file batch and capture the output on the console in a file which then contains my own throw-messages (containing the file name of the failing image). After the run I grep out these messages and look what went wrong.


Dear Gucki,

Could you upload your protocol (or a simplified version of it) with the workaround? It is the first time I hear about someone trying to catch image processing issues in an Icy protocol. I think it could be useful for others.

Many thanks in advance!
Best regards,

Yes, I’ll put sth together and place it here.

1 Like