Login  Register

Re: Passing information to a macro from a plugin

Posted by simon andrews (BI) on Jun 03, 2010; 3:55pm
URL: http://imagej.273.s1.nabble.com/Passing-information-to-a-macro-from-a-plugin-tp3688079p3688081.html

> On 2 Jun 2010, at 11:39, simon andrews (BI) wrote:
>
>> 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.

On 2 Jun 2010, at 11:23, Michael Schmid wrote:

> You can also write the values (if numeric) to the ResultsTable or (if  
> a String or converted to a String) to the properties (info) of the  
> image - the latter would have the advantage that it is multithreading-
> safe.

Thanks  - using the image properties to store and access the data worked out just fine.

Simon.