Open with Drag and drop own image format

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Open with Drag and drop own image format

Peter Mc
Hello everyone;

My lab use its own image format and most of the people use imageJ to study the images, opening them with Import -> Raw..

I have already implemented a plugin to open the images avoiding to introduce parameters each time(using Raw) . I would like to avoid to call the plugin each time that I want to open a lab image so How can I call the plugin dragging the image to ImageJ panel as any other format??  

Best.

Pedro.
Research engineer
HGGM. Madrid.
Reply | Threaded
Open this post in threaded view
|

Re: Open with Drag and drop own image format

Rasband, Wayne (NIH/NIMH) [E]
> On Nov 5, 2015, at 1:27 PM, Peter Mc <[hidden email]> wrote:
>
> Hello everyone;
>
> My lab use its own image format and most of the people use imageJ to study
> the images, opening them with Import -> Raw..
>
> I have already implemented a plugin to open the images avoiding to introduce
> parameters each time(using Raw) . I would like to avoid to call the plugin
> each time that I want to open a lab image so How can I call the plugin
> dragging the image to ImageJ panel as any other format??

You need to add support for your plugin to the HandleExtraFileTypes plugin. Drag and drop the file ImageJ/plugins/Input-Output/HandleExtraFileTypes.java onto the “ImageJ” window, go to the location marked "MODIFY HERE” and add code similar to

   if (name.endsWith(“.xyz")) {
      return tryPlugIn(“XYZ_Reader", path);
   }

where “.xyz” is the extension used by your files and XYZ_Reader.class is your plugin. Then use the Plugins>Compile and Run command to compile the HandleExtraFileTypes plugin.

-wayne


> --
> View this message in context: http://imagej.1557.x6.nabble.com/Open-with-Drag-and-drop-own-image-format-tp5014866.html
> Sent from the ImageJ mailing list archive at Nabble.com.



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Open with Drag and drop own image format

Peter Mc
Great!!

Thank you Wayne.
Research engineer
HGGM. Madrid.
Reply | Threaded
Open this post in threaded view
|

Re: Open with Drag and drop own image format

Peter Mc
Hello again;

I did it for plain imageJ but what about fiji where the HandleExtraFileTypes plugin is a compiled version?

Best.
Pedro.
Research engineer
HGGM. Madrid.
Reply | Threaded
Open this post in threaded view
|

Re: Open with Drag and drop own image format

ctrueden
Hi Pedro,

> I did it for plain imageJ but what about fiji where the
> HandleExtraFileTypes plugin is a compiled version?

The ImageJ2 team does not recommend using HandleExtraFileTypes, because it
only provides a limited extensibility mechanism.

Please see the article on adding new file formats:
  http://imagej.net/Adding_new_file_formats

That said, if you want to update Fiji's official HandleExtraFileTypes with
your addition, you can do so by filing a Pull Request against the fiji/IO
repository [1], and we will happily merge it.

Regards,
Curtis

[1] https://github.com/fiji/IO


On Wed, Nov 11, 2015 at 3:53 AM, Peter Mc <[hidden email]>
wrote:

> Hello again;
>
> I did it for plain imageJ but what about fiji where the
> HandleExtraFileTypes
> plugin is a compiled version?
>
> Best.
> Pedro.
>
>
>
> -----
> Research engineer
> HGGM. Madrid.
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Open-with-Drag-and-drop-own-image-format-tp5014866p5014919.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