Why another DICOM package? I wrote the core code years ago when there
weren't as many choices as there are today. Since then I have
occasionally seen requests for pure python implementations. So I
finally updated the package and tested with some more files before
releasing it (GPL license) in the hope that it may be useful to
others.
pydicom is not an image viewer; it was made for inspecting and
modifying DICOM tags in an easy "pythonic" way. The modifications can
be written again to a new file. As a pure python package, it should
run anywhere python runs without any other requirements.
Here is a very brief example from an interactive python session:
>>> import dicom
>>> plan=dicom.ReadFile("rtplan.dcm")
>>> plan.dir("setup") # get a list of tags with "setup" somewhere in the name
['PatientSetups']
>>> plan.PatientSetups[0]
(0018, 5100) Patient Position CS: 'HFS'
(300a, 0182) Patient Setup Number IS: '1'
(300a, 01b2) Setup Technique Description ST: ''
>>> plan.PatientSetups[0].PatientPosition = "HFP"
>>> plan.SaveAs("rtplan2.dcm")
If you find DICOM files it won't work with, or any other issues,
please enter them using the issue tracker at http://pydicom.googlecode.com.
Thanks,
Darcy
I put a simple web form over a variant of the anonymize example in the
package and hosted it on Google app engine. This may be useful for
simple anonymization needs - I am thinking of adding some more
configuration as well as support cover more tags (Supp 55 being the
end goal).
A VR validator for DICOM composites is also in the works
btw, I had to make a small change to the filewriter module to get it
working on the app engine - I will mail you the changes so that you
can review and merge them.
Arun