Re: Argument not passed to PluginFilter

Posted by Salim Kanoun on
URL: http://imagej.273.s1.nabble.com/Argument-not-passed-to-PluginFilter-tp5019166p5019168.html

You have to get the argument with this command

Macro.getOptions()

As explained here :
http://imagejdocu.tudor.lu/doku.php?id=howto:plugins:retrieving_the_optional_args_when_a_plugin_is_called_from_a_macro


2017-08-04 15:23 GMT+02:00 Iain Marcuson <[hidden email]
>:

> I am attempting to call a PluginFilter from a Plugin.
>
> I call the PluginFilter with
> outfile = tf_back_sub_filename.getText();
> IJ.showMessage(outfile);
> IJ.run("Gradient Subtract Auto", outfile);
>
> The showMessage() verifies that outfile is correct and not empty or null.
>
> The setup function of the PluginFilter is:
>
> public int setup(String arg, ImagePlus imp) {
>         this.imp = imp;
>         back_filename = arg;
>         IJ.showMessage("back_filename is \"" + back_filename + "\"\narg is
> \""+arg+"\"");
>         return DOES_32;
> }
>
> However, the showMessage indicates that arg and back_filename are both
> empty.
>
> Is there something I am missing?
>
> Thank you,
>
> Iain.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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