Login  Register

Re: How to read and write files using a java plugin

Posted by Avital Steinberg on Aug 29, 2014; 8:09pm
URL: http://imagej.273.s1.nabble.com/How-to-read-and-write-files-using-a-java-plugin-tp5009393p5009421.html

Thanks - I would like to give the user the option to use results that were
saved in a file a while ago, so what I did is similar to what you
recommended - I created a class that handles it. As a computational
chemist, I was looking for a shortcut similar to these shortcuts:
http://rsb.info.nih.gov/ij/developer/macro/functions.html

Some of these shortcuts can also be used in Java plugins, but I haven't
found an analog for imageJ macro commands such as: File.openDialog(title).
If there is a global way to convert imageJ macro commands to Java commands
(I am using the ImageJ library), it would be very nice.

Best wishes,

Avital


On Fri, Aug 29, 2014 at 12:42 PM, C Heeney <[hidden email]> wrote:

> Avital
>
> If the results from Function A will be used in Function B, why not just
> pass the results directly from Function A to Function B.?
>
> If it's the case that your data is complicated (e.g. it contains more than
> one data type), then create a class which handles these data types and pass
> it between functions.
>
> Have a look at this tutorial on classes.
> http://docs.oracle.com/javase/tutorial/java/javaOO/classes.html
>
> Best wishes
> C Heeney
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html