suever / pydicom-experimental

pydicom test
0 stars 1 forks source link

Dataset.decode() fails if string datatypes have VM > 1 #78

Closed suever closed 9 years ago

suever commented 9 years ago

From mikewall...@gmail.com on February 17, 2010 15:39:20

What steps will reproduce the problem? 1. dcm = dicom.read_file('foo.dcm')

  1. dcm.decode() What is the expected output? What do you see instead? Expect dataset with decoded character set, but instead we get:
    • AttributeError: 'list' object has no attribute 'decode' What version of the product are you using? 0.94

Have attached a patch which fixes the issue by using a list comprehension if the VM is anything other than 1. Seems to work though I haven't tested it with the pydicom unit tests.

Attachment: charset.py.patch

Original issue: http://code.google.com/p/pydicom/issues/detail?id=78

suever commented 9 years ago

From mikewall...@gmail.com on February 18, 2010 16:17:45

I have added the following elements to dicom/testcharsetfiles/chrFren.dcm

Running the unit tests using this modified file will cause the error reported. It also exposed a problem with my initial patch (I didn't handle the case where a PersonName element has a VM greater than 1) so I have attached an updated patch, along with the modified dicom file.

Attachment: chrFren.dcm charset.py.patch

suever commented 9 years ago

From darcymason@gmail.com on February 26, 2010 05:30:15

This issue was closed by revision 377e3fd1d6 .

Status: Fixed