Replies: 1 comment
-
pdu = A_ASSOCIATE_RQ()
print(type(pdu.calling_ae_title))
print(pdu.calling_ae_title) This creates a new A_ASSOCIATE_RQ() instance from scratch so it will have the default values. You need to access the A-ASSOCIATE primitive sent during association negotiation: from pynetdicom import AE, evt
from pynetdicom.sop_class import VerificationSOPClass
def handle_request(event):
print(event.assoc.requestor.primitive.calling_ae_title)
ae = AE()
ae.add_supported_context(VerificationSOPClass)
ae.start_server(('', 11112), evt_handlers=[(evt.EVT_REQUESTED, handle_request)]) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm implementing SCP and I'm not sure how to get calling_/called_ae_title correctly.
I'd like to get called_/calling_ae_title during connection(client sending DICOM image) on the server side. I don't enforce called_ae_title(ae.require_called_aet = False), but set default AE title in SCP. I'd like to use the called_/calling_ae_title for audit purpose.
So, what I can see from the debug log from pytnetdicom SCP that this information is available in the A-ASSOCIATE-RQ PDU
According to this document https://pydicom.github.io/pynetdicom/dev/reference/generated/pynetdicom.pdu.A_ASSOCIATE_RQ.html?highlight=calling_ae_title#pynetdicom.pdu.A_ASSOCIATE_RQ.calling_ae_title
I tried this in server side.
My outputs are during connection:
I always got "Default" value instead of real values.
What did I do wrong?
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions