I am trying to make a c-STORE via pynetdicom3, but everytime this shows up
ValueError: No Accepted Presentation Context for 'dataset'
I've searched inside the pynetdicom3 code and it compare the SOPclassUID of the dcm to a bunch of transfer syntax, no one is the same as the SOPclassUID, leaving the syntax as None.
How can i solve this? What is the SOPclassUID and what does it have to do with the syntax?
Code:
ae = AE(config.get('move', 'aet'), port=pynetport, scu_sop_class=QueryRetrieveSOPClassList)
assocstore = ae.associate(configworkstationaddress, int(configworkstationport))
*stuff*
dsstore = dcmread(dcmfilenames[0])
status = assocstore.send_c_store(dsstore)
print(status)
assocstore.release()
It seems, that you are trying to send DICOM file to another DICOM application. That means your application has to act as SCU (Service Class User, DICOM term for client) of the relevant Storage SOP class. Currently your AE intialisation is declaring scu_sop_class=QueryRetrieveSOPClassList
, which means that your application tells to the other side, that "I want to make queries to you and nothing else". Since you actually want to send a DICOM object over the network, you should declare the relevant capabilities instead.
All in all, first try to set up your AE with storage capabilites and see what happens:
ae = AE(config.get('move', 'aet'), port=pynetport, scu_sop_class=StorageSOPClassList)