Avoiding measuring white areas in quantitation pipeline



A few months back you helped me out with a pipeline to quantify blue versus red areas in order to measure fibrosis in heart samples (attached image and pipeline). I’ve noticed that one problem with the current pipeline is that it counts the white parts of the image as fibrosis (blue) since white contains blue. I was wondering if there is a way to filter out the white from the quantification measurement (perhaps by subtracting those sections where blue, white, and green are all equal)?

Thanks so much!


2009_02_20_FibrosisPIPE.mat (1.53 KB)


Hi Mike,

Thanks for bringing this up again. One question: Would you be able to upload an image as a TIF, PNG or some other lossless format? The quantization in JPG’s may make finding a solution tricky.

If you are acquiring images as JPG’s to begin with, we highly recommend against it, since you will be losing data in the process.



Thanks for the reply!

I always perform quantification on TIFF images; just attached a JPEG to save space.

Here’s a TIFF image example (shrunk down a bit to save size).

Thanks again!



Hi Mike,

Attached is a tentative pipeline. Basically it does the additional work of thresholding the color channels, combining them together into a mask for the white regions, then applying the mask to the fibrotic region previously determined. As it stands right now, the channels are all thresholded by the same value; you may need to revise this number upwards or downwards until it first your needs.

2009_05_20_FibrosisPIPE.mat (1.98 KB)


I am doing the same measurement described above for fibrosis. I tried using the pipeline you provided above to avoid counting white pixels, but getting repeated error messages - could this be due to the change to 2.0?
Thank you.


Hi Matt,

Are you running the pipeline in 1.0 or trying to upgrade it to 2.0? In either case, here’s the pipeline in both versions.

2012_04_06_Fibrosis.cp (18.7 KB)
2012_04_06_FibrosisPIPE.mat (2.12 KB)