OSIMIS logs - Cannot decode image using GDCM: GDCM cannot change the photometric interpretation

Hi,

When I view a JPEG Baseline 1 encoded MultiFrame to OSIMIS viewer I created the following errors shows on the console:

Cannot decode image using GDCM: GDCM cannot change the photometric interpretation

I am suspecting that it might have a problem with YBR_FULL_422, but for JPEG Baseline 1 color image that’s traditionally I used (I think).

The frames displays basically OK, except that at random frames, I get some snow under the video.
Note also that this does not occur with Horos or MicroDicom viewers.

If there is some obvious thing going on or places to check, please let me know.

732: (0018,1063) DS #4 [33.0] FrameTime
744: (0020,000D) UI #32 [1.2.840.113970.10.27.1956.8.45.5] StudyInstanceUID
784: (0020,000E) UI #32 [1.2.840.113970.10.27.1956.8.45.7] SeriesInstanceUID
824: (0020,0011) IS #6 [999990]
838: (0020,0013) IS #2 [1]
848: (0028,0002) US #2 [3] SamplesPerPixel
858: (0028,0004) CS #12 [YBR_FULL_422] PhotometricInterpretation
878: (0028,0006) US #2 [0] PlanarConfiguration
888: (0028,0008) IS #2 [6] NumberOfFrames
898: (0028,0009) AT #4 [00181063] FrameIncrementPointer
910: (0028,0010) US #2 [480] Rows
920: (0028,0011) US #2 [640] Columns
930: (0028,0034) IS #4 [1\1] PixelAspectRatio
942: (0028,0100) US #2 [8]
952: (0028,0101) US #2 [8]
962: (0028,0102) US #2 [7] HighBit
972: (0028,0103) US #2 [0]
982: (0032,1030) LO #30 [Unspecified: Reason for Study] ReasonForStudy
1020: (0032,4000) LT #26 [Unspecified: SComment]
1054: (7FE0,00PixelData
1066: >(FFFEE000) #0 [] Item
1074: >(FFFEE000) #2680 [-9985-7937\4096\17994\17993\256\2\256\256\0-257\40
3762: >(FFFEE000) #2832 [-9985-7937\4096\1799256\2\256\256\0-257\40
6602: >(FFFEE000) #2966 [-9985-7937\4096\17994\17993\256\2\256\256\0-257\40
9576: >(FFFEE000) #2974 [-9985-7937\4096\17994\17993\256\2\256\256\0-257\40
12558: >(FFFEE000) #2974 [-9985-7937\4096\17994\17993\256\2\256\256\0-257\4
15540: >(FFFEE000) #2054 [-9985-7937\4096\17994\17993\256\2\256\256\0-257\4
17602: (FFFEE0DD) #0 SequenceDelimitationItem

This error message “Cannot decode image using GDCM: GDCM cannot change the photometric interpretation” is actually more a warning. In the viewer, we have the GDCM decoder and the Orthanc decoder. We first try with GDCM and then with Orthanc. This message is displayed when GDCM fails to decode the image but, utusally, Orthanc is able to do it (except for JP2K which is handled by GDCM but not by Orthanc). So this message is not really important.

Could you eventually pass us some anonymized data so we can try to reproduce the “snow” problem ?

Update on this so people following this thread know what is happening.

  1. I had a bit (actually a byte) of error and each JPEG file did not end in an even byte boundary. The standard says, I can pad this at the end fragment, but in general, it is also OK to pad each DICOM image. As a result of doing this, some random garbage that appeared at the bottom of some frames are now cleaned up. In general, there is no harm done by adding an extra byte to a JPEG file.

  2. I have provided Alain via email the sample file that demonstrates this. As he indicated, there is also no harm done by seeing the message. So I am quite OK.