Skip to content
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

fix color error #318

Conversation

aporter-turing
Copy link

This PR fixes the convert legacy error related to adding RGB dicoms

@CPBridge
Copy link
Collaborator

CPBridge commented Feb 4, 2025

Thanks @aporter-turing for reporting this and for your suggested fix. Unfortunately while your code may "work" and successfully produce a DICOM object, my reading of the standard is that that object would not be a valid Legacy Converted Enhanced MR Image.

There is a constraint that the PhotometricInterpretation have the value "MONOCHROME2", would would appear to rule out any color images being included in the Legacy Converted Enhanced MR Image altogether (source)

The Photometric Interpretation (0028,0004) defined in Section C.8.15.2 is MONOCHROME2.

So instead, we should probably check this constraint and raise a more intuitive error message if any input image is not "MONOCHROME2".

@aporter-turing
Copy link
Author

Hi @CPBridge

Thank you for the prompt response. I noticed the link you sent was for a CT image. When I look at the MR details here I don't see the same restrictions for PhotometricInterpretation, would it be possible to allow for this conversion for MR only data?

@CPBridge
Copy link
Collaborator

CPBridge commented Feb 5, 2025

Oops yes the link was wrong but I'm afraid the same is true for legacy converted MR (source).

If you want a multiframe MR image, I thenk you would need to use the Enhancnd MR Color Image, but highdicom does not support this at the moment (maybe someday)

@CPBridge
Copy link
Collaborator

CPBridge commented Feb 9, 2025

Closing in favour of #321

@CPBridge CPBridge closed this Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants