Whole Image Goes Black Using Biovoxxel Background Substract or Any Other Substraction Tools

Hi everyone.
I just have this problem with Fiji.I’m using the following image:


I’m just trying to count fibroblast cells in this H&E staining, so decided to go with Biovoxxel. As a first step I’m just trying to subtract red stained content (collagen and etc) as background and then go for morphological segmentation for blue nuclei, but the problem is after converting image to 8 bit (works fine) and using convuloted background subtraction, the whole image goes black. I had this problem with some other plugins too. I mean when the interface is up any of the three methods I click on just turns image black.
I also tried Adjust/Brightness and Contrast Auto but it’s not working.
So am I doing something wrong?

Not sure about your current method since I have never used biovoxxel, but using the Image->Color->Color deconvolution->H&E gets the left image, and the right is a simple threshold from 0-138

The deconvolved hematoxylin channel might be a better input into whatever method you are using to segment. Just a thought.

1 Like

Thanks a lot for your suggestion. I just wanted not only to subtract nuclei from image, but sort them by shape characteristics (removing a manual counting stage). As you demonstrated on threshold image, while most of nuclei is subtracted, I still need to differentiate between fibroblasts (elongated nucleus) and PMNs(circular). So do you have any suggestion for that? After extracting by your proposed method, how can I extract my favorite shape from it? In other words how can I extract a shape by its morphological characteristics?
I just want this to be reproducible and remove human errors in counting as much as possible. While there is about 600 photos to be processed.

Ah, best of luck then. Normally, this is where Analyze Particles would come in (circularity threshold), but I don’t think that will get you want you want here, since not all of the smaller nuclei are circular, and many of the fibroblast nuclei are. PMNs are a pain that way. A blur filter might help, but I don’t think it will do enough to prevent any automatic calculation from being very error prone.

And that’s when Biovoxxel comes in handy, to filter shapes by more options… So I’m just dealing with problem that whole image goes black, I just tried some Fiji samples too, but it seems there is a problem with plugin itself.

Dear @hgn66,

the background subtraction method from the BioVoxxel toolbox is not meant for the subtraction of a specific color staining (since this is not background, it is a staining). So, here this method is not applicable. Short recommendation would be to either go via color deconvolution as indicated already. But it is not recommendable to take any of the predefined methods, since they are based on a staining by one lab and this will surely be very different from yours. The best way in applying color deconvolution to my understanding is to have the individual stainings for hematoxilin and eosin separately applied on two samples and define the color vector based on your staining! Thereafter, you can use those to separate the colors in your actual experimental images more reliably.
A less quantitative way would be to separate the image into the channels of a specific color channel (e.g. HSB or L.a.b) →Image →Color →…
In your case, conversion to c-m-y-k works kind of (at least as a starting idea).
This is a plugin from @axtimwalde you will need to install yourself separately from here.
In addition you will need the Adjustable Watershed

Then you can test the following macro:

originalImageID = getImageID();
run("RGB to CMYK");
cmykImageTitle = getTitle();
run("Duplicate...", "duplicate channels=1");
run("Median...", "radius=3");
setOption("ScaleConversions", true);
run("8-bit");
run("Auto Threshold", "method=Li white");
run("Adjustable Watershed", "tolerance=1");
run("Extended Particle Analyzer", "pixel aspect=2-4 show=Nothing redirect=None keep=None clear exclude add");
close(cmykImageTitle);
selectImage(originalImageID);
roiManager("Show All without labels");

This is currently not optimized. Thus, you will need to play with the parameters ans/or add additional processing steps. It should just give you a starting point.

Another starting approch will be to also install the plugins from the SCF-MPI-CBG update site and try to adapt the interactive H_watershed to achieve directly an extraction and separation or the nuclei based on the c-m-y-k-converted image as above.

run("RGB to CMYK");
selectWindow("CMYK_Clipboard");
run("Duplicate...", "duplicate channels=1");
run("Gaussian Blur...", "sigma=2");
setOption("ScaleConversions", true);
run("8-bit");
run("Grays");
run("H_Watershed", "impin=[CMYK_Clipboard-1] hmin=24.0 thresh=22.0 peakflooding=100.0 outputmask=true allowsplitting=true");

Thereafter, try to adjust the parameters of Analyze Particles or the Extended Particle Analyzer according to the shape of the nuclei, you will need to separate from the rest.

2 Likes

PMNs do not have circular nuclei… It might be an idea to read a bit of classic histology.

Thanks a lot!
I will give it a try, anyway, any idea about why the images go black? (I tested it on grayscale, black and white, binary and … all goes black)

I think the problem is, that your background is bright and the convoluted background subtraction is developed for fluorescent type images and therefore assumes a dark background. Somewhen in future, I might add a possibility to set this in the plugin. Until then the solution is to invert the image (→Edit →Invert) before you run the convoluted background subtraction.

1 Like