Posted by
dscho on
URL: http://imagej.273.s1.nabble.com/Handle-Extra-Files-Types-not-working-tp5008224p5008225.html
Hi,
On Sat, 14 Jun 2014, Davíð Þór Bragason wrote:
> my plugin opens a special file format. I had a working setup where the
> files were opened via HandleExtraFileTypes.class, which I copied to the
> plugins directory. After an update a few days ago this no longer works.
> Opener gives the following error:
>
> "File is not in a supported format, a reader plugin is not available, or
> it was not found"
>
> I am running Fiji ImageJ 2.0.0-rc4/1.49b with Java 1.7. Do I have to set
> up HandleExtraFileTypes in a different way now? I understand that one of
> the last updates was meant to re-enable .class plugins. Thank you very
> much for your help.
Since rc-5, the "Find Jar For Class" command (in Plugins/Utilities) should
work again; use it to verify that your HandleExtraFileTypes class can be
found.
In the near future, you might want to turn your reader into a SCIFIO
reader. That way, *many* more users can benefit from your work. It is
pretty easy, just follow the code for the PGM format; I find it pretty
self-explanatory myself:
https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/formats/PGMFormat.javaRemember, SCIFIO is a stand-alone project for scientific image
input/output, it can be used from *every* Java (*1*) project, without
making said project depend on ImageJ. And you can add support for your
file format by dropping in a .jar file with your reader, no changes in
SCIFIO, HandleExtraFileTypes, or any other central place required.
Ciao,
Johannes
Footnote *1*: SCIFIO can actually also be used from C++, as the ITK
bindings demonstrate:
https://github.com/scifio/scifio-itk-bridge--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html