Login  Register

Re: Recommendations for Creating a Writer Plugin in ImageJ1 and 2

Posted by dscho on Jul 02, 2014; 11:42pm
URL: http://imagej.273.s1.nabble.com/Recommendations-for-Creating-a-Writer-Plugin-in-ImageJ1-and-2-tp5008522p5008558.html

Hi Alan,

On Wed, 2 Jul 2014, Alan Brooks wrote:

> Thanks for the feedback. I'd be interested in reading that blog post
> about adding new plugin types, Dscho, so here's my vote to encourage you
> to write it.

Thanks for the encouragement, but at the moment I seriously need time more
than anything else...

> Thanks for the details on the plugins/jars folders. If you can't tell,
> I've been an ImageJ1 user for a while, but am just now becoming familiar
> with the Fiji and ImageJ2 community.

Well, to be honest, I do not see three different communities. It is
unfortunate that Fiji is often perceived as something different from
ImageJ; all I intended it to be is a distribution of ImageJ with a couple
of plugins. And ImageJ2 is the logical next step: preparing ImageJ for the
future challenges of scientific image processing.

> > In particular, I would try to avoid conflating the logic to write the
> > image with the specifics of the plugins as much as possible.
>
> My plan is to make a general class that knows how to serialize,
> deserialize, display info about, and test the file format reader/writer.
> This could be used in any Java program and not tied to ImageJ1 or 2.
> Then, I will write the plugins (one for IJ1, one for SCIFIO) as a user
> of that class.

That sounds like a very good plan to me!

> > I would make the writer a PlugIn, which is simpler and easier to
> > understand. For an example, look at the PNM_Writer plugin (
> > http://imagej.nih.gov/ij/source/ij/plugin/PNM_Writer.java), which
> > implements the File>Save As>PGM command.
>
> I agree that PlugInFilter isn't doing anything that useful for a file
> writer. Thanks for the reference.

Actually, the only reason you would want a PlugInFilter is to avoid having
to reimplement the test whether there is a matching current image. And
this is not the only thing you will have to reimplement, just like every
other Writer plugin...

I guess maximal freedom comes at maximum price... ;-)

Ciao,
Dscho

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