ImagingDataCommons / slim

Interoperable web-based slide microscopy viewer and annotation tool
https://imagingdatacommons.github.io/slim/
Apache License 2.0
111 stars 36 forks source link

Palette Color LUT with 8 bits per entry not supported? #173

Open jriesmeier opened 8 months ago

jriesmeier commented 8 months ago

I tried to load a DICOM multi-fluorescence WSI with the Palette Color Lookup Table Sequence (0048,0120) from the Optical Path Module present. However, this does not seem to work if the number of bits per table entry is 8.

Here is the relevant excerpt from the DICOM dataset:

(0048,0105) SQ (Sequence with explicit length #=1)      # 1744, 1 OpticalPathSequence
  (fffe,e000) na (Item with explicit length #=6)          # 1736, 1 Item
[...]
    (0048,0120) SQ (Sequence with explicit length #=1)      # 854, 1 PaletteColorLookupTableSequence
      (fffe,e000) na (Item with explicit length #=6)          # 846, 1 Item
        (0028,1101) US 256\0\8                                  #   6, 3 RedPaletteColorLookupTableDescriptor
        (0028,1102) US 256\0\8                                  #   6, 3 GreenPaletteColorLookupTableDescriptor
        (0028,1103) US 256\0\8                                  #   6, 3 BluePaletteColorLookupTableDescriptor
        (0028,1201) OW 0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0101\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0202\0303\0303\0303\0303\0303\0303\0303\0303\0303\0303\2003 # 256, 1 RedPaletteColorLookupTableData
        (0028,1202) OW 0000\0000\0000\0000\0000\0101\0101\0101\0101\0101\0202\0202\0202\0202\0202\0303\0303\0303\0303\0303\0404\0404\0404\0404\0404\0505\0505\0505\0505\0505\0606\0606\0606\0606\0606\0707\0707\0707\0707\0707\0808\0808\0808\0808\0808\0909\0909\0909\0909\0909\0a0a\0a0a\0a0a\0a0a\0a0a\0b0b\0b0b\0b0b\0b0b\0b0b\0c0c\0c0c\0c0c\0c0c\0c0c\0d0d\0d0d\0d0d\0d0d\0d0d\0e0e\0e0e\0e0e\0e0e\0e0e\0f0f\0f0f\0f0f\0f0f\0f0f\1010\1010\1010\1010\1010\1111\1111\1111\1111\1111\1212\1212\1212\1212\1212\1313\1313\1313\1313\1313\1414\1414\1414\1414\1414\1515\1515\1515\1515\1515\1616\1616\1616\1616\1616\1717\1717\1717\1717\1717\1818\1818\1818\1818\1818\1919\1919\ff19 # 256, 1 GreenPaletteColorLookupTableData
        (0028,1203) OW 0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000 # 256, 1 BluePaletteColorLookupTableData
      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
[...]
  (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem

And this is the error message shown:

An unexpected error occured in the App component Red Palette Color Lookup Table Data has wrong number of entries.

Error: Red Palette Color Lookup Table Data has wrong number of entries. at new e (http://localhost:8008/static/js/745.811de3f4.chunk.js:2:1769171) at b (http://localhost:8008/static/js/745.811de3f4.chunk.js:2:3711482) at new e (http://localhost:8008/static/js/745.811de3f4.chunk.js:2:3714143) at st (http://localhost:8008/static/js/565.ff364bee.chunk.js:1:57386) at new n (http://localhost:8008/static/js/565.ff364bee.chunk.js:1:78964) at Ho (http://localhost:8008/static/js/main.958a2fca.js:2:215248) at Nl (http://localhost:8008/static/js/main.958a2fca.js:2:235689) at Cu (http://localhost:8008/static/js/main.958a2fca.js:2:281961) at bc (http://localhost:8008/static/js/main.958a2fca.js:2:269932) at gc (http://localhost:8008/static/js/main.958a2fca.js:2:269860)