InsightSoftwareConsortium / ITKColorNormalization

Structure preserving color normalization on H&E images using a reference image
Apache License 2.0
18 stars 5 forks source link

not working for some H&E images #23

Closed Mr-TalhaIlyas closed 2 years ago

Mr-TalhaIlyas commented 3 years ago

I attached a sample image on which it is not working and through following error. RuntimeError: D:\a\im\include\itkStructurePreservingColorNormalizationFilter.hxx:156: itk::ERROR: The image to be normalized could not be processed; does it have white, blue, and pink pixels? img_Adrenal_gland_3_01134

SahPet commented 3 years ago

Same problem here: RuntimeError: D:\a\im\include\itkStructurePreservingColorNormalizationFilter.hxx:181: ITK ERROR: The reference image could not be processed; does it have white, blue, and pink pixels?

dzenanz commented 3 years ago

Well, this image doesn't have any blue pixels. Is it supposed to work @Leengit?

Leengit commented 3 years ago

The algorithm should work if there are pixels with only a little blue, but not if the pixels are all different shades of pink / red. I cannot see whether the darker pixels in this image are dark red or have a little blue too. Was this image stained with hematoxylin too?

Leengit commented 2 years ago

A bug that is directly related to this issue was identified and fixed with Pull Request #30. If this has not fixed the present problem, please reopen this issue or open a new one.