Posted by
dscho on
Jul 27, 2010; 10:10am
URL: http://imagej.273.s1.nabble.com/Doubts-about-using-the-Imagej-library-tp3687480p3687481.html
Hi,
On Mon, 26 Jul 2010, Vishnu_Bhai wrote:
> I have been wanting to use the Imagej library to write an independent
> application that demarcates cancerous regions in a tissue. But the thing
> is that I was not able to setup the environment properly to use Imagej
> as a library. So instead I decided to write the whole thing as a plugin
> so that I could use the in-built Imagej environment for compiling the
> program. Now my concern is, if I set up the environment correctly, will
> I be able to turn the plugin into an independent java program that uses
> the Imagej library and does not require the Imagej software. Is that
> possible?
It depends how you wrote your plugin. We have some guidelines in Fiji how
to write plugins so that they can be reused by other plugins (i.e. in a
library-like manner):
http://pacific.mpi-cbg.de/wiki/index.php/PlugIn_Design_GuidelinesBasically, you must never show() images or result tables, except in the
run() method.
There is a further complication if you used constructions imitating
interactive usage of ImageJ, such as calling something like
IJ.run("Duplicate", "title=another-one"); -- in this case, using the
current image (there is no current image in a library) and relying on the
WindowManager to get the resulting image (there must not be any window
manager in a library).
Hth,
Johannes