suyashdb / pydicom

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

Writing "OW/OB" error #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Writing Explicit VR with the 'ambiguous' entries in the DICOM dictionary 
("OW/OB" and the like) actually writes the full (more than 2 character VR) to 
the file, causing errors on reading the file back. See pydicom group 
discussion thread 
http://groups.google.com/group/pydicom/browse_thread/thread/58f84ee30560d53.

File attached is essentially the same as the code from the discussion thread, 
which can be a starting point for a unit test for this issue.

Not clear what best way to resolve this is -- the VR must be disambiguated, 
which could be hard for code to do. Perhaps easiest thing is to simply 
generate a (helpful) error message, force the user to disambiguate the VR.

Original issue reported on code.google.com by darcymason@gmail.com on 8 Dec 2009 at 1:38

Attachments:

GoogleCodeExporter commented 8 years ago
Another thought ... for Pixel Data, it could be automatically disambiguated 
using the 
BitsStored data element value. But should still come up with a general solution 
for the  
many other ambiguous VRs in the dictionary.

Original comment by darcymason@gmail.com on 8 Dec 2009 at 1:58

GoogleCodeExporter commented 8 years ago
Closing this issue. There is now an exception raised if attempting to write 
explicit VR that is not two characters. For pydicom to determine the correct VR 
would likely create a substantial amount of hard-to-test and maintain code. 
Better to not have this in pydicom core.

Original comment by darcymason@gmail.com on 16 Dec 2011 at 1:47