Weasis comand syntax: dicom:rs

360 views
Skip to first unread message

Victor S

unread,
Dec 23, 2019, 3:36:47 AM12/23/19
to dcm4che
Hello and happy holidays

I have Weasis installed and working fine with a DCM4CHEE server. 
I configured the DCM4CHEE server in Weasis 3.5.4, in "File/Preferences", "DICOM node list", "DICOM node" -> "ADD New" with the following properties:
AE Title: DCM4CHEE
Hostname: 10.116.84.126
Port: 11112
Usage type: Retrieve
Using these settings I can successfully retrieve studies from the DICOM server but I need to display studies programmatically so I would like to use Weasis commands.

I read the commands from here and I can successfully connect to "Apache Felix gogo" with "telnet localhost 17179" but I can't find the right syntax to load a study.
I tried many commands but I got no success yet. This is what I tried last: 
dicom:rs --url "http://10.116.84.126:11112/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&studyUID={1.3.12.2.1107.5.3.34.31085.1.20190710173010}" --query-ext "&includedefaults=false"

Thank you

Leonid Toporkov

unread,
Dec 23, 2019, 4:04:16 AM12/23/19
to dcm...@googlegroups.com
1. URL should be encoded before passing it to weasis?
2. weasis command should start with $, like "$dicom:get -w ....." or "$dicom:rs ..."
3. command line launch: "open weasis://{}

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/04cc34a7-cd4f-4297-8ca7-abe7d7662cf5%40googlegroups.com.

Victor S

unread,
Dec 23, 2019, 4:41:58 AM12/23/19
to dcm...@googlegroups.com
1. I don't use a browser so I don't think I need to encode the URL - I just try to use telnet as described here: https://nroduit.github.io/en/basics/commands/
    I also tried a browser but I think telnet should be more easy to debug as I remove some complexity.
2. In telnet mode, according to documentation from the link above, there should be no $ before the command.
3. Weasis is already opened, otherwise I could not connect with telnet.

But I did tried to encode the url and to add $ before the command but in those cases I receive the error: "gogo: SyntaxError: bad expression:"
I think the URL is wring but I don't know what to write. 
When I execute this command:
dicom:rs --url "http://10.116.84.126:11112/dcm4chee-arc/aets/DCM4CHEE/rs" -"&studyUID={1.3.12.2.1107.5.3.34.31085.1.20190710173010}" --query-ext "&includedefaults=false"
in weasis logs I can see the folowing message: 
23.12.2019 11:26:54.078 *DEBUG* [Dicom Model-pool-8-thread-1] org.weasis.dicom.explorer.rs.RsQueryResult: QIDO-RS request: http://10.116.84.126:11112/dcm4chee-arc/aets/DCM4CHEE/rs/studies?0020000D={1.3.12.2.1107.5.3.34.31085.1.20190710173010}&includefield=00080020,00080030,00080050,00080061,00080090,00081030,00100010,00100020,00100021,00100030,00100040,0020000D,00200010&includedefaults=false
23.12.2019 11:26:54.192 *WARN* [Dicom Model-pool-8-thread-1] org.weasis.core.api.util.NetworkUtil: http Status -1 - null
23.12.2019 11:26:54.192 *ERROR* [Dicom Model-pool-8-thread-1] org.weasis.dicom.explorer.rs.RsQueryResult: QIDO-RS with studyUID {1.3.12.2.1107.5.3.34.31085.1.20190710173010} org.weasis.core.api.util.StreamIOException
 at org
.weasis.core.api.util.NetworkUtil.readResponse(NetworkUtil.java)


In the wildfly log I have:
11:30:12,446 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) /10.116.84.126:11112<-/10.8.15.10:51592(2): i/o exception: java.io.EOFException in State: Sta2 - Transport connection open
11:30:12,447 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) /10.116.84.126:11112<-/10.8.15.10:51592(2): close Socket[addr=/10.8.15.10,port=51592,localport=11112]
11:30:20,109 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-2) Accept connection Socket[addr=/10.8.15.10,port=52130,localport=11112]
11:30:20,111 WARN  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) /10.116.84.126:11112<-/10.8.15.10:52130(4): unrecognized PDU[type=71, len=1411395428]
11:30:20,111 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-8) /10.116.84.126:11112<-/10.8.15.10:52130(4) << A-ABORT[source: 2 - service-provider, reason: 1 - unrecognized-PDU]
11:30:20,161 INFO  [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-1) /10.116.84.126:11112<-/10.8.15.10:52130(4): close Socket[addr=/10.8.15.10,port=52130,localport=11112]
I don't know what "unrecognized PDU" means.
I think the URL is wrong - port I used is 11112 so tried with the port 8080 - so the URL is now http://10.116.84.126:8080/dcm4chee-arc/aets/DCM4CHEE/rs
I also tried with a access_token like this:
dicom:rs --url "http://10.116.84.126:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&studyUID={1.3.12.2.1107.5.3.34.31085.1.20190710173010}" --query-ext "&includedefaults=false" -H "Authorization: &access_token={...long string....}"
In this case the Weasis error is:
23.12.2019 11:31:57.429 *DEBUG* [Dicom Model-pool-8-thread-1] org.weasis.dicom.explorer.rs.RsQueryResult: QIDO-RS request: http://10.116.84.126:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies?0020000D={1.3.12.2.1107.5.3.34.31085.1.20190710173010}&includefield=00080020,00080030,00080050,00080061,00080090,00081030,00100010,00100020,00100021,00100030,00100040,0020000D,00200010&includedefaults=false
23.12.2019 11:31:57.537 *WARN* [Dicom Model-pool-8-thread-1] org.weasis.core.api.util.NetworkUtil: http Status 400 - Bad Request
23.12.2019 11:31:57.537 *ERROR* [Dicom Model-pool-8-thread-1] org.weasis.dicom.explorer.rs.RsQueryResult: QIDO-RS with studyUID {1.3.12.2.1107.5.3.34.31085.1.20190710173010} org.weasis.core.api.util.StreamIOException: Bad Request
 at org
.weasis.core.api.util.NetworkUtil.readResponse(NetworkUtil.java)

and at Wildfly log I have nothing in this case.

I think I'm missing something essential.


Thank you.
 

Nicolas Roduit

unread,
Dec 23, 2019, 11:31:11 AM12/23/19
to dcm4che
From telnet, you can try the following command to download directly from the Orthanc web PACS:

dicom:rs --url "https://demo.orthanc-server.com/dicom-web" -r "patientID=5Yp0E" --accept-ext=";"

The URL configuration for dcm4chee UI is specific (to inject some variables like the UIDs). The common syntax of QUERYPARAMS in dicom:rs is derived from weasis-pacs-connector or IID IHE profile. Try to replace:

dicom:rs --url "http://10.116.84.126:11112/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&studyUID={1.3.12.2.1107.5.3.34.31085.1.20190710173010}" --query-ext "&includedefaults=false"
with
dicom:rs --url "http://10.116.84.126:11112/dcm4chee-arc/aets/DCM4CHEE/rs" -r "studyUID=1.3.12.2.1107.5.3.34.31085.1.20190710173010" --query-ext "&includedefaults=false"
Message has been deleted

Kirill K

unread,
Mar 10, 2020, 3:32:08 AM3/10/20
to dcm4che
Also trying to launch weasis from command line like this:
PS C:\Program Files\Weasis> .\weasis $dicom:rs --url "http://pacsrack.belroza.local:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -r "&patientID=2"  --query-ext "&includedefaults=false"
Weasis opens but does not load any images, not showing any errors either.
Whats the mistake?
Weasis 3.5.4, dcm4chee-arc 5.21


понедельник, 23 декабря 2019 г., 11:36:47 UTC+3 пользователь Victor S написал:

Nicolas Roduit

unread,
Mar 10, 2020, 4:40:45 AM3/10/20
to dcm4che
The question above was about how to use commands through telnet. It would be useful for readers to create a new post so that they can follow a discussion about only one topic.

Start by reading how to use the weasis protocol: https://nroduit.github.io/en/getting-started/weasis-protocol/
You don't' need to know where weasis is installed and you must encode the command part with an online URL encoder or from your favorite script language.
Reply all
Reply to author
Forward
0 new messages