Re: Bypassing plugin dialog within macro

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Bypassing-plugin-dialog-within-macro-tp3682190p3682269.html

Hi Sidney,

it seems that this plugin does not use the GenericDialog class for  
the user interface, so it does not work with macros. I have not found  
any sources on the web page to change that - maybe you could contact  
the author? It seems that he is still at the EPFL.
   http://bigwww.epfl.ch/sage/

Option 2 -You could have a look at the IJ_Robot to automate it.

Option 3 - As the action done by the plugin is rather simple, it  
would be probably easiest to rewrite it. This is also possible as a  
macro:

The first action is a highpass filter, already available at
   http://imagejdocu.tudor.lu/doku.php?
id=plugin:filter:highpass_filter:start

Then duplicate the highpass-filtered image, square it, run a Gaussian  
Blur with sigma2, take the square root, and use ImageCalculator to  
divide the highpass-filtered image by the outcome of this operation.

Michael
________________________________________________________________

On 3 Mar 2011, at 19:11, Sidney Rempel wrote:

> I'm working on a macro that includes a plugin but I would like to  
> bypass the user value input dialog and just have it use  
> predetermined values.
>
> The plugin is Local Transformation found here:
> http://bigwww.epfl.ch/sage/soft/localnormalization/
>
> It dates back to 2002 but works fine on the latest ImageJ version.
>
> Included with this plugin are:
> LocalNormalization_$Convolver
> LocalNormalization_
>
> and then another subdirectory named imageaccess which contains the  
> files:
> ImageAccessTools
> ImageAccess
>
> Within the macro, running this plugin comes up in the Macro  
> recorder as:
> run("LocalNormalization ");
>
> When the macro is run, a dialog comes up requesting two sigma  
> values as indicated by slider bars.
>
> Is there any way I can pass set values to this request and have the  
> dialog close and continue on?
>
> Sorry if this seems elementary but I am not a programmer. The macro  
> runs fine otherwise
>
> Thanks in advance for any advice.