-
-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: remove repetitive monochorme1 warning #4922
ENH: remove repetitive monochorme1 warning #4922
Conversation
itkWarningMacro("Converting from MONOCHROME1 to MONOCHROME2 may impact the meaning of DICOM attributes related " | ||
"to pixel values."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that GDCMImageIO threats MONOCHROME1 just like MONOCHROME2, and produces a bright (inverted) image when the original image was dark?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure you clearly articulated that.
Generally, images can be store ( disk or memory) in a different way that is different than their photometric meaning. For example an image can be stored as an index into a pallet, where the pallet contains the RGB photometric meaning.
The photometric meaning of a MONOCHROME1 is that "min is black", which is opposite of ITK's conventional Gray scale.
ITK's meta data does not contain definitions for photometric meaning e.g RGB color space, XYZ color space, min-is-black or min-is-white. In lieu of this ITK has conventions, and the ImageIO's generally convert from the representation to these common conventions.
This conversion is little different than applying the slope intercept to get a float from the integer values in the DICOM file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with removing the itkWarningMacro call, just wondering if the read "PhotometricInterpretation" tag is still of interest to anyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag is still in the metadata dictionary, it has just been applied similarly to the slope intercept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I have seen this warning message 100s of thousands of time while working with large chest X-ray data sets.
These is not problem to "warn" about the image loads as expected.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.