storescu status

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

storescu status

#1 Post by nicolasdicom »

Hi all,

Please, how can I know if the scorescu operation is finished correctly ?

Is there some kind of ACK or a particular line to read ? If everything is OK I have to write STATUS=FINISHED in database.....but first I need to know about the "storescu" operations's status.


Best regards,

Nicolas

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

#2 Post by Michael Onken »

Easiest way is maybe to just check storescu returns 0 which means success. Any other number means that the transfer has failed.

If you want to be more sophisticated, you should start storescu with more logging (e. g. add "-v -d"). Then check for the line
DIMSE Status : 0x0000: Success
(ignore/adapt whitespaces as necessary).You should as many of those lines as they were images sent. If not, the DIMSE status was different for at least one image and you had an error.

Best regards,
Michael

nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

#3 Post by nicolasdicom »

Hi Michael !

Thanks! I am trying to do a DICOM router, so , I need to know the status of each operation.

--verbose option or default option is ok for me. I'm loading the status into the database .

I'm filtering errors like :


- Calling AE Title Not Recognized
- cannot access file
- Store SCU Failed
- Connection to database failed
(well. in this case I cant do nothing, just save it into the log file).Anyway , as far i saw, the storescu command waits a solved connection and then it continues sending the file.
- Connection refused
- Unknown option

If everything is ok ! then I save the "processed" status into the database.

I would like to ask you just one more thing. Is it enough to read
"Received Store Response", to say that everything is ok ?

I am not sure, but I saw that those words "Received Store Response" only appear when the comand goes fine. Is this true ?

Thanks for your help !

Best Regards,

Nicolas

Example of my log file. You can see many errors.

storescu -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.120 123 "/var/opt/MySystem/DCMQRSCP/CT_4d2b455cdeede13a.dcm"

Code: Select all


----------->> 20110128 16:36:46  Snippet started <<-----------


Destination host unreachable

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.121 12 "/var/opt/MySystem/DCMQRSCP/CT_4d2b4560fb1f4ade.dcm"



F: Association Request Failed: 0006:031b Failed to establish association

F: 0006:0317 Peer aborted Association (or never connected)

F: 0006:031c TCP Initialization Error: Connection refused


----------->> 20110128 16:36:46 Snippet finished <<-----------

----------->> 20110128 16:36:46  Snippet started <<-----------


Destination host unreachable

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.1 1234 "/var/opt/MySystem/DCMQRSCP/CT_4d2b455d4ebe2eff.dcm"

archivo nuevo (otra copia)

F: Association Request Failed: 0006:031b Failed to establish association

F: 0006:0317 Peer aborted Association (or never connected)

F: 0006:031c TCP Initialization Error: Connection refused


----------->> 20110128 16:36:46 Snippet finished <<-----------

----------->> 20110128 16:36:50  Snippet started <<-----------


Port Error

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.12 123 "/var/opt/MySystem/DCMQRSCP/CT_4d2b45605edd36ea.dcm"



F: Association Request Failed: 0006:031b Failed to establish association

F: 0006:0317 Peer aborted Association (or never connected)

F: 0006:031c TCP Initialization Error: No route to host


----------->> 20110128 16:36:50 Snippet finished <<-----------

----------->> 20110128 16:36:50  Snippet started <<-----------


Destination host unreachable

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.120 123 "/var/opt/MySystem/DCMQRSCP/CT_4d2b455cdeede13a.dcm"



F: Association Request Failed: 0006:031b Failed to establish association

F: 0006:0317 Peer aborted Association (or never connected)

F: 0006:031c TCP Initialization Error: Connection refused


----------->> 20110128 16:36:50 Snippet finished <<-----------

----------->> 20110128 16:36:52  Snippet started <<-----------


cannot access file

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.120 1234 "/var/opt/MySystem/DCMQRSCP/CT_4d2b455ff6fcdef1.dcm11111"



F: cannot access file: /var/opt/MySystem/DCMQRSCP/CT_4d2b455ff6fcdef1.dcm11111


----------->> 20110128 16:36:52 Snippet finished <<-----------

----------->> 20110128 16:36:52  Snippet started <<-----------


cannot access file

storescu   -xs -aet DCMQRSCP -aec REMOTESYSTEM 192.168.0.120 1234 "/var/opt/MySystem/DCMQRSCP/CT_4d2b455fffead87b.dcm22222"



F: cannot access file: /var/opt/MySystem/DCMQRSCP/CT_4d2b455fffead87b.dcm22222


----------->> 20110128 16:36:52 Snippet finished <<-----------




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 »

I would not recommend to parse the error messages produced by the command line tool, because they are likely to change from version to version. You should better start with a new program based on the library functions and classes.

Of course, for fatal errors, i.e. errors that cause the application to terminate, different exit codes would be interesting. However, this is still on our to-do list. The new tools stcomscu and mppsscu already provide this feature.

nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

#5 Post by nicolasdicom »

:shock: :shock: :shock: :shock: :shock:

That's a big true.

I am developing with lazarus/delphi/java... so, I am in troubles

Thanks for the advice Jörg,

Best Regards,

Nicolas

:shock: :shock: :shock: :shock: :shock:

nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

#6 Post by nicolasdicom »

Oh !

I have read

""The new tools stcomscu and mppsscu already provide this feature.""

So, I can use stcomscu tool instead of storescu ? rigth ?


that's great

Code: Select all

general

EXITCODE_NO_ERROR                        0
EXITCODE_COMMANDLINE_SYNTAX_ERROR        1

input file errors

EXITCODE_CANNOT_READ_INPUT_FILE         20 (*)
EXITCODE_NO_INPUT_FILES                 21
EXITCODE_INVALID_INPUT_FILE             22
EXITCODE_NO_VALID_INPUT_FILES           23
EXITCODE_INVALID_OUTPUT_DIRECTORY       24

output file errors

EXITCODE_CANNOT_WRITE_OUTPUT_FILE       40 (*)
EXITCODE_CANNOT_WRITE_REQUEST_FILE      41
EXITCODE_CANNOT_WRITE_RESPONSE_FILE     42
EXITCODE_CANNOT_WRITE_REPORT_FILE       43
EXITCODE_CANNOT_WRITE_TRANSACTION_FILE  44

network errors

EXITCODE_CANNOT_INITIALIZE_NETWORK      60
EXITCODE_CANNOT_NEGOTIATE_ASSOCIATION   61
EXITCODE_CANNOT_SEND_REQUEST            62
EXITCODE_CANNOT_WAIT_FOR_RESPONSE       63
EXITCODE_CANNOT_START_SCP_AND_LISTEN    64


Regards

Nicolas

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

#7 Post by Jörg Riesmeier »

No, as you can read in the referenced man page, "stcomscu" is a DICOM Storage Commitment SCU (and not a Storage SCU).

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 1 guest