question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storage service "promiscuous mode" (accept any SOP class)

See original GitHub issue

I am implementing a catch-all storage service, that will accept associations from all kinds of different PACS’es out there, and store whatever is being sent to it in a C-STORE request. I would like the service to run in “promiscuous mode”, i.e. accept any kind of storage SOP class the SCU might request.

The Presentation Contexts documentation reads

While pynetdicom can handle association negotiation containing private abstract syntaxes the implementation of the associated services/semantics is up to the end user.

However, my understanding is that what is meant here is that you still have to define your private SOP classes, and then explicitly add them with AE.add_supported_context. Looking at the code, I don’t see an easy was to say “I accept everything” (without monkey-patching pieces of pynetdicom anyway).

A workaround would be to indeed define a list of SOP classes and manually add them, but I would like to avoid a situation where my service rejects an association because an SCU counterpart requested some weird private SOP class, that I did not add.

BTW, Orthanc for example does support this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
scaramallioncommented, Jun 12, 2020

When the Association object receives a DIMSE service request it calls uid_to_service_class() which is basically just a lookup function that determines which service class to use based on the contents of a bunch of dicts like _STORAGE_CLASSES. Modifying it with the private UID is the simplest way to add a new SOP Class to the Storage service.

I had originally planned to add simpler ways of registering private SOP Classes but I didn’t think there’d be much call for it. This is the first request I’ve gotten for it.

0reactions
Spenhouetcommented, Dec 19, 2022

@scaramallion We have the same requirement (for a test SCP). It seems that the Verification SOP Class is not accepted when the unrestricted mode is activated. I still needed to set contexts=[build_context(Verification)],. Not sure if that is intended and I did not look further into it. Without this, I got a EVT_REJECTED. Just thought might be worth noting this here for anyone requiring the same functionality.

Edit: Just to mention: With the Verification SOP class set, everything works as expected and we are happy that this unrestricted mode exists and was implemented! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with storescp and "promiscuous" mode - DICOM @ OFFIS
It seems like it would be preferable for promiscuous mode to only accept unknown storage SOP classes (or at least make this configurable)....
Read more >
How promiscuous mode works at the virtual switch and ...
Promiscuous mode is a security policy which can be defined at the virtual switch or portgroup level in vSphere ESX/ESXi.
Read more >
PS3.4 - DICOM Standard - NEMA
A modality-specific Enhanced Image Storage SOP Class that is defined by an IOD that defines only generic Functional Group Sequences, which does not...
Read more >
Ubuntu Manpage: storescp - DICOM storage (C-STORE) SCP
It listens on a specific TCP/IP port for incoming association requests from a Storage Service Class User (SCU) and can receive both DICOM...
Read more >
Receiving DICOM files more easily? - J. Riesmeier's Blog
UID values as a Storage SOP Class and Transfer Syntax UID, pretty much like the storescp options “–accept-all” and “–promiscuous”. Add a mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found