SeiictyUsui / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. dcm = dicom.read_file('foo.dcm')
2. 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.

Original issue reported on code.google.com by mikewall...@gmail.com on 17 Feb 2010 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago
I have added the following elements to dicom/testcharsetfiles/chrFren.dcm
 - (0010,1000) Other Patient IDs
 - (0010,1001) Other Patient Names

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.

Original comment by mikewall...@gmail.com on 19 Feb 2010 at 12:17

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 377e3fd1d6.

Original comment by darcymason@gmail.com on 26 Feb 2010 at 1:30