pydicom is a pure Python module for working with DICOM files. It was made for inspecting and modifying DICOM files 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 short code sample from an interactive python session:
>>> import dicom
>>> plan=dicom.ReadFile("rtplan.dcm")
>>> plan.PatientsName
'Last^First^mid^pre'
>>> 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 TechniqueDescription ST: ''
>>> plan.PatientSetups[0].PatientPosition = "HFP"
>>> plan.SaveAs("rtplan2.dcm")
>>>
pydicom is not a DICOM server, and is not about viewing images. It is designed to let you manipulate data elements in a DICOM file with python code.
pydicom is released under the GPL license. See the license.txt file in the distribution for details.
Requirements:
- Python
Comments not found