Closed suever closed 9 years ago
From darcymason@gmail.com on September 01, 2010 05:41:26
I'm not sure where to go with this ... hard to figure out without some more information. Since it goes away when rewritten (by matlab or by anonymizing) there must be something different about the way the file is originally stored.
Could you perhaps use pydicom's hex dump or turn on pydicom's debug mode, both explained on the Troubleshooting wiki page [1], and then capture part of the text around the start of the private data section, and "anonymize" by simply replacing values -- both hex bytes and text -- that include confidential information, with 00's (bytes) or "-" (text). That would show the structure of how the information is stored without exposing any confidential info. And I might be able to create from that a file which could reproduce the failure. If you want you could send directly to me (my full name, no punctuation, at gmail.com).
Thanks Darcy
[1] https://code.google.com/p/pydicom/wiki/Troubleshooting
Status: Accepted
From med.diag...@gmail.com on September 07, 2010 05:21:58
I debugged this issue and found that the calls keep going back and forth between getitem and setitem for setting the private creator code. The code goes into infinite recursion once the private_block becomes 0 (line 484 above)
For the tag (0x09,0x10e0) for e.g. code goes to set (0x09,0x10) and in the next loop goes to (0x09,0x00) and then keeps looping with this tag.
A simple return after a check if private_block == 0 seems to fix this issue. May be there is a better fix.
I tried modifying existing test files to reproduce the problem but have not succeeded. I think any data set with private attributes (including creator code and group lengths for the private group) should help to reproduce the issue.
From darcymason@gmail.com on September 08, 2010 18:08:22
After revisiting this I'm thinking it is likely the same problem that was fixed in revision f54d9aa6b3 . When I first checked it I somehow convinced myself it wasn't, but looking again the fix for the if statement in dataset.py -- "and tag != private_creator_tag:" does not appear in the error trace (at line 486) copied above.
Would you be able to update to that revision (or later) and check if that solves your problem? Alternatively, you could just add the the extra conditional just quoted and see if that works.
From darcymason@gmail.com on December 18, 2011 08:42:19
Closing issue as resolved. As in previous comment, I believe the issue was resolved in revision f54d9aa6b3 .
Status: Verified
From bob94...@gmail.com on August 27, 2010 15:04:25
What steps will reproduce the problem? 1. load a dicom fle from a GE MR750 scanner
ds[0x0019,0x10e0].value
RuntimeError Traceback (most recent call last)