WIP: switch from IJ1 plugins to IJ2 plugins #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just wanted to open this PR before getting too far along to make sure that this is a change that might be accepted.
The 3 remaining plugins that use the IJ1 style of implementing
ij.plugin.Plugin
have been replaced with the IJ2 style of using the scijavaPlugin
annotation andCommand
interface.The plugin can now be used from the imagej API just like any other IJ2 plugin.
ImageJ.plugin().getPlugin("bdv.ij.BigWarpImagePlusPlugIn")
can retrieve a reference to the class andA macro like is fine:
run("Big Warp")
The main downside is that this no longer seems to work for reasons I don't fully understand:
run("Big Warp", "moving_image=my-moving-img-title.tif target_image=my-target-image-title.tif");
I believe it is a problem with the
GenericDialogPlus
and will result an an error like this:In order to enable passing arguments to the plugin I think the plugins will have to use the
@Parameter
annotation as described here