Hi Julin,
what about calling it this way:
IJ.run("Subtract Background...", "rolling="+radius+" light");
It requires that you have not only an ImageProcessor but also
an ImagePlus and that it is the current foreground image.
Otherwise, you would have to invert the image before subtracting
the background.
BTW, subtractBackround() does not care about whether the
background is dark or bright, it assumes that the background is
low (in numbers; uncalibrated), irespective of whether the
image has an inverting LUT or not.
Michael
________________________________________________________________
On 21 Aug 2007, at 01:43, Julin Maloof wrote:
> Hello,
>
> I would like to call subtractBackround in a plug-in that I am
> writing. However, when I do so, subtractBackround() has the
> background color set to dark. How can I change this from within my
> plugin? I have tried Prefs.set("bs.background",true); with no
> success.
>
> Thanks,
>
> Julin