Login  Register

Re: HandleExtraFileTypes does not preserve subtitle "Label" property

Posted by ctrueden on Mar 13, 2015; 9:45pm
URL: http://imagej.273.s1.nabble.com/HandleExtraFileTypes-does-not-preserve-subtitle-Label-property-tp5011960p5011961.html

Hi Alan,

> I am not sure how to locate the canonical HandleExtraFileTypes.java.

One option for your bug-fix in the immediate term is to a file a PR against
the HandleExtraFileTypes in fiji/IO [1]. This is the version that is
distributed with Fiji.

> I figure it would be get to get this fix to other users if possible.

The more future-proof, but also more bleeding-edge, option is to create a
SCIFIO format reader [2].

Regards,
Curtis

[1]
https://github.com/fiji/IO/blob/master/src/main/java/HandleExtraFileTypes.java
[2] https://github.com/scifio/scifio/wiki/Adding-support-for-an-image-format

On Fri, Mar 13, 2015 at 3:34 PM, Alan Brooks <[hidden email]> wrote:

> While implementing a custom reader that extends ImagePlus, I was trying to
> set the "Label" property (via imp.setProperty("Label")) so that the
> subtitle
> shows up nicely in ImageJ.
>
> When I call my custom file format reader plugin directly from
> File>Import>My
> Custom File..., the Label property is shown in the ImageWindow's subtitle.
>
> However, when I integrate my reader into HandleExtraFileTypes.java, the
> Label property is not shown in the ImageWindow's subtitle for images opened
> by File>Open... or by drag and drop.
>
> I was able to fix this by inserting the following code to preserves "Label"
> property in the HandleExtraFileTypes.run() method, as follows:
>
>
>
> I am not sure how to locate the canonical HandleExtraFileTypes.java. There
> seems to be one hosted on the  ImageJ1 plugin server
> <http://rsb.info.nih.gov/ij/plugins/file-handler.html>   ( source
> <http://rsb.info.nih.gov/ij/plugins/download/HandleExtraFileTypes.java>
> ).
> I do not see one on the  ImageJ1 git mirror
> <
> https://github.com/imagej/imagej1/search?utf8=%E2%9C%93&q=HandleExtraFileTypes
> >
> . Perhaps the  version in the ij1-installer project
> <
> https://github.com/imagej/ij1-installer/blob/3a1cd0cc3c6754cdce5776313a05374e552977e0/app/plugins/Input-Output/HandleExtraFileTypes.java
> >
> is canonical?
>
> Anyway, I am not sure where or how to submit a patch, so I am just posting
> to this mailing list. Let me know if there is a better place.
>
> For use at my company, customizing HandleExtraFileTypes is ok. But I figure
> it would be get to get this fix to other users if possible.
>
> Note I only tested this with ImageJ1, version 1.49p.
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/HandleExtraFileTypes-does-not-preserve-subtitle-Label-property-tp5011960.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