You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having difficulties to understand send_c_cancel(msg_id, context_id) and can't find an easy example for it. From where do I get the context_id?
Let's say I want to cancel a send_c_get operation with multiple accepted contexts (e.g. by requesting `StoragePresentationContexts´). How do I know which context at the end is used, and how it's context_id is?
I found some usage in test_service_qr.py, but I don't understand it either. Why are there two calls directly after each other (assoc.send_c_cancel(1, 3), assoc.send_c_cancel(11142, 1)). And where do these context IDs come from?
And a last question ... I guess the canceling must always come from the same association (maybe from another thread). Is that right?
The text was updated successfully, but these errors were encountered:
The context_id is the ID of the presentation context you're using for the C-GET operation. Hmm, I admit it's not straight forward to get, I'll probably make that a bit easier next version.
frompynetdicom.sop_classimportPatientRootQueryRetrieveInformationModelGet# assuming this is the query model you're using in `send_c_get()`to_match=PatientRootQueryRetrieveInformationModelGetcxs= [cxforcxinassoc.accepted_contextsifcx.abstract_syntax==to_match]
cx_id=cxs[0].context_id
Might need a bit of tweaking if you're requesting multiple contexts with the same abstract syntax.
Yeah, cancellation must come from the same association.
I am having difficulties to understand
send_c_cancel(msg_id, context_id)
and can't find an easy example for it. From where do I get the context_id?Let's say I want to cancel a
send_c_get
operation with multiple accepted contexts (e.g. by requesting `StoragePresentationContexts´). How do I know which context at the end is used, and how it's context_id is?I found some usage in test_service_qr.py, but I don't understand it either. Why are there two calls directly after each other (
assoc.send_c_cancel(1, 3)
,assoc.send_c_cancel(11142, 1)
). And where do these context IDs come from?And a last question ... I guess the canceling must always come from the same association (maybe from another thread). Is that right?
The text was updated successfully, but these errors were encountered: