pynetdicom.presentation.negotiate_as_acceptor

pynetdicom.presentation.negotiate_as_acceptor(rq_contexts: List[PresentationContext], ac_contexts: List[PresentationContext], roles: Dict[UID, Tuple[bool | None, bool | None]] | None = None) Tuple[List[PresentationContext], List[SCP_SCU_RoleSelectionNegotiation]][source]

Process the Presentation Contexts as an Association Acceptor.

Parameters:
  • rq_contexts (list of PresentationContext) – The Presentation Contexts proposed by the peer. Each item has values for Context ID, Abstract Syntax and Transfer Syntax.

  • ac_contexts (list of PresentationContext) – The Presentation Contexts supported by the local AE when acting as an Association Acceptor. Each item has values for Context ID, Abstract Syntax and Transfer Syntax.

  • roles (dict or None) – If the Requestor 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:

  • list of PresentationContext – The accepted presentation context items, each with a Result value a Context ID, an Abstract Syntax and one Transfer Syntax item. Items are sorted in increasing Context ID value.

  • list of SCP_SCU_RoleSelectionNegotiation – If roles is not None then this is a list of SCP/SCU Role Selection Negotiation items that can be sent back to the Requestor.