[ImageJ-devel] Calling IJ legacy methods

Johannes Schindelin Johannes.Schindelin at gmx.de
Tue Feb 7 14:47:48 CST 2012


Hi Mike,

[Cc:ing the fiji-devel list since I think that others might want to get a
glimpse about discussions regarding migrating code from IJ1 to IJ2]

On Tue, 3 Jan 2012, Michael Doube wrote:

> I'm starting the long process of getting BoneJ into shape to run under
> IJ2, as we discussed at the Hackathon in Dresden last year.
> 
> There are of course a ton of dependencies on classes in ij.jar, so in
> general, how can us plugin developers deal with this during migration?
> 
> In particular, right now I'm looking for a BrowserLauncher, a la
> ij.plugin.BrowserLauncher (which is already borrowed code). But there
> will be many more situations like this I'm sure.

I finally worked on this issue:

http://fiji.sc/cgi-bin/gitweb.cgi?p=imagej2/.git;a=shortlog;h=refs/heads/browser-launcher

Curtis, when you're better, could you have a look? I _think_ it should be
fine to be dcommitted.

Mike, the way you would open URLs is by getting an instance of the
PlatformService (for ImageJ2 plugins, just add a parameter of type
PlatformService and you'll get it by the time run() is called) and then
calling the open(URL) method on it.

See e.g.
http://fiji.sc/cgi-bin/gitweb.cgi?p=imagej2/.git;a=blob;f=core/plugins/app/src/main/java/imagej/core/plugins/app/ImageJWebsite.java;h=1c571ca11f9bbaba2af47203df51f749482cf45c;hb=d1f8b6119b3374126ba467a973b8fff709f9ab39

Ciao,
Dscho

P.S.: Grant, while I did not add an ij-platform-linux, at least I did add
an ij-platform-windows. Happy? ;-)




More information about the ImageJ-devel mailing list