Login  Register

Re: Bug in Background Subtracter

Posted by Herbie on Jul 17, 2016; 12:41pm
URL: http://imagej.273.s1.nabble.com/Bug-in-Background-Subtracter-tp5016896p5016898.html

Dear Koen van Dijken,

I can't confirm your finding ("two of the three resulting channels will
show black"), when using ("load it into ImageJ and proceed with step 5")
the nice 326x491 32bit image (what does it show?). You didn't mention
your setting of "Subtract background". I use all options unchecked or
"Light background" checked and the default radius 50.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 17.07.16 um 10:53 schrieb Koen van dijken:

> While finalising a new plugin I discovered a bug in Background Subtracter.
> In my own plugin I encounter a similar problem and do not know how to fix
> it. To reproduce the bug in Background Subtracter take the following steps:
>
> Bug in Background subtracter:
>
> 1: Load a tiff with three (double) channels
> 2: Image -> Color -> Split channels
> 3: for each slice (R, G and B): Image -> Type -> 32 bit
> 4: Image -> Color -> Merge channels
> 5: Process -> Subtract background
>
> You can also download this sample file from my dropbox:
>
> https://www.dropbox.com/s/r0wbvft0xh6wucr/merge32-1.tif?dl=0
>
> , load it into ImageJ and proceed with step 5.
>
> Now two of the three resulting channels will show black. They have sensible
> data but probably some min and max are off and so do not show properly.
>
> I noticed that by doing Image -> Adjust -> Window/Level -> Reset on the
> defective slice the image springs back and shows. I traced through the
> source of ij.plugin.frame.ContrastAdjuster.reset(ImagePlus, ImageProcessor)
> but did not succeed in taking similar steps in my own plugin to get the
> same result.
>
> Does anybody know how to reset a stack of 32-bit images to show properly
> after the values of the images have changed so much they fall outside their
> previous bounds? I suspect some series of ip.resetMinAndMax() but just that
> does not do.
>
> Greetings from Holland,
>
> Koen
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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