problem findscu

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
celine18
Posts: 15
Joined: Fri, 2006-07-07, 10:48

problem findscu

#1 Post by celine18 »

hello!
I had a problem this morning with findscu command. That was normal as it came from the version of dcmtk. I replaced the findscu.exe and the findscu.cc, and the problem with the query level seems to be resolved. But now, I have another one!! Here is my command:

findscu -P 0008,0052="patient" -k 0010,0010 -k 0010,0030 -k 0010,0040 @IP_peer 1115 -aec SCP_name

1115 is the peer port (of course!!) and when I write this, I obtain the following error:

error: cannot access file: 1115

what's wrong with my syntax?

Thanks...

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hmm,
the -P option should be used without any argument (0008,0052="patient" in your posting, otherwise findscu interprets this value already as the peer parameter) and you should remove the @ before the IP adress or hostname (if it's actually in your commandline), so try something like

findscu -P -k 0010,0010 -k 0010,0030 -k 0010,0040 IP_peer 1115 -aec SCP_name


Regards,
Michael

celine18
Posts: 15
Joined: Fri, 2006-07-07, 10:48

#3 Post by celine18 »

If I erase "0008,0052="patient"", it doesn't work... I have an error message on my SCP:

getQRLevel_qrs(MC_Get_Value_To_String): Tag Parameter invalid

I don't really undersyand what that means, but I presume that the query level is missing...!And if ùI erase the "-P", the association is rejected with "No Reason" !!!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

my fault, the '0008,0052="patient"' does not to be a option value of -P or left out, but has to be the value of another -k option. So insert -k option before the value:

findscu -P -k 0008,0052="patient" -k 0010,0010 -k 0010,0030 -k 0010,0040 IP_peer 1115 -aec SCP_name


Hope that works, I can't test it at the moment.

celine18
Posts: 15
Joined: Fri, 2006-07-07, 10:48

#5 Post by celine18 »

No! it doesn't work! But I have the same error as this morning:

error: bad key format or dictionary name not found in dictionary: 0008,0052=patient

May be I didn't do good things with the source code you sent me...
I replaced findscu.exe in the directory C:\Program Files\Microsoft Visual Studio\COMMON\IDE\IDE98\dcmnet\apps\debug, I replaced findscu.cc in the source (what I downloaded from internet), and I configured again CMake, by clicking again on "Configure" and "ok"....
Did I miss something or made a mistake?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#6 Post by Michael Onken »

That's the bug again, correct.

If you use the binaries, be sure to start the correct binary (the one you replaced).

And if you want to build it from source, be sure to rename the files to extension .cxx as need for windows (and of course recompile it, running cmake is not necessary).

I'm quite sure that I've sent the correct files ;)

Regards,
Michael

celine18
Posts: 15
Joined: Fri, 2006-07-07, 10:48

#7 Post by celine18 »

Hello!
I am sorry, but I really don't understand what's wrong!
I replaced findscu.cxx in my source, but when I compile it, the findscu.exe generated doen't seem to be the same as the one you sent me (it doesn't have the same size...)
So, I just replaced the findscu.exe in the directory C:\Program Files\Microsoft Visual Studio\COMMON\IDE\IDE98\dcmnet\apps\debug, and wrote the following command:

C:\Program Files\Microsoft Visual Studio\COMMON\IDE\IDE98\dcmnet\apps\debug>findscu -P -k 0008,0052="patient" -k 0010,0010 -k 0010,0030 -k 0010,0040 IP_peer 1115 -aec SCP_name

And here is what I obtain:

Response: Failed: IdentifierDoesNotMatchSOPClass
findscu: Association Release Failed:
0006:0317 Peer aborted Association <or never connected>


I don't understand!!

pim_philipse
Posts: 11
Joined: Wed, 2004-11-10, 10:17

#8 Post by pim_philipse »

Try

... -k 0008,0052=PATIENT ...

So no quotes, and upper case.
The only time quotes are useful is when they will prevent metacharacters like space and ^ from being eaten by cmd.exe, but then they should surround the entire argument, like

... -k "0010,0010=ALMA TADEMA^LAURENS"

Pim.

m.bouthors
Posts: 5
Joined: Thu, 2006-06-15, 10:07

#9 Post by m.bouthors »

I've got the same bug when trying to use findscu with -k command line option on linux.

error: bad key format or dictionary name not found in dictionary: 0008,0052=patient

I understood that a fix is available on request. How should I request it ?

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

#10 Post by Jörg Riesmeier »

Here's the diff:

Code: Select all

diff -r1.47 -r1.48
24,25c24,25
<  *  Last Update:      $Author: meichel $
<  *  Update Date:      $Date: 2005/12/08 15:44:19 $
---
>  *  Last Update:      $Author: onken $
>  *  Update Date:      $Date: 2006/01/17 15:38:50 $
27c27
<  *  CVS/RCS Revision: $Revision: 1.47 $
---
>  *  CVS/RCS Revision: $Revision: 1.48 $
114d113
<
121a121
>     OFString dicName, valStr;
124d123
<
125a125
>
128,130c128,139
<
<     if (n != 2) {
<       // not a group-element pair, try to lookup in dictionary
---
>     if (n < 2) {
>       // try to parse dictionary name and value instead
>       OFString toParse = s;
>       size_t eqPos = toParse.find('=');
>       if (eqPos != string::npos)
>       {
>         dicName = toParse.substr(0,eqPos).c_str();
>         valStr = toParse.substr(eqPos+1,toParse.length());
>       }
>       else
>         dicName = s; // only dictionary name given (without value)
>       // try to lookup in dictionary
133c142
<       const DcmDictEntry *dicent = globalDataDict.findEntry(s);
---
>       const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
144c153
<         msg += s;
---
>         msg += dicName;
148,161c157,158
<     const char* spos = s;
<     char ccc;
<     do
<     {
<       ccc = *spos;
<       if (ccc == '=') break;
<       if (ccc == 0) { spos = NULL; break; }
<       spos++;
<     } while(1);
<
<     if (spos && *(spos+1)) {
<         strcpy(val, spos+1);
<     }
<
---
>     else
>       valStr = val;
172,173c169,170
<     if (strlen(val) > 0) {
<         elem->putString(val);
---
>     if (valStr.length() > 0) {
>         elem->putString(valStr.c_str());
178c175
<             msg += val;
---
>             msg += valStr;
191a189
>
1166a1165,1168
> ** Revision 1.48  2006/01/17 15:38:50  onken
> ** Fixed "--key" option, which was broken when using the optional assignment ("=")
> ** operation inside the option value
> **

Post Reply

Who is online

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