Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imglib plugins no longer available via ImageJ Server #21

Open
PetrBainar opened this issue May 9, 2018 · 5 comments
Open

Imglib plugins no longer available via ImageJ Server #21

PetrBainar opened this issue May 9, 2018 · 5 comments

Comments

@PetrBainar
Copy link
Contributor

Hi all,

A couple of days ago, the ImageJ Server has been improved by @ctrueden and become an ImageJ extension with great plugins allowing the user to start or to stop the server, for example.

However, some modules are no longer available via ImageJ Server. For example, I used to rotate images via the net.imagej.plugins.commands.imglib.RotateImageXY plugin, but it looks like that no imglib plugins are found by the respective service anymore.

Is this a bug or rather a logical consequence of other things? Can anyone see this plugin listed in his/her environment?

Many thanks for your help.

Best regards,
Petr

@ctrueden
Copy link
Member

ctrueden commented May 9, 2018

Firstly, note that the class net.imagej.plugins.commands.imglib.RotateImageXY is part of imagej-plugins-commands. (I discerned this by searching on maven.imagej.net.) This component is part of the standard ImageJ distribution, shipped via the Java-8 update site. It is highly likely to be present in your installation.

I believe the issue here is the no-legacy tag, which tells ImageJ not to expose this module when running in legacy mode. The idea was to suppress these ImageJ2-only commands when ImageJ1 equivalents were also available. Unfortunately, the current scheme suppresses these modules completely (see here), such that they are not available via the server, either.

Off the top of my head I do not have an easy workaround. We could change this blacklisting logic to keep them out of the menus, but still keep them in the module index. But IIRC, the reason they were removed from the index is because it confused users who searched e.g. for "Duplicate" in the search bar, and got both ij.plugin.Duplicator and net.imagej.plugins.commands.DuplicateImage as matches. The former is the IJ1 plugin, and the latter is the IJ2 replacement. The IJ2 version is what should be available via the ImageJ Server. So maybe what is needed is an ImageJ-Server-specific hack to reintroduce these modules only from the server? But my instincts are telling me such a solution would be wrong.

@PetrBainar
Copy link
Contributor Author

PetrBainar commented May 10, 2018

Thank you very much @ctrueden for your detailed answer.

I have tried to switch ImageJ into the modern mode as well as to launch it with the --ij2 argument but neither seemed to have any effect on modules availability via the ImageJ Server.

Do you think that introducing a console argument responsible for not blacklisting no-legacy modules would be a viable option? For example, starting ImageJ with --allModules argument would cause ModuleService to add all modules back again? Such implementation of ConsoleArgument could be part of the ImageJ Server package, leaving the rest of the environment relatively untouched.

@ctrueden
Copy link
Member

ctrueden commented May 10, 2018

Good idea, @PetrBainar. With imagej/imagej-legacy@23998c2 there is now a system property you can set to suppress the blacklisting behavior. Invoke from the CLI via something like this:

Fiji.app/Contents/MacOS/ImageJ-macosx -Dimagej.legacy.modernOnlyCommands=true -- --server

It would still be nice to find a nicer way to make these commands available from the server without exposing them in the legacy UI, though. I'll leave this issue open for now as a reminder to solve this problem in a better way.

@PetrBainar
Copy link
Contributor Author

Thank you very much @ctrueden for implementing the workaround, it works like a charm!

@PetrBainar
Copy link
Contributor Author

PetrBainar commented May 29, 2018

Just bumping this thread to let everyone know that this functionality is available in image-legacy-0.30.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants