1

I'm new to DICOM and was wondering how I would be able to return results of a C-FIND similar to how applications like Osirix display them after a query.

I'm doing this strictly in Python with pynetdicom and displaying results back in a GUI. At the moment, I've extracted each identifier separately with regex to display, but this doesn't enable me to incorporate each individual series. I'm running my queries at the 'STUDY' level.

I can query/retrieve and display the identifiers from other PACS, but I'm not sure how to go about displaying the examination results from other PACS databases at the study level and then be able to drop-down and view each series.

I'm just about complete with this test project, and can currently read in DICOM files, add to database upon receiving them, Query/retrieve from various PACS. Display and transfer images received to another archive from local folder. I just cannot figure out the above, there has to be a better way of doing this than how I have it currently configured. See image of how I am currently returning results.

I'm sure this is possible with pynetdicom, I'm just not sure how to go about doing this.

Screen shot

4
  • 1
    If I understand correctly, you want to show series level attributes in a dropdown on study level. This would mean that you need to run an additional query on SERIES level for the concrete study as soon as you need to populate that dropdown. Commented Sep 28, 2021 at 21:26
  • 1
  • Thank you for the answers, MrBean Bremen, that's exactly what I have been looking for. I've been looking into this for a couple of days and what you have said, including Amit Joshi's response @ stackoverflow.com/questions/55486283/… seems to be the answer. I suppose I'll have to code this in to the treeview somehow where as soon as the dropdown is clicked, run additional query on Study UID. Found a similar answer also on dicomeasyblog, but the way you have explained it made sense to me. Thanks both, appreaicte it
    – Sun B
    Commented Sep 29, 2021 at 17:50
  • Well guys, I've managed to accomplish this. Took me all day yesterday, as well as, this morning, but it works! Getting indentations correct was a bit of a headscratcher with this one. It's taken quite a few for loops, which I'm uncomfortable with, but I'm there. My only concern is that running two separate queries doesn't overload PACS in any way, not sure if thats possible?? Assuming querying on STUDY level and then SERIES level is standard practice for all other software that do the same as what I have coded.
    – Sun B
    Commented Sep 30, 2021 at 6:13

1 Answer 1

2

To expand from Study- to Series-Level you would basically form a request like this:

(0008,0052) [SERIES]
(0020,000d) [<the study instance UID that you obtained from the Study-Level query>]
(0020,000e) []

This is the minimum that you need. The QueryRetrieveLevel (0008,0052) indicates that this is a series level query. The Study Instance UID (0020,000d) is a matching key (the only one allowed) to match series of a particular study, and the Series Instance UID (0020,000e) is what you will need to C-MOVE the series at a user's request or to query for images of the series subsequently.

Further attributes on SERIES-Level (and nothing else) may be included with zero-length. This way you are instructing the SCP to fill them in with the values from the database as you already did for the STUDY-Level. Typically the doctor wants to see:

  • Modality (0008,0060)
  • Series Date (0008,0021)
  • Series Time (0008,0031)
  • Series Description (0008,103E)

Note that not all of them are mandatory return keys which means the SCP may return them with zero-length.

Also note that this example refers to the Study-Root Q/R information model. For Patient-Root, you would have to include the Patient ID (0010,0020) as a matching key (= with value) as well to say "Please give me the series of this particular study of this particular patient".

Further recommended reading is the description of the Query/Retrieve Service Class

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.