Closed cold-blue closed 2 years ago
How was this invoked? And what data was used?
If the input image (or reference image) is sufficiently noisy then the underlying algorithm, which employs a search for optimal parameters, can end up swapping the signatures for Hematoxylin and Eosin. This is detected by observing whether a certain matrix determinant is negative and is corrected by swapping the two signatures, which then makes the determinant positive as it should be. However, if the determinant is exactly zero then swapping would not help and this assertion will be triggered. A determinant of zero arises when the two stains' signatures are identical (or are proportional to each other), meaning that the signatures are the exact same colors (though perhaps of different brightness). This could arise if the supplied input image (or reference image) were monochromatic but, in theory, should not arise even for fairly noisy non-monochromatic images. What are the input and reference images used? If either is in fact monochromatic then we should probably keep the assertion in the code, but clarify the message to indicate that it could arise from using a monochromatic image.
This is the source image.
This is the target image.
Traceback (most recent call last): File "/home/rainco/Yuhan/Models/Data_Process/Local_Data_Process/201201_color_norm_test.py", line 18, in
color_index_suppressed_by_eosin=1)
File "/home/rainco/anaconda3/envs/py36_env/lib/python3.6/site-packages/itkHelpers.py", line 118, in image_filter_wrapper
return image_filter(*args, **kwargs)
File "/home/rainco/anaconda3/envs/py36_env/lib/python3.6/site-packages/itk/itkStructurePreservingColorNormalizationFilterPython.py", line 1180, in structure_preserving_color_normalization_filter
return instance.internal_call__()
File "/home/rainco/anaconda3/envs/py36_env/lib/python3.6/site-packages/itk/ITKCommonBasePython.py", line 1585, in internal_call__
self.UpdateLargestPossibleRegion()
RuntimeError: ../../../include/itkStructurePreservingColorNormalizationFilter.hxx:193:
itk::ERROR: Hematoxylin and Eosin are getting mixed up; failed
Process finished with exit code 1