ImagingDataCommons / highdicom

High-level DICOM abstractions for the Python programming language
https://highdicom.readthedocs.io
MIT License
168 stars 35 forks source link

Improve handling of metadata in file reader for color correction of frames #189

Closed hackermd closed 2 years ago

hackermd commented 2 years ago

This PR introduces changes that are intended to improve color management during reading of image frames with the highdicom.io.ImageFileReader.

Instead of raising an exception when the image does not contain an ICC Profile upon construction of the file reader object, the read_frame() method will raise an exception when correct_color is set to True but no ICC Profile is available for color correction in the metadata of the image.