Login  Register

Re: Open with Drag and drop own image format

Posted by Rasband, Wayne (NIH/NIMH) [E] on Nov 05, 2015; 10:29pm
URL: http://imagej.273.s1.nabble.com/Open-with-Drag-and-drop-own-image-format-tp5014866p5014869.html

> 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