imagej2
imagej2 copied to clipboard
Issue (NonBlockingGenericDialog) while running in headless mode
NonBlockingGenericDialog is creating an issue while trying to run ImageJ macro in headless mode. Tried to run it after checking the non-blocking filter dialog (Edit-->Options-->Misc..) but still showing error of " 'ij/gui/NonBlockingGenericDialog' (current frame, stack[0]) is not assignable to 'java/awt/Window' "..
How to resolve this problem?
Thanks for reporting, @SuchandraTomey. It might be that the ImageJ1 class NonBlockingGenericDialog is not patched by the ij1-patcher component to be completely headless-compatible.
Can you provide a minimal macro that reproduces the issue when run in headless mode?
Thank you for your response @imagejan. I am using Median.. in my macro. The macro is running well without headless mode . I want to run the macro in Labview using headless mode but it is showing an error due to NonBlockingGenericDialog. I am attaching the files for your perusal. Thank you in advance.
Regards Suchandra
On Thu, Oct 1, 2020 at 6:32 PM Jan Eglinger [email protected] wrote:
Thanks for reporting, @SuchandraTomey https://github.com/SuchandraTomey. It might be that the ImageJ1 class NonBlockingGenericDialog is not patched by the ij1-patcher https://github.com/imagej/ij1-patcher component to be completely headless-compatible.
Can you provide a minimal macro that reproduces the issue when run in headless mode?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imagej/imagej/issues/259#issuecomment-702013085, or unsubscribe https://github.com/notifications/unsubscribe-auth/APF55IODXHH2KYCZQ2WHJJ3SIREBHANCNFSM4RGIYEMA .
-- -- Regards Suchandra Banerjee
@SuchandraTomey it seems the attachments didn't make it from your email into this GitHub issue. Can you post your macro code here?
Hi Jan @imagejan , It's a very simple macro and here is the code:
open("C:/Users/b-suchandra/Desktop/ImageJ headless NonGeneric_Forum/Flower.jpeg"); run("Misc...", "divide=Infinity run non-blocking"); run("Median...", "radius=10");
I think Median.., Gaussian.. these are creating an issue in headless mode as these include a "preview" option.
Thank you. Suchandra
On Fri, Oct 2, 2020 at 8:18 PM Jan Eglinger [email protected] wrote:
@SuchandraTomey https://github.com/SuchandraTomey it seems the attachments didn't make it from your email into this GitHub issue. Can you post your macro code here?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imagej/imagej/issues/259#issuecomment-702676188, or unsubscribe https://github.com/notifications/unsubscribe-auth/APF55ILT2BSD74JPM6DE3ILSIWZJ5ANCNFSM4RGIYEMA .
-- -- Regards Suchandra Banerjee
Hi,
I was wondering if there has been any conclusion on this? I have the same issue currently with Gaussian Blur (the standard Fiji gaussian blur function), when I try to run it headless on Linux cluster.
Interestingly, an old Fiji installation (Linux, updated last ca 1yr ago) doesn't have this problem...
@walkernoreen without digging further, I'd assume that this is related to backwards-incompatible changes in imagej1 (i.e. ij.jar) that changed something in the NonBlockingGenericDialog and GenericDialog classes. These classes extend Java AWT classes (i.e. Window) and therefore do not work in headless mode unless patched by the ij1-patcher component. This component hasn't been fully updated to address changes later than ij-1.53a yet.
Unfortunately, changes to imagej1 don't get tested in headless mode at all, which is why problems only occur when people actually try them out :-/
See the unfinished https://github.com/imagej/ij1-patcher/pull/48 for my foolish attempts to resolve some of the issues.
Can you try whether it works in your setup when downgrading ij.jar to 1.53a, or even 1.52p or similar?
Dear @imagejan , thank you for the quick reply and for the tips where to look! I had a try with the older jar files: The issue still occurs with 1.53a. But it works smoothly with 1.52p.
Great that you found a working combination of components, @walkernoreen! For completeness, what's the version of ij1-patcher in your setup?
The version is ij1-patcher-1.1.0.jar . That's the latest that comes with a standard Fiji update.