griffincalme / MicroDeconvolution

Color deconvolution and stain segmentation for immunohistochemical (IHC) tumor sections
Apache License 2.0
6 stars 4 forks source link

Color decvoluton #1

Open wahaha98 opened 2 years ago

wahaha98 commented 2 years ago

Hello, excuse me, I would like to ask you in the calculate_P_hat_from_256RGB.py file, which reference is there for the calculation of the OD value?

griffincalme commented 2 years ago

Hi, thanks for asking. Please see https://pubmed.ncbi.nlm.nih.gov/11531144/ for the reference to the OD calculations. Article seems to have a paywall, I don't immediately have access to the PDF anymore, sorry!

For an example using the skimage library https://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_ihc_color_separation.html

wahaha98 commented 2 years ago

hello, Sorry to disturb you

In fact, I have read this paper and this example, but I still did not find a reasonable way to calculate the OD value until I saw your project.

So is this method your own idea, or it was mentioned in the paper, but I didn't understand it well?

I want to try to choose a new color to calculate its OD value and put it in the OD matrix so that I can separate the new color. Could I use this method to experiment?please~

------------------ 原始邮件 ------------------ 发件人: "griffincalme/MicroDeconvolution" @.>; 发送时间: 2021年12月21日(星期二) 晚上9:54 @.>; @.**@.>; 主题: Re: [griffincalme/MicroDeconvolution] Color decvoluton (Issue #1)

Hi, thanks for asking. Please see https://pubmed.ncbi.nlm.nih.gov/11531144/ for the reference to the OD calculations. Article seems to have a paywall, I don't immediately have access to the PDF anymore, sorry!

For an example using the skimage library https://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_ihc_color_separation.html

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

griffincalme commented 2 years ago

No worries, not my own idea. Was implemented by Scikit-image library.

You can make your own matrix for different colors. The OD values are just the inverse of the RGB values. You essentially can use the color picker in a program like paint.net to get the RGB then take "(255 - value)/255 = OD"

It gets more complicated when stains share similar color space. Skimage also has a different function for only two stains.

wahaha98 commented 2 years ago

Thank you very much for your explanation~,  also wish you Merry Christmas in advance ^_^

------------------ 原始邮件 ------------------ 发件人: "griffincalme/MicroDeconvolution" @.>; 发送时间: 2021年12月21日(星期二) 晚上10:37 @.>; @.**@.>; 主题: Re: [griffincalme/MicroDeconvolution] Color decvoluton (Issue #1)

No worries, not my own idea. Was implemented by Scikit-image library.

You can make your own matrix for different colors. The OD values are just the inverse of the RGB values. You essentially can use the color picker in a program like paint.net to get the RGB then take "(255 - value)/255 = OD"

It gets more complicated when stains share similar color space. Skimage also has a different function for only two stains.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>