Login  Register

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

Posted by Rasband, Wayne (NIH/NIMH) [E] on Jul 02, 2014; 12:29am
URL: http://imagej.273.s1.nabble.com/Recommendations-for-Creating-a-Writer-Plugin-in-ImageJ1-and-2-tp5008522p5008525.html

On Jul 1, 2014, at 4:04 PM, alanb wrote:

> I am looking for some recommendations. I have been asked to create a file
> writer plugin for ImageJ that can write a proprietary raw data image file
> format. (This is not because we think this format is good--it is not--but it
> is for customer that wants to manipulate intermediate data and then run it
> through the rest of our software system.)
>
> 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). I already
> have a crufty ImageJ1 reader for this format that I don't plan on touching
> much at this time unless there are enhancements that come for little
> cost/time.
>
> As far as I can tell, the recommended method of creating an ImageJ1 writer
> is to make a PluginFilter that writes the file and then put it in a jar with
> a plugins.config file with contents such as:
>   File>Save As, "Format Name...", Format_Writer

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.

-wayne

> From what I read on forums ([1],[2]) and on
> https://github.com/scifio/scifio/wiki/Adding-support-for-an-image-format,
> the recommended method of creating an ImageJ2 file reader or writer plugin
> is to make a SCIFIO plugin that implements AbstractFormat and put the
> resulting jar somewhere where it is automatically found by ImageJ2 (I'm not
> sure where that is -- perhaps just the ).
>
> [1]:
> http://imagej.1557.x6.nabble.com/Handle-Extra-Files-Types-not-working-td5008224.html#a5008244
> [2]:
> http://imagej.1557.x6.nabble.com/Fiji-the-nrrd-file-format-and-HandleExtraFileTypes-td5002602.html#a5002724
>
> Specific Questions:
> 1. Is it unreasonable to share writer/reader code between ImageJ1 and
> ImageJ2?
> 2. Where do I put writer/reader jars for ImageJ2? Just in the normal /jars
> folder?
>
> Thanks,
> Alan
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Recommendations-for-Creating-a-Writer-Plugin-in-ImageJ1-and-2-tp5008522.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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