Re: macro to plugin
Posted by
Wayne Rasband on
Aug 24, 2005; 2:41pm
URL: http://imagej.273.s1.nabble.com/macro-to-plugin-tp3704981p3704982.html
> I was wondering if there is any way to send information
> collected from the user in a macro to a plugin which can
> then use the data.
>
> My macro collects data to find an image. I then run a plugin
> to analyse the image but will need to user to input the same
> data again. So ideally I could get the plugin to retrieve
> the data so the user only needs to input it once.
Add a GenericDialog to the plugin that inputs the needed data, then run
the plugin with the command recorder to generate the code needed to
call the plugin from a macro. The macro at
http://rsb.info.nih.gov/ij/macros/ArgumentPassingDemo.txtdemonstrates how to use string concatenation to pass arguments to
plugins that use a GenericDialog.
-wayne