I have a macro that opens a raw image, debayers it using the debayer image plugin, and saves it as a tiff. This process loops through each raw image in the directory indicated by the user. This macro works fine for the first 15 images or so, but after that I start to notice a substantial slow down on the debayer process. Around the 19th image, it takes ~10 minutes, where it usually took <1 minute for the first couple of images.
Another strange issue is sometimes I get a “RGB Stack window not found”. This issue arises from the selectWindow(“RGB Stack”) command. It seems as if the debayer image plugin does not output anything sometimes, so Fiji cannot find that window.
My questions are:
Why is there a massive slow down in the debayer image plugin if I’m passing an image to processes one-by-one?
Why does the debayer image plugin sometimes not output anything?
I suspect that the performance issue is due to the debayer image plugin chewing up memory. To counter this, I have placed these commands after the tiff is saved for each image:
However, this has done nothing to improve performance of the debayer plugin. I’ve even set the batch mode to true to no avail. Any image that is not being used anymore is closed immediately using the selectWindow() and close() combo; this should be freeing up resources.
Is this an issue with the debayer image plugin? Anyone run into these issues that might know how to improve the performance and reliability of the debayer image plugin?