Bug 144

Summary: OrthancWSIDicomizer PhotometricInterpretation
Product: Orthanc Reporter: Sébastien Jodogne <s.jodogne>
Component: Whole-slide imagingAssignee: Sébastien Jodogne <s.jodogne>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Hardware: All   
OS: All   

Description Sébastien Jodogne 2020-06-29 15:15:51 CEST
[BitBucket user: Markus Herrmann]
[BitBucket date: 2019-06-20.11:15:10]

For JPEG baseline compressed images, the value of the DICOM attribute PhotometricInterpretation is currently hardcoded to “YBR\_FULL\_422”:

https://hg.orthanc-server.com/orthanc-wsi/file/8c279c5b28a3ee2057a051c0117a336136a276f2/Framework/Outputs/MultiframeDicomWriter.cpp#L197

However, some WSI vendors \(e.g. Aperio\) compress images directly in RGB space without transforming them into YCbCr color space. In these cases, the value of PhotometricInterpretation should be “RGB”.

See http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#table_8.2.1-1

The correct value for PhotometricInterpretation is available from the corresponding TIFF tag. Openslide already handles this:

https://github.com/openslide/openslide/blob/f55a3bf34053ba10b32b0d902a36105fbb3ac205/src/openslide-decode-tiff.c#L125
Comment 1 Sébastien Jodogne 2020-06-29 15:26:02 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2019-07-12.10:01:39]

This issue should be fixed by the following changeset that is pending in the mainline: https://hg.orthanc-server.com/orthanc-wsi/changeset/605247fc8758af7d9547a17b4c2273abd72e8495