How to query using FINDSCU for a specific study UID

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to query using FINDSCU for a specific study UID

#16 Post by J. Riesmeier »

Even without redirecting the output?

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#17 Post by kpandrew »

Correct. Even if I don't redirect the input, the +sr appears to do nothing.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to query using FINDSCU for a specific study UID

#18 Post by J. Riesmeier »

In case you do not use any additional command line option (than the ones you've listed in your previous postings), something is fishy...

I just tested DCMTK's findscu in version 3.6.3 on Linux and Windows and the default behavior (i.e. even without +sr) is as expected.

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#19 Post by kpandrew »

I don't use any additional parameters. Did you also test against an SUID that exists and one that does not? What did your output look like?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to query using FINDSCU for a specific study UID

#20 Post by J. Riesmeier »

In case of a matching Study Instance UID, I get the C-FIND-RSP dataset. In case the Study does not exist, the output is empty (since there is no matching dataset).

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#21 Post by kpandrew »

Well, just for grins, let me double-check that the study I believe to exist really does exist. I think I checked that at the beginning, but one can never be too sure. :-)

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#22 Post by kpandrew »

I tried a new, verified study UID and then took out one character to make it fail. This was my command line:

for /f %i in (suid.txt) do findscu -v -S -aec ebp-da01FIR -k QueryRetrieveLevel=STUDY -k (0020,000d)="%i" 10.183.4.239 104 >> temp.txt

Here's what I got:

I: Requesting Association
I: Association Accepted (Max Send PDV: 32756)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
I: (0020,000d) UI [2.16.840.1.114151.2780550056125408276825261125116939723720181030] # 64, 1 StudyInstanceUID
I:
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [STUDY ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ebp-da01FIR ] # 12, 1 RetrieveAETitle
I: (0020,000d) UI [2.16.840.1.114151.2780550056125408276825261125116939723720181030] # 64, 1 StudyInstanceUID
I:
I: Received Final Find Response (Success)
I: Releasing Association
I: Requesting Association
I: Association Accepted (Max Send PDV: 32756)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
I: (0020,000d) UI [2.16.80.1.114151.2780550056125408276825261125116939723720181030] # 64, 1 StudyInstanceUID
I:
I: Received Final Find Response (Success)
I: Releasing Association

So the good one has this line:

I: (0008,0054) AE [ebp-da01FIR ] # 12, 1 RetrieveAETitle

and the bad one does not. I can work with this. Thanks for all your help!

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#23 Post by kpandrew »

So I was wrong before. I am getting exactly the same result whether the study UID exists on the called AET or not. What am I doing wrong? Thanks again!

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to query using FINDSCU for a specific study UID

#24 Post by J. Riesmeier »

No, you don't get the same result: for 2.16.840.1.114151.2780550056125408276825261125116939723720181030 you get a response dataset (first C-FIND-RSP message with status PENDING), for 2.16.80.1.114151.2780550056125408276825261125116939723720181030 you don't get a response dataset (but only the final C-FIND-RSP message with status SUCCESS). This is exactly how the DICOM Query/Retrieve service works.

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#25 Post by kpandrew »

Oh. Cool. I thought Pending meant it hadn't decided yet. Does Pending actually mean that it's confirmed that the study present on the called AE? That's actually all I'm looking for anyway. Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to query using FINDSCU for a specific study UID

#26 Post by J. Riesmeier »

If you don't know what the DIMSE status PENDING means, you don't know how the Q/R Service (and the underlying C-FIND message) works ;-)
Does Pending actually mean that it's confirmed that the study present on the called AE?
PENDING means "Matching are continuing". Actually, there are two different types of PENDING: status code FF00 means "Current Match is supplied and any Optional Keys were supported in the same manner as Required Keys." and FF01 means "Warning that one or more Optional Keys were not supported for existence and/or matching for this Identifier." (see DICOM standard).

The final C-FIND-RSP message usually has the DIMSE status SUCCESS (0000), i.e. no error occurred.

kpandrew
Posts: 15
Joined: Tue, 2018-10-23, 08:06

Re: How to query using FINDSCU for a specific study UID

#27 Post by kpandrew »

You're right, I don't. Thanks for clearing it up!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest