Page MenuHomePhabricator

Wrong colors in YBR dicoms
Closed, WontfixPublic

Description

If you load attached file in MITK, it's all aqua-green.
This happens because photometric interpretation of this DICOM (tag (0x0028, 0x0004)) is YBR_FULL_422.
GDCM loads it correctly but look like ITK doesn't know about this format and treats it like plain RGB.
So YBR black (0, 128, 128) value becomes aqua-green RGB.

I'm not sure how it should be fixed.
GDCM has a filter that do exactly what we need: ImageChangePhotometricInterpretation
But I can't call it from MITK because it works with gdcm::Image and I have only itk::image (or mitk::Image) available.

I'm thinking about writing filter like RescaleIntensityImageFilter that will transform YBR values to RGB and apply it on loaded images every time when their Photometric Interpretation includes YBR.

Event Timeline

If you can distinguish the images based on a DICOM tag you could write your own YBR dicom mime type with an associated reader and there you can customize the resulting image as you see fit.

That way you can either try to manipulate the rendering by adding specific properties (depending on whether you use the default MITK mappers or not), alternatively you can convert the data to the proper RGB color before returning the BaseData.

If you want an example on creating a custom dicom reader with a higher priority, I am currently working on a project where I need custom parsing of dicom tags:
T22057-create-cest-dicom-reader

goch triaged this task as Wishlist priority.Apr 27 2017, 11:18 AM

Is this still current? Otherwise I am going to close this task.

I've found a workaround in my code.
The original problem is still present in MITK.

In that case I am going to leave it as wishlist for now. In my opinion the way to go would be to implement a custom reader.

kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.