google-code-export / pydicom

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

Assignment to data element changes type #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

>>> ds = dicom.read_file('dicomfile.dcm')
>>> type(ds.SeriesInstanceUID)
<class 'dicom.UID.UID'>
>>> ds.SeriesInstanceUID = '1.2.3.01'
>>> type(ds.SeriesInstanceUID)
<type 'str'>

similar behavior after:
>>> ds.SeriesInstanceUID += '.1'

What is the expected output? What do you see instead?
Not sure whether this is desired/able

What version of the product are you using?
>>> dicom.__version__
'0.9.4svn'

Original issue reported on code.google.com by danin...@netscape.net on 25 Aug 2009 at 6:49

GoogleCodeExporter commented 9 years ago
Fixed in revision aa61eab18e. Added check for UI in _convert function of 
dataelement,
and __new__ in UID class to prevent it from converting twice.

Original comment by darcymason@gmail.com on 8 Nov 2009 at 7:33