Kiyokawa / pydicom

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

unreadable headers #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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)

2. Verify, using pydicom that the new PatientID is 'newID'
3. 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 reported on code.google.com by jacob.ia...@gmail.com on 9 Aug 2013 at 8:56

GoogleCodeExporter commented 8 years ago
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.

Original comment by darcymason@gmail.com on 10 Aug 2013 at 8:19

GoogleCodeExporter commented 8 years ago
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

Original comment by jacob.ia...@gmail.com on 11 Aug 2013 at 12:15

GoogleCodeExporter commented 8 years ago
It turns out that setting stop_before_pixels=False solves the issue. Thank
you for your help.

Original comment by jacob.ia...@gmail.com on 12 Aug 2013 at 2:03

GoogleCodeExporter commented 8 years ago
Issue resolved after reading full file rather than stop_before_pixels.

Original comment by darcymason@gmail.com on 15 Sep 2013 at 10:19