Re: ProgressBar.setBatchMode()

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/ProgressBar-setBatchMode-tp5010181p5010184.html

Hi Pål,

the ProgressBar has a method
  show(double progress, boolean showInBatchMode)

If a plugin (called by your plugin) calls it with
  ij.getProgressBar().show(theProgress, true);
this will activate the ProgressBar irrespective of its setBatchMode(true).

The ProgressBar will also become active if your plugin calls a BathMode macro that uses its own progress bar.

Maybe you can find out which operation is responsible for activating the progress bar in your case?

Michael
________________________________________________________________
On Oct 24, 2014, at 13:43, Pål Baggethun wrote:

> In order to disable the progressbar during binary close in a Plugin (not PluginFilter) I tried the following:
>
> ImageJ ij = IJ.getInstance();
> if (ij!=null) ij.getProgressBar().setBatchMode(true);
> IJ.run(maskimp, "Options...", "iterations=3 count=1 black pad edm=Overwrite do=Close");
>
> ..but to no effect. What am I doing wrong? Are there other approaches? Batch mode macro is not an option.
>
> Cheers,
> P. Baggethun

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