How to read incoming dataset from c-find?
See original GitHub issueHello again!
One final piece of the application I’m writing is to perform a c-find to query for patient info, study info and to get all series under a patient/study. I was wondering in the handle_find
handler, on how to read the incoming data set? When I do a
def handle_find(event):
ds = event.identifier
print (ds)
print ('hello world')
return
Nothing regarding this dataset is printed to the screen. Here is the set up code:
handlers = [(evt.EVT_C_FIND, handle_find)]
ae = AE()
ae.ae_title = pacsLocalAETitle
ae.add_supported_context(PatientRootQueryRetrieveInformationModelFind)
scp = ae.start_server(('', int(pacsLocalPort)), block=False, evt_handlers=handlers)
ae.ae_title = pacsLocalAETitle
ae.add_requested_context(PatientRootQueryRetrieveInformationModelFind)
assoc = ae.associate(pacsServerHost, int(pacsServerPort), ae_title=pacsServerAETitle)
if assoc.is_established:
ds = Dataset()
ds.QueryRetrieveLevel = 'PATIENT'
ds.PatientID = patientIDResponse
response = assoc.send_c_find(ds, PatientRootQueryRetrieveInformationModelFind)
for (status, identifier) in response:
pass
assoc.release()
Attached is the output log file received. I simply would like to view fields such as name, sex, birthdate, etc… I would also like to view a study level response and a series level response too (separate calls, but next things to do after this). Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Query/Retrieve (Find) Service Examples - Pydicom |
This is accomplished through the DIMSE C-FIND service. ... from pydicom.dataset import Dataset from pynetdicom import AE, debug_logger from ...
Read more >pynetdicom2 Documentation
store_in_file – indicates if incoming datasets for these SOP Classes ... ds – dataset that is passed to the remote AE with C-FIND...
Read more >C-FIND ERROR
I am using the same database the last 5 years. Search today studies from Radiant viewer fails. I1012 19:21:42.911968 main.cpp:353] Incoming Find request ......
Read more >fo-dicom/fo-dicom - Gitter
Run Store SCP, which will listen for the incoming DICOM transfers. ... cFind object in method GetAllItemsFromWorklistAsync has a DicomDataset. if you want ......
Read more >CFindSCU (Trispark Java Dicom Toolkit 2.70)
An optional response handler can be specified that is invoked per incoming C-FIND response. Parameters: identifier - DicomObject the dataset against which ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you just want a Find SCU, in which case the responses to your query are in the
response
generator as(status, identifier)
. You don’t need the Find SCP, this should be sufficient:The
evt.EVT_C_FIND
handler is only required when you’re acting as a Find SCP (i.e. people are sending you queries).@scaramallion Yes, sorry. Thank you for your help!