pynetdicom.presentation.negotiate_as_requestor¶
-
pynetdicom.presentation.
negotiate_as_requestor
(rq_contexts, ac_contexts, roles=None)¶ Process the Presentation Contexts as an Association requestor.
The acceptor has processed the requestor’s presentation context definition list and returned the results. We want to do two things:
- Process the SCP/SCU Role Selection Negotiation
- Return a nice list of PresentationContexts with the Results and original Abstract Syntax values to make things easier to use.
Presentation Context Item (RQ)
- Presentation context ID
- Abstract Syntax: one
- Transfer syntax: one or more
Presentation Context Item (AC)
- Presentation context ID
- Result: 0x00, 0x01, 0x02, 0x03, 0x04
- Transfer syntax: one, not to be tested if result is not 0x00
Parameters: - rq_contexts (list of PresentationContext) – The Presentation Contexts sent to the peer as the A-ASSOCIATE’s Presentation Context Definition List.
- ac_contexts (list of PresentationContext) – The Presentation Contexts return by the peer as the A-ASSOCIATE’s Presentation Context Definition Result List.
- roles (dict or None) – If the acceptor has included one or more SCP/SCU Role Selection Negotiation items then this will be a dict of {SOP Class UID : (SCU role, SCP role)}, otherwise None (default)
Returns: The contexts in the returned Presentation Context Definition Result List, with added Abstract Syntax value. Items are sorted in increasing Context ID value and the SCP/SCU roles are set as per the negotiated outcome.
Return type: list of PresentationContext