Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pydicom python package

27 views
Skip to first unread message

Darcy Mason

unread,
Oct 6, 2008, 11:27:31 PM10/6/08
to
Hi all,
I'm pleased to announce pydicom, a pure python package for working
with DICOM files (http://pydicom.googlecode.com).

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

Arun

unread,
Dec 3, 2008, 2:02:24 AM12/3/08
to
thanks for making this project public Darcy.
I liked the pythonic feel of this module.

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

Darcy Mason

unread,
Dec 7, 2008, 7:33:22 PM12/7/08
to
Arun, thanks for the comments and the work you have done sounds
interesting. Please direct any further discussion to the pydicom
google group (http://groups.google.com/group/pydicom/).
Thanks
Darcy
0 new messages