What is the best way to get the number of responses of a findscu query? For now I am thinking of exporting the responses to an .xml file and count the tags. Is there a better way?
Asked
Active
Viewed 104 times
1 Answers
1
The answer to your question depends on what you mean by "best way".
Using one of findscu's --extract-xxx options and then count the number of created files or, in case of --extract-xml-single, count the number of "dataset" elements would be a possible solution. However, it requires to create output files, which might slow down the process.
Alternatively, you could count the number of lines in the log output that contain the text "Find Response:", i.e. something like the following should work with "bash":
findscu dicomserver.co.uk 11112 -P -k 0008,0052=PATIENT -k 0010,0020 2>&1 | fgrep -c "Find Response:"

J. Riesmeier
- 1,641
- 10
- 14