DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Fri, 2014-10-31, 22:10

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Movescu Key problem?
PostPosted: Thu, 2006-07-27, 15:36 
Offline

Joined: Thu, 2006-07-27, 01:12
Posts: 2
Greetings,
I am mantaining someone else's code and after upgrading dctk to 3.5.4, am having trouble calling movescu from the command line. I am using Linux FC5 and here is the command as it is being used:

movescu -v --study --port 15100 -aet ted1ae -aec med_imFIR -aem ted1ae -k 0008,0052=STUDY -k 0020,000D=1.2.124.113532.129.255.5.220.20030814.233437.2243986 med_im 104

and I get the following error:
15:36:21,611 ERROR dx.MediStoreClient - $dcmtk: movescu v3.5.4 2005-12-20 $
15:36:21,611 ERROR dx.MediStoreClient -
15:36:21,611 ERROR dx.MediStoreClient - movescu: DICOM retrieve (C-MOVE) SCU
15:36:21,612 ERROR dx.MediStoreClient - error: bad key format or key not found in dictionary: 0020,000D=1.2.124.113532.129.255.5.220.20030814.233437.2243986
15:36:21,611 ERROR MediPrimeClient.51 0 - Script error: java.io.IOException: $dcmtk: movescu v3.5.4 2005-12-20 $

I checked the Dicom.dic file and studyInstanceuid exists:

(0020,000D) UI StudyInstanceUID 1 dicom98

I then saw a post somwhere by Michael saying there was a known bug with using keys in move scu and a patch exists? If this is the case, is it possible for me to get a copy of the patch if you think it would help solve the above problem?

Regards,
Ted


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2006-07-28, 14:48 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2220
Location: Oldenburg, Germany
Here's the diff:

Code:
diff -r1.59 -r1.60
24,25c24,25
<  *  Last Update:      $Author: meichel $
<  *  Update Date:      $Date: 2005/12/08 15:44:20 $
---
>  *  Last Update:      $Author: onken $
>  *  Update Date:      $Date: 2006/01/17 15:38:50 $
27c27
<  *  CVS/RCS Revision: $Revision: 1.59 $
---
>  *  CVS/RCS Revision: $Revision: 1.60 $
150a151
>     OFString dicName, valStr;
153d153
<
155d154
<     n = sscanf(s, "%x,%x=%s", &g, &e, val);
157,158c156,169
<     if (n != 2) {
<       // not a group-element pair, try to lookup in dictionary
---
>     // try to parse group and element number
>     n = sscanf(s, "%x,%x=%s", &g, &e, val);
>     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
161c172
<       const DcmDictEntry *dicent = globalDataDict.findEntry(s);
---
>       const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
171,172c182,183
<         msg = "bad key format or key not found in dictionary: ";
<         msg += s;
---
>         msg = "bad key format or dictionary name not found in dictionary: ";
>         msg += dicName;
176,189c187,188
<     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;
200,201c199,200
<     if (strlen(val) > 0) {
<         elem->putString(val);
---
>     if (valStr.length() > 0) {
>         elem->putString(valStr.c_str());
206c205
<             msg += val;
---
>             msg += valStr;
1409a1409,1412
> ** Revision 1.60  2006/01/17 15:38:50  onken
> ** Fixed "--key" option, which was broken when using the optional assignment ("=")
> ** operation inside the option value
> **


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2006-07-28, 14:52 
Offline

Joined: Thu, 2006-07-27, 01:12
Posts: 2
Well, the complete source would be easier to recompile as I am not that familiar with diff.
can it be sent to actaeus AT yahoo.com? Thanks :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2006-08-24, 12:57 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2220
Location: Oldenburg, Germany
We are now providing a patched version of the findscu and movescu source code on our ftp server:
ftp://dicom.offis.de/pub/dicom/offis/so ... 354/patch/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group