Logging Remote AE Title for StoreSCP

115 views
Skip to first unread message

Ed McDonagh

unread,
Sep 4, 2015, 9:32:35 PM9/4/15
to pynetdicom
Hello Patrice, all

Is there a way of logging the AE Title of the source of incoming DICOM when running a Store SCP?

I have tried adding a second line to OnAssociateRequest:

def OnAssociateRequest(association):
   
print "association requested"
    print association.RemoteAE

But the answer I get is None...

Any ideas?

Thanks

Ed

(Using pynetdicom for OpenREM: http://bitbucket.org/openrem/openrem)

Patrice Munger

unread,
Sep 7, 2015, 6:04:14 PM9/7/15
to pynetdicom


Hi Ed,


Did you try association.CallingAETitle?

Ed McDonagh

unread,
Sep 8, 2015, 9:54:22 AM9/8/15
to pynetdicom
No, but that doesn't work for me either.

If I log all the attributes;
# callbacks
def OnAssociateRequest(association):
    logging
.warning("Associaion request from %s", dir(association))
   
print "association requested"
then I get:
Associaion request from ['ACSE', 'AE', 'Abort', 'AssociationEstablished', 'AssociationRefused', 'ClientSocket', 'DIMSE', 'DUL', 'GetSOPClass', 'Kill', 'Mode', 'Release', 'RemoteAE', 'SCU', 'SOPClassesAsSCP', 'SOPClassesAsSCU', '_Kill', '_Thread__args', '_Thread__block', '_Thread__bootstrap', '_Thread__bootstrap_inner', '_Thread__daemonic', '_Thread__delete', '_Thread__exc_clear', '_Thread__exc_info', '_Thread__ident', '_Thread__initialized', '_Thread__kwargs', '_Thread__name', '_Thread__started', '_Thread__stderr', '_Thread__stop', '_Thread__stopped', '_Thread__target', '_Verbose__verbose', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_block', '_note', '_reset_internal_locks', '_set_daemon', '_set_ident', 'daemon', 'getName', 'ident', 'isAlive', 'isDaemon', 'is_alive', 'join', 'name', 'run', 'setDaemon', 'setName', 'start']

So I tried

# callbacks
def OnAssociateRequest(association):
    logging
.warning("Associaion request between %s and %s", association.AE and association.RemoteAE)
   
print "association requested"
with the following result:
Associaion request between <AE(STOREOPENREM, started daemon 139896325490432)> and None

which looks to me like the RemoteAE variable isn't populated somewhere.

The other end, ie the StoreSCU, is the OFFIS dcmtk QRSCP. 

Any clues?

Thanks

Ed
 

Ed McDonagh

unread,
Sep 8, 2015, 11:56:52 AM9/8/15
to pynetdicom
Oops. Just noticed a transcription error. The second code quotation should have been:

# callbacks
def OnAssociateRequest(association):
    logging.warning("Associaion request between %s and %s", association.AE, association.RemoteAE)
    print "association requested"

Erik Kouwenhoven

unread,
Jan 25, 2016, 7:48:04 AM1/25/16
to pynetdicom
I have the same problem: would like to know the AE title of the sender. When I request the interface of the Association object I get less items than you:

dir(netdicom.applicationentity.Association)
['Abort', 'GetSOPClass', 'Kill', 'Release', 'SCU', '_Thread__bootstrap', '_Thread__bootstrap_inner', '_Thread__delete', '_Thread__exc_clear', '_Thread__exc_info', '_Thread__initialized', '_Thread__stop', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_block', '_note', '_reset_internal_locks', '_set_daemon', '_set_ident', 'daemon', 'getName', 'ident', 'isAlive', 'isDaemon', 'is_alive', 'join', 'name', 'run', 'setDaemon', 'setName', 'start']
>>>

Op dinsdag 8 september 2015 17:56:52 UTC+2 schreef Ed McDonagh:
Reply all
Reply to author
Forward
0 new messages