ImageJ, hot to build a complex plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ImageJ, hot to build a complex plugin

Mauro Maiorca
Hi all,

I just started going more in details with ImageJ. In the past I have
been able to develop trivial plugins, now I'm trying to move forward.

For example I'm trying to build from scratches FlowJ
(http://webscreen.ophth.uiowa.edu/bij/flowj.htm), but I'm not quite
succeeding. I'm also trying to build from scratches another plugin,
featureJ (http://www.imagescience.org/meijering/software/featurej/),
not really successfully either. I didn't find any specific build
instructions in those links, not sure on how to proceed. Do you have
any idea of what can be the most easy/successful way to deal with it?

I've installed both netbeans and eclipse, though whether it is
possible I would prefer more using just ImageJ (i.e. "Compile and
Run...", "plugins->New->Plugin", etc etc). It goes without saying that
I'm rusty in Java too, though I have a strong c++ background.

Any suggestion/idea, would be strongly appreciated!!

thanks,
Mauro

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

dscho
Hi Mauro,

On Tue, 12 Jun 2012, Mauro Maiorca wrote:

> I just started going more in details with ImageJ. In the past I have
> been able to develop trivial plugins, now I'm trying to move forward.
>
> For example I'm trying to build from scratches FlowJ
> (http://webscreen.ophth.uiowa.edu/bij/flowj.htm), but I'm not quite
> succeeding. I'm also trying to build from scratches another plugin,
> featureJ (http://www.imagescience.org/meijering/software/featurej/),
> not really successfully either.

One of the missions of the Fiji distribution of ImageJ is to make things
easier to use. One other mission is to make things easier to build.

Using the version control program Git, you can do the following in the
command-line:

        git clone git://fiji.sc/fiji.git
        cd fiji
        ./Build.sh

and it builds all of Fiji, including FlowJ and FeatureJ.

Note that we will move to a better documented build system in the near
future, but it will stay as easy to build the complete Fiji distribution
from source.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

Mauro Maiorca
Hi Johannes,

thankyou very much for pointing out Fiji. I'm using it regularly,
though I've got some issues with it lately: long story short, with the
last updates (since approx a week ago) I've got problems opening mrc
files, it completely mess up my linux, I cannot do anything else but
rebooting. For example, it does it with this image:
mauromaiorca.altervista.org/lenaFlow.tar.gz . I don't have any problem
of opening that mrc file with imageJ+U759_InputOutput.jar and Fiji
without updating the new plugins. I will figure out how to make an
official bug report.

thanks for the effort of making the Fiji building so easy to do! Good work!

Anyway, back to my problem, though it is very instructive building all
Fiji from scratches (including FlowJ and featureJ) I was actually
trying to understand how can I build just those packages without
necessarily build the whole Fiji all the time. I want to do it for two
main reasons:
1) FlowJ is not working properly, when I launch it the GUI window is
too narrow to be used, and there is no way I can enlarge it (see a
screenshot from my PC:
http://mauromaiorca.altervista.org/flowj_issue.jpg). I would like to
have a play with the code to see whether I can fix it.
2) I need to implement a plugin of a similar size of FlowJ, so I was
trying to understand how to do it in ImageJ/Fiji, building from
scratches Fiji all the times is not very practical for that purpose.

if you have any other idea, it would be very appreciated!!!

ciao!
Mauro


On Tue, Jun 12, 2012 at 7:48 PM, Johannes Schindelin
<[hidden email]> wrote:

> Hi Mauro,
>
> On Tue, 12 Jun 2012, Mauro Maiorca wrote:
>
>> I just started going more in details with ImageJ. In the past I have
>> been able to develop trivial plugins, now I'm trying to move forward.
>>
>> For example I'm trying to build from scratches FlowJ
>> (http://webscreen.ophth.uiowa.edu/bij/flowj.htm), but I'm not quite
>> succeeding. I'm also trying to build from scratches another plugin,
>> featureJ (http://www.imagescience.org/meijering/software/featurej/),
>> not really successfully either.
>
> One of the missions of the Fiji distribution of ImageJ is to make things
> easier to use. One other mission is to make things easier to build.
>
> Using the version control program Git, you can do the following in the
> command-line:
>
>        git clone git://fiji.sc/fiji.git
>        cd fiji
>        ./Build.sh
>
> and it builds all of Fiji, including FlowJ and FeatureJ.
>
> Note that we will move to a better documented build system in the near
> future, but it will stay as easy to build the complete Fiji distribution
> from source.
>
> Ciao,
> Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

dscho
Hi Mauro,

On Wed, 13 Jun 2012, Mauro Maiorca wrote:

> Anyway, back to my problem, though it is very instructive building all
> Fiji from scratches (including FlowJ and featureJ)

You can call "./Build.sh plugins/FlowJ_.jar" to build just FlowJ (and its
dependencies).

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

Mauro Maiorca
Hi Johannes,

On Wed, Jun 13, 2012 at 1:08 AM, Johannes Schindelin
<[hidden email]> wrote:
> You can call "./Build.sh plugins/FlowJ_.jar" to build just FlowJ (and its
> dependencies).

brilliant, it works great, thank you so much!!!!! It was very helpful!!

Now, let assume I want to create a new plugin called FlowJBis_, almost
identical to FlowJ_. Something like that:

    cp -r src-plugins/FlowJ_/ src-plugins/FlowJBis_
    cp src-plugins/FlowJBis_/FlowJ_.java src-plugins/FlowJBis_/
    echo Analyze\>Optic Flow, \"FlowJBis\", FlowJBis_ >
src-plugins/FlowJBis_/plugins.config

The question I'm struggling with is: how to build FlowJBis_?

Cheers,
Mauro

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

dscho
Hi Mauro,

On Wed, 13 Jun 2012, Mauro Maiorca wrote:

> Now, let assume I want to create a new plugin called FlowJBis_, almost
> identical to FlowJ_. Something like that:
>
>     cp -r src-plugins/FlowJ_/ src-plugins/FlowJBis_
>     cp src-plugins/FlowJBis_/FlowJ_.java src-plugins/FlowJBis_/
>     echo Analyze\>Optic Flow, \"FlowJBis\", FlowJBis_ >
> src-plugins/FlowJBis_/plugins.config
>
> The question I'm struggling with is: how to build FlowJBis_?

How about building the Script Editor:

        ./Build.sh plugins/Script_Editor.jar

and then run it:

        ./fiji --edit

and then use the Tools>Create new Plugin... menu item of the Script
Editor?

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

Mauro Maiorca
Hi Johannes,

> How about building the Script Editor:
>
>        ./Build.sh plugins/Script_Editor.jar
>
> and then run it:
>
>        ./fiji --edit
>
> and then use the Tools>Create new Plugin... menu item of the Script
> Editor?

yep, I have done that in the past and I've successfully implemented
basics image processing plugins. I'm confident with Java's syntax and
semantics, the problem arises dealing with a relatively big project.
That's actually one of the ultimate reasons I'm taking FlowJ and
featureJ as examples: I want to be able to build my own packages and
use my own packages on my own plugins, but I'm not sure what is the
best way of doing it, or where to start with. I'm in the process of
deciding whether it's too much hassle porting some of my code (and
developing some more) in ImageJ/Fiji or keep working with my beloved
c++ and matlab and using ImageJ/Fiji as a side tool. Does it make
sense? Have you guys any useful tutorial or any specific hint for
that?

cheers,
Mauro

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

dscho
Hi Mauro,

On Wed, 13 Jun 2012, Mauro Maiorca wrote:

> > How about building the Script Editor:
> >
> >        ./Build.sh plugins/Script_Editor.jar
> >
> > and then run it:
> >
> >        ./fiji --edit
> >
> > and then use the Tools>Create new Plugin... menu item of the Script
> > Editor?
>
> yep, I have done that in the past and I've successfully implemented
> basics image processing plugins.
Note that all you need to is to put more classes in the directory
structure initialized by Tools>Create new Plugin. That's the way you build
more complex stuff.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ, hot to build a complex plugin

Mauro Maiorca
On Wed, Jun 13, 2012 at 7:08 PM, Johannes Schindelin
<[hidden email]> wrote:

> Note that all you need to is to put more classes in the directory
> structure initialized by Tools>Create new Plugin. That's the way you build
> more complex stuff.

Brilliant, just brilliant!!!
Thankyou so much for the invaluable inputs!!!

> Ciao,
> Johannes

Ciao,
Mauro

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html