findscu and spaces

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
aedel44
Posts: 4
Joined: Wed, 2008-07-09, 13:31

findscu and spaces

#1 Post by aedel44 »

Hi. I am trying to use findscu with the -k option to search for a value with spaces in it (in this case, field 0008,1030). At first, I used the following query:

findscu -v -S -aet <calling_ae_title> -aec <called_ae_title> -k 0020,0010 -k 0010,0010 -k "0008,1030=C-SPINE 2 OR MORE VIEWS" -k 0008,0050 -k 0010,0020 -k 0008,0052=STUDY -k 0008,0020 -k 0008,0030 <peer> <port>

However, this returned results which matched the string C-SPINE, i.e., everything after the first space in the string was ignored. I've tried several things to fix this. I've used single quotes and double quotes, both around the entire element as shown above and just around the string "C-SPINE 2 OR MORE VIEWS". I've tried escaping the spaces with leading backslashes, using several sets of escaped and unescaped nested quotation marks...I'm running out of ideas.

I've seen references in the forum to strings with spaces, and the query I pasted above seems to be the accepted form. Does anybody have any ideas why it's not working for me?

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Study Description (0008,1030) is optional for the Query/Retrieve SCP. Are you sure that the SCP supports this key for matching? Check the conformance statement for details ...

aedel44
Posts: 4
Joined: Wed, 2008-07-09, 13:31

#3 Post by aedel44 »

It does indeed support this key and it is matching on it. It's just that it's interpreting -k "0008,1030=C-SPINE 2 OR MORE VIEWS" as -k 0008,1030=C-SPINE and matching against that. I do get back results from the search; they're just not the results I wanted.

(Unless I'm misunderstanding and you're trying to say the SCP must be configured in some way to include spaces).

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

What does findscu show in verbose/debug mode?

aedel44
Posts: 4
Joined: Wed, 2008-07-09, 13:31

#5 Post by aedel44 »

I don't know if any of this is any help, but I'll give it all to you. The only thing that looks relevant to me is the fact that the search key findscu seems to have received is C-SPINE and not C-SPINE 2 OR MORE VIEWS
findscu -v -d -S -aet ***** -aec ******** -k 0020,0010 -k 0010,0010 -k "0008,1030=C-SPINE 2 OR MORE VIEWS" -k 0008,0050 -k 0010,0020 -k 0008,0052=STUDY -k 0008,0020 -k 0008,0030 ************** ****

Request Parameters:
Our Implementation Class UID: ***********
Our Implementation Version Name: OFFIS_DCMTK_354
Their Implementation Class UID:
Their Implementation Version Name:
Application Context Name: ************
Calling Application Name: ************
Called Application Name: ************
Responding Application Name: resp AP Title
Our Max PDU Receive Size: 16384
Their Max PDU Receive Size: 0
Presentation Contexts:
Context ID: 1 (Proposed)
Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianExplicit
=BigEndianExplicit
=LittleEndianImplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Requesting Association
Constructing Associate RQ PDU
PDU Type: Associate Accept, PDU Length: 173 + 6 bytes PDU header
02 00 00 00 00 ad 00 01 00 00 49 4d 53 51 41 33
35 31 4d 53 54 31 20 20 20 20 54 45 53 54 41 45
20 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e
32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e
31 2e 31 21 00 00 19 01 00 00 00 40 00 00 11 31
2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
50 00 00 2f 51 00 00 04 00 00 40 00 52 00 00 12
31 2e 32 2e 38 34 30 2e 31 31 34 32 30 32 2e 35
2e 33 55 00 00 0d 49 4d 53 33 2d 35 2d 31 2d 50
31 34 38
Association Parameters Negotiated:
Our Implementation Class UID: ****************
Our Implementation Version Name: OFFIS_DCMTK_354
Their Implementation Class UID: *************
Their Implementation Version Name: *************
Application Context Name: ************
Calling Application Name: ************
Called Application Name: ************
Responding Application Name: ************
Our Max PDU Receive Size: 16384
Their Max PDU Receive Size: 16384
Presentation Contexts:
Context ID: 1 (Accepted)
Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Accepted SCP/SCU Role: Default
Accepted Transfer Syntax: =LittleEndianImplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Association Accepted (Max Send PDV: 16372)
Find SCU RQ: MsgID 1
REQUEST:

# Dicom-Data-Set
# Used TransferSyntax: UnknownTransferSyntax
(0008,0020) DA (no value available) # 0, 0 StudyDate
(0008,0030) TM (no value available) # 0, 0 StudyTime
(0008,0050) SH (no value available) # 0, 0 AccessionNumber
(0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
(0008,1030) LO [C-SPINE] # 8, 1 StudyDescription
(0010,0010) PN (no value available) # 0, 0 PatientsName
(0010,0020) LO (no value available) # 0, 0 PatientID
(0020,0010) SH (no value available) # 0, 0 StudyID
--------
DIMSE Command To Send:

# Dicom-Data-Set
# Used TransferSyntax: UnknownTransferSyntax
(0000,0000) UL 0 # 4, 1 CommandGroupLength
(0000,0002) UI =FINDStudyRootQueryRetrieveInformationModel # 28, 1 AffectedSOPClassUID
(0000,0100) US 32 # 2, 1 CommandField
(0000,0110) US 1 # 2, 1 MessageID
(0000,0700) US 2 # 2, 1 Priority
(0000,0800) US 1 # 2, 1 DataSetType
DIMSE sendDcmDataset: sending 88 bytes
DIMSE sendDcmDataset: sending 78 bytes
DIMSE receiveCommand
DIMSE receiveCommand: 1 pdv's (88 bytes), presID=1
DIMSE Command Received:

# Dicom-Data-Set
# Used TransferSyntax: LittleEndianImplicit
(0000,0002) UI =FINDStudyRootQueryRetrieveInformationModel # 28, 1 AffectedSOPClassUID
(0000,0100) US 32800 # 2, 1 CommandField
(0000,0120) US 1 # 2, 1 MessageIDBeingRespondedTo
(0000,0800) US 258 # 2, 1 DataSetType
(0000,0900) US 65280 # 2, 1 Status
DIMSE receiveFileData: 184 bytes read (last: YES)
RESPONSE: 1 (Pending)

# Dicom-Data-Set
# Used TransferSyntax: LittleEndianImplicit
(0008,0020) DA [********] # 8, 1 StudyDate
(0008,0030) TM [*********** ] # 12, 1 StudyTime
(0008,0050) SH [**********] # 10, 1 AccessionNumber
(0008,0052) CS [STUDY ] # 6, 1 QueryRetrieveLevel
(0008,0054) AE [************] # 12, 1 RetrieveAETitle
(0008,1030) LO [C-SPINE ] # 8, 1 StudyDescription
(0010,0010) PN [******************] # 18, 1 PatientsName
(0010,0020) LO [**********] # 10, 1 PatientID
(0020,0010) SH [***** ] # 6, 1 StudyID
(0020,1206) IS [4 ] # 2, 1 NumberOfStudyRelatedSeries
(0020,1208) IS [131 ] # 4, 1 NumberOfStudyRelatedInstances
--------
DIMSE receiveCommand
DIMSE receiveCommand: 1 pdv's (88 bytes), presID=1
DIMSE Command Received:
(more results and then)
C-Find RSP: MsgID: 1 [Status=Success]
AffectedSOPClassUID: =FINDStudyRootQueryRetrieveInformationModel
Data Set: Not Present
Releasing Association

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#6 Post by Jörg Riesmeier »

There was indeed a bug in findscu which has been fixed in the current snapshot:

Code: Select all

**** Changes from 2007.10.19 (onken)

- Fixed bug in addOverrideKey() that caused problems when parsing a value in a
  tag-value combination if the value contained whitespace characters.
  Thanks to Paul Wijntjes <...> for the bug report.
  Affects: dcmnet/apps/movescu.cc
           dcmnet/libsrc/dfindscu.cc
Last edited by Jörg Riesmeier on Wed, 2008-07-09, 15:25, edited 1 time in total.

aedel44
Posts: 4
Joined: Wed, 2008-07-09, 13:31

#7 Post by aedel44 »

Ah, thank you very much.

Post Reply

Who is online

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