Posted by
Joachim Wesner on
Jun 02, 2010; 10:39am
URL: http://imagej.273.s1.nabble.com/Passing-information-to-a-macro-from-a-plugin-tp3688079p3688082.html
Hi Simon,
you could exchange data with the macro via the "preferences" mechanism.
Alternative, I use a technique that attaches "properties" to the window
that the plugin operated on.
You also add at static function to your plugin where it can return the
result of a previous call (as used in my tifftags plugin)
See:
http://rsb.info.nih.gov/ij/macros/CallJavaDemo.txthttp://rsb.info.nih.gov/ij/developer/api/ij/Prefs.htmlhttp://rsbweb.nih.gov/ij/plugins/imp-props.htmlhttp://rsbweb.nih.gov/ij/plugins/tiff-tags.htmlMit freundlichen Grüßen / Best regards
Joachim Wesner
"simon andrews
(BI)"
<simon.andrews@BB An
SRC.AC.UK>
[hidden email]
Gesendet von: Kopie
ImageJ Interest
Group Thema
<
[hidden email]. Passing information to a macro
GOV> from a plugin
02.06.2010 11:39
Bitte antworten
an
ImageJ Interest
Group
<
[hidden email].
GOV>
I've written a plugin which calculates a value from an image. Someone now
wants to use this plugin from within a macro.
I can configure the plugin from the macro by using Macro.getOptions() and
parsing the string they pass in, but what I need now is a way to return a
value (or preferably values) from the plugin and send it back to the
calling macro so it can be used elsewhere in the macro.
I'm sure there must be an easy way to do this, but I've not found it in the
documentation.
Can anyone enlighten me?
Thanks
Simon.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________