Posted by
dscho on
Sep 15, 2014; 10:54am
URL: http://imagej.273.s1.nabble.com/Java-Linking-and-Portability-tp5009568p5009616.html
Hi Benjamin,
On Fri, 12 Sep 2014, Benjamin Eltzner wrote:
> I think there is a missing bit of information here, namely this: My
> program does not only do image processing but also data processing and
> most importantly includes a basic GUI and data management code that is
> geared towards its use case. I think it would not be feasible to convert
> all this into ImageJ plugins (at least not in ImageJ 1). If I am
> mistaken here, I would be glad for any pointers to a tutorial on how to
> build an alternate GUI as a plugin (set).
In ImageJ 1.x, plugins are actually very free-form: all you need to do is
to implement the ij.plugin.PlugIn interface:
public class Benjamins_Plugin implements PlugIn {
@Override
public void run(final String arg) {
...
}
}
You can easily show your own GUI inside that run() method – and that is
exactly what many plugins do.
The advantage you would gain is that your "plugin" would be able to use
the complete infrastructure provided by ImageJ, including distribution
through personal update sites.
> So with my current understanding of the scope of ImageJ and its plugin
> system, I would like to use ImageJ only as a backend for image
> processing (but in the course of this I would transform some of my
> current image processing code into ImageJ plugins) and otherwise treat
> my program as a standalone project. (Even if it is feasible to also do
> the GUI and data analysis tools in terms of ImageJ plugins, I would like
> to go through such an intermediary phase, as the program already has
> more than 10.000 lines of code and a transition will take time which I
> currently do not have abundantly.)
Of course you are free to keep your application as a standalone program,
tapping into ImageJ 1.x via IJ.run() calls. You'll have to reinvent a
couple of things you'd otherwise get for free, is all.
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html