suever / pydicom-experimental

pydicom test
0 stars 1 forks source link

unreadable headers #130

Closed suever closed 9 years ago

suever commented 9 years ago

From jacob.ia...@gmail.com on August 09, 2013 16:56:51

What steps will reproduce the problem? 1. Run this code on .ima dicom file:

ds = dicom.read_file(path, stop_before_pixels=True) ds.PatientID = 'newID' ds.save_as(path)

  1. Verify, using pydicom that the new PatientID is 'newID'
  2. Attempt to open saved ima file with Ginko CADx. What is the expected output? What do you see instead? I expected the dicom image viewing application to be able to read the file. However, after modification with pydicom, my image reader (Ginko CADx) indicates that it is unable to read the header file (pydicom can read the header, but Ginko was able to prior to modifying header). Of course, this could be just a problem with Ginko CADx, but how do I know that it won't cause problems with other readers as well? What version of the product are you using? I installed using macports: port install py27-pydicom

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

suever commented 9 years ago

From darcymason@gmail.com on August 10, 2013 13:19:43

Can you provide an example file with no private information? I'd have to try to see how pydicom changed the header info. Generally it does very little to an incoming file, attempting to write it back out exactly as found.

Another thought ... since stop_before_pixels was used, maybe that has caused problems, That's meant as a read-only tool. If you want to write a file again, you should read the full file. Perhaps that is throwing the other program off; maybe the message about header problems is actually misleading.

suever commented 9 years ago

From jacob.ia...@gmail.com on August 10, 2013 17:15:42

Thanks for your reply. I will see if I can find some non-private imaging data to send you. I also had the same thought as you about stop_before_pixels, and will see if removing that option solves the issue. Thanks again. Have a good weekend.

Jacob

suever commented 9 years ago

From jacob.ia...@gmail.com on August 12, 2013 07:03:01

It turns out that setting stop_before_pixels=False solves the issue. Thank you for your help.

suever commented 9 years ago

From darcymason@gmail.com on September 15, 2013 15:19:46

Issue resolved after reading full file rather than stop_before_pixels.

Status: WontFix