Connect 3D Slicer with python PYNETDICOM library

Hi @lassoan,

We are trying to connect to 3D slicer with a python script using PYNETDICOM library. We’re able to establish communication but we’re getting an error of connection timeout.

Please find code below:-

Please find the output in order below (connection error)



Please let us know if you have any idea. Any help will be appreciated. Thanks!

You can already do DICOM networking with existing Slicer modules and extensions.

Classic DIMSE networking:

  • C-STORE SCP: see DICOM module / DICOM networking / Storage listener
  • C-STORE SCU: right-click on a patient/study/series and choose Send to DICOM server
  • QUERY/RETRIEVE: see DICOM module / DICOM networking / Query and retrieve

DICOMweb networking:

  • query and retrieve using DICOMwebBrowser module
  • DICOMweb upload using DICOM module: right-click on a patient/study/series and choose Send to DICOM server

While there is certainly room for usability and performance improvements, all these features generally work well in Slicer. All these features are available from both the GUI and using Python scripting.

If you don’t want to use this infrastructure but prefer PYNETDICOM then you can do that, too. Since Python is essentially single-threaded, you may achieve better user experience if you run all the network jobs in a separate Python processes. You can debug these communication processes completely independently from Slicer and get network troubleshooting help from PYNETDICOM community.