Posted by
ctrueden on
Jul 03, 2014; 1:44am
URL: http://imagej.273.s1.nabble.com/Recommendations-for-Creating-a-Writer-Plugin-in-ImageJ1-and-2-tp5008522p5008561.html
Hi Alan,
> Our company's service personnel use ImageJ in many locations without
> internet access and currently have ImageJ1 (varied versions) deployed
> on our machines. No one yet uses ImageJ2 (or Fiji) but I want to
> consider my options.
>
> Ideally, I'd like to write something that works well as an ImageJ1
> writer plugin but also could be used as an ImageJ2 writer (and
> reader).
...
> 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.
From your description, it sounds like you are not sure whether your company
will use ImageJ2 in the near future. If you must stay with vanilla ImageJ1,
and you only need to support your file format internally, then I would
suggest creating only a pure ImageJ1 plugin, integrate it with
HandleExtraFileTypes and skip the SCIFIO format plugin. This solution also
works in ImageJ2, with or without the SCIFIO option enabled: ultimately, if
nothing else can read the file format then the opener logic falls back to
IJ1 which falls back on HandleExtraFileTypes.
However, if you are able to use ImageJ2, and/or if you plan to release the
file format plugin to an audience beyond your company's internal service
personnel, then my advice would be to focus on creating a SCIFIO Format
plugin and forget the ImageJ1 plugin. The SCIFIO library is not an
ImageJ-specific project -- it was created precisely to eliminate the need
to implement multiple file format readers or adapters for different
systems. All SCIFIO formats already integrate with several software
packages "for free" including ImageJ (File > Open as well as File > Import
> Image...), KNIME, CellProfiler and others.
Either way, there should be no need to create both an ImageJ1 plugin and a
SCIFIO format.
Regards,
Curtis
On Wed, Jul 2, 2014 at 6:42 PM, Johannes Schindelin <
[hidden email]> wrote:
> 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>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html