DicomObjects can be used in Python with the help of various API’s and interface generators available on the internet. We have tested 2 of those modules (One with .NET version and the other with COM version) but please do not limit yourself to these examples as you may find other easier tools to use in conjunction with DicomObjects.

DicomObjects.NET

The instructions in this section below has been tested using IronPython that references our DicomObjects .NET assembly

  1. Download and install IronPython from here: http://ironpython.net
  2. Open IronPython console
  3. Run the following commands:
  • import clr
  • clr.AddReferenceToFileAndPath(Full Path To DicomObjects.NET DLL)
  • import DicomObjects
  1. Test to see if it works:
    	print DicomObjects.DicomGlobal.FileVersion 
    	print DicomObjects.DicomGlobal.Echo("DicomServer.co.uk", 104, "PySCU","DicomServer")

DicomObjects.COM

The instructions in this section below has been tested using pywin32 interface generator for DicomObjects COM interfaces

  1. Download and install appropriate pywin32 tool from here: http://sourceforge.net/projects/pywin32
  2. Run the makepy.py script from “\Lib\site-packages\win32com\client\makepy.py
  3. Select DicomObjects8 from the list of registered COM/ActiveX components on your system
  4. A module is generated under “*\Lib\site-packages\win32com\gen py*”
  5. Download our sample python script and run it using the command:
  • python DicomObjects COM.py