ImagingDataCommons / libdicom

C library for reading DICOM files
https://libdicom.readthedocs.io
MIT License
15 stars 7 forks source link

UT should not parse its string argument #39

Closed jcupitt closed 1 year ago

jcupitt commented 1 year ago

With this file:

http://www.rollthepotato.net/~john/1.3.6.1.4.1.36533.1001821602011442096713916118877991671060235.dcm

I see:

$ dcm-dump -v 1.3.6.1.4.1.36533.1001821602011442096713916118877991671060235.dcm
INFO     [Thu Feb 16 09:50:49 2023] - Read file '1.3.6.1.4.1.36533.1001821602011442096713916118877991671060235.dcm'
INFO     [Thu Feb 16 09:50:49 2023] - Read File Meta Information
===File Meta Information===
(0002,0003) MediaStorageSOPInstanceUID | UI | 62 | 1.3.6.1.4.1.36533.1001821602011442096713916118877991671060235
(0002,0010) TransferSyntaxUID | UI | 20 | 1.2.840.10008.1.2.1
(0002,0016) SourceApplicationEntityTitle | AE | 16 | Leica ScnUtility
INFO     [Thu Feb 16 09:50:49 2023] - Read metadata
ERROR    [Thu Feb 16 09:50:49 2023] - Parse error: Reading of Data Element failed - Encountered unexpected Value Multiplicity 4 for Data Element '0040A160'

Regular dcmdump says:

$ dcmdump 1.3.6.1.4.1.36533.1001821602011442096713916118877991671060235.dcm | grep -i a160
    (0040,a160) UT [\\esmwz.europe.leicams.com\Images\2021-09-06\2_4_163906.svs] #  60, 1 TextValue
    (0040,a160) UT [PDX]                                    #   4, 1 TextValue

So it looks like it's parsing the (slightly unexpected) backslashes in the filename as multiple values.