Login  Register

Re: Start FIJI from Java

Posted by dscho on Sep 07, 2010; 2:07pm
URL: http://imagej.273.s1.nabble.com/Calculating-porosity-in-a-TIF-image-tp3687015p3687020.html

Hi,

On Tue, 7 Sep 2010, Forodin wrote:

> I'm currently working on a plugin for Fiji and I use Eclipse for it. I
> dont use the FIJI source code or anything like that, I just copy / past
> my code into the Plugins-New-Plugins - Window and run it from there. Not
> that convenient.
>
> What I would prefer is to run the code in Eclipse, have Fiji started and
> the plugin executed automatically (and it would be even better if
> everyone could do that from eclipse when using my code).
>
> I can do that with ImageJ by adding a main-method to the plugin:
>
> public static void main(String[] args) {
> new ImageJ();
> Optimized_Segmentation os = new Optimized_Segmentation();
> os.run("");
> }

Try replacing ImageJ() with fiji.Main().

For those interested: fiji.Main() calls ImageJ(), but adds a little
infrastructure on top.

> (Optimized_Segmentation is my Plugin)

Would be nice to see/have your plugin...

Ciao,
Johannes