Login  Register

Re: Bug in Background Subtracter

Posted by Koen van dijken on Jul 17, 2016; 1:38pm
URL: http://imagej.273.s1.nabble.com/Bug-in-Background-Subtracter-tp5016896p5016899.html

That is strange that you get expected results and I do not.
What is also strange is when I run Background Subtracter I see a red image
(only the red channel). When I save it and open it again I only see three
black slices in this tiff.

I am running ImageJ 1.151 on OSX 10.11.5.

I tried again, and my resulting image is attached to this mail (hope that's
possible through this listserver). A link to the resulting file on my
dropbox is

https://www.dropbox.com/s/3ipgqn0johoyg8d/subtract%20background%20merge32-1.tif?dl=0

The image shows part of the (internal) female genitals of Coleophora
flavipennella, a small micromoth.

Koen



On Sun, Jul 17, 2016 at 2:58 PM, Herbie <[hidden email]> wrote:

> 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
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

subtract background merge32-1.tif (2M) Download Attachment