Orthanc preview does not show correctly

Hi @alainmazy ,

I have a dicom file ( see in the attachment)

1.dcm (294.1 KB)

and import it to Orthanc. When I use api /preview, the rendered image is not correct.

The correct image should be

Can you please help to check what is the issue ?

Hi,

That issue will most likely be because the dicom with has JPEG encoding but the PhotometricInterpretation tag is RGB.

I’ve encountered this before. The embedded jpeg is correct but because the PhotometricIntterpretation is RGB when it is decided by Orthanc for the preview or render APIs the colour range changes.

If you fetch the raw PixelData[0] tag, the jpeg will render correctly.

The issue is strictly speaking incorrect value for PhotometricInterpretation. However it isn’t uncommon.

I believe other systems will just return the embedded jpeg without re-encoding the pixel data. But I can’t remember what DCMTK does with dcm2img.

The workarounds are to correct the PhotometricInterpretation tag to YBR_FULL_422 or YBR_FULL depending on the jpeg.

Or to fetch the raw encoded jpeg.

Hope that helps a little.