Login  Register

Recommendations for Creating a Writer Plugin in ImageJ1 and 2

Posted by Alan Brooks on Jul 01, 2014; 8:04pm
URL: http://imagej.273.s1.nabble.com/Recommendations-for-Creating-a-Writer-Plugin-in-ImageJ1-and-2-tp5008522.html

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

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