Skip to content

Commit 51383e0

Browse files
committed
Fix encoding in recent browsers. Use query param in weasis protocol
1 parent 8edabc9 commit 51383e0

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

.github/workflows/hugo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
build:
3333
runs-on: ubuntu-latest
3434
env:
35-
HUGO_VERSION: 0.140.2
35+
HUGO_VERSION: 0.145.0
3636
HUGO_GH_TOKEN: ${{ secrets.HUGO_GH_TOKEN }}
3737
steps:
3838
- name: Install Hugo CLI

content/basics/customize/build-plugins.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ To test the plugin with an installed version of Weasis without making any change
130130
- Build a valid URI with the above parameter (see [How to build an URI](../../../getting-started/weasis-protocol/#how-to-build-a-uri)) and launch Weasis from the command on a terminal:Construct a valid URI using the parameter mentioned above (refer to [How to build a URI](../../../getting-started/weasis-protocol/#how-to-build-a-uri))) and launch Weasis from the terminal using a command:
131131
{{< tabs groupid="launchPlugin">}}
132132
{{% tab title="Windows" %}}
133-
start weasis://%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2FD%3A%2Fgit%2Fmyplugin%2Fmyplugin.json%22
133+
start weasis://?%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2FD%3A%2Fgit%2Fmyplugin%2Fmyplugin.json%22
134134
{{% /tab %}}
135135
{{% tab title="Linux" %}}
136-
xdg-open weasis://%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2Fgit%2Fmyplugin%2Fmyplugin.json%22
136+
xdg-open weasis://?%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2Fgit%2Fmyplugin%2Fmyplugin.json%22
137137
{{% /tab %}}
138138
{{% tab title="macOS" %}}
139-
open weasis://%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2Fgit%2Fmyplugin%2Fmyplugin.json%22
139+
open weasis://?%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2Fgit%2Fmyplugin%2Fmyplugin.json%22
140140
{{% /tab %}}
141141
{{< /tabs >}}
142142

content/basics/customize/integration.en.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ or by [building your own connector](#build-your-own-connector). The launch of th
1313
Using [weasis-pacs-connector](https://github.com/nroduit/weasis-pacs-connector) or [ViewerHub](../../../viewer-hub) allows a high degree of integration and facilitates connection to a PACS. Here are some of the advantages:
1414

1515
- Automatically build a manifest according to a configuration with a PACS
16-
- The initial URL starts with HTTP and is then redirected to weasis:// (useful when custom URI scheme is not allowed by wiki, blog platforms, etc.)
16+
- The initial URL starts with HTTP and is then redirected to weasis://? (useful when custom URI scheme is not allowed by wiki, blog platforms, etc.)
1717
- Efficiently manages to build the manifest simultaneously with the start of Weasis, optimizing loading time
1818
- Easily handles secure manifest requests and manages tokens for the DICOMWeb services
1919

@@ -135,15 +135,15 @@ Use [$dicom:rs](../../commands/#dicomrs) to load DICOM files. Here are some conf
135135

136136
This configuration requires at least dcm4chee-arc-light 5.22.2 and Weasis 3.6.0. To activate Weasis in dcm4chee-arc-light user interface, you need to add the four following properties in the web portal from the left menu *Configuration > Devices > dcm4chee-arc > Extensions > Edit extension > Child Objects > Web Applications > DCM4CHEE*
137137
{{< highlight text >}}
138-
IID_PATIENT_URL=weasis://$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
139-
IID_STUDY_URL=weasis://$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
138+
IID_PATIENT_URL=weasis://?$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
139+
IID_STUDY_URL=weasis://?$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
140140
IID_URL_TARGET=_self
141141
{{< /highlight >}}
142142

143143
The properties can also be passed directly to the docker-compose.env file:
144144
{{< highlight text >}}
145-
IID_PATIENT_URL=weasis://$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "\&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
146-
IID_STUDY_URL=weasis://$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "\&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
145+
IID_PATIENT_URL=weasis://?$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "\&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
146+
IID_STUDY_URL=weasis://?$dicom:rs --url "{{qidoBaseURL}}{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "\&includedefaults=false" -H "Authorization: Bearer {{access_token}}"
147147
IID_URL_TARGET=_self
148148
{{< /highlight >}}
149149

content/getting-started/weasis-protocol.en.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@ keywords: [ "web", "launch", "dicom viewer", "free dicom viewer", "open source d
55
weight: 15
66
---
77

8-
The **Weasis Protocol** enables the launch of Weasis (starting from {{< badgeC "v3.6.0" >}}) in a web context using a specific URI scheme: `weasis://commands`.
8+
The **Weasis Protocol** enables the launch of Weasis (starting from {{< badgeC "v3.6.0" >}}) in a web context using a specific URI scheme: `weasis://?commands`.
99

1010
### How to Use the Weasis Protocol
1111

1212
To launch Weasis from various contexts:
13-
1. **From a Web Page**: Create a link that begins with `weasis://` (see below [How to build an URI](#how-to-build-a-uri)).<br>
13+
1. **From a Web Page**: Create a link that begins with `weasis://?` (see below [How to build an URI](#how-to-build-a-uri)).<br>
1414
If certain web frameworks (e.g. WIKI) or contexts only support HTTP protocols, you can use a URL redirection starting with `https://`. A tool such as [Weasis PACS Connector](https://github.com/nroduit/weasis-pacs-connector">weasis-pacs-connector) can assist with this.
1515
2. **From the Command Line**: Utilize the appropriate Weasis command from the terminal:
1616
{{< tabs groupid="launchWeasisProtocol">}}
1717
{{% tab title="Windows" %}}
1818
{{< highlight shell >}}
19-
start weasis://%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
19+
start weasis://?%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
2020
{{< /highlight >}}
2121
{{% /tab %}}
2222
{{% tab title="Linux" %}}
2323
{{< highlight shell >}}
24-
xdg-open weasis://%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
24+
xdg-open weasis://?%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
2525
{{< /highlight >}}
2626
{{% /tab %}}
2727
{{% tab title="macOS" %}}
2828
{{< highlight shell >}}
29-
open weasis://%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
29+
open weasis://?%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
3030
{{< /highlight >}}
3131
{{% /tab %}}
3232
{{< /tabs >}}
3333

3434
### How to Build a URI
35-
The `weasis://` URI scheme allows you to launch Weasis directly from the system's URI handler. By constructing the correct URI path, you can execute [Weasis commands](../../basics/commands) to load images or perform other actions.
35+
The `weasis://?` URI scheme allows you to launch Weasis directly from the system's URI handler. By constructing the correct URI path, you can execute [Weasis commands](../../basics/commands) to load images or perform other actions.
3636

3737
[Weasis PACS Connector](https://github.com/nroduit/weasis-pacs-connector#launch-weasis) can dynamically generate manifests (listing references for images to load) and build the required URI through an API. This tool also manages user preferences and other launch parameters.
3838

3939
If you're not using the Weasis PACS Connector, you can build a URI manually by following these steps:
4040
1. **Choose Commands**: Select one or more [commands](../../basics/commands) to execute.
4141
2. **Encode the Commands**: Use a URL encoder to format the commands correctly for URI inclusion.
42-
3. **Prefix the Commands**: Add the `weasis://` scheme at the beginning of the encoded command string to create the final URI.
42+
3. **Prefix the Commands**: Add the `weasis://?` scheme at the beginning of the encoded command string to create the final URI.
4343

4444
##### Example: Loading a Remote Image
4545
1. Use [$dicom:get](../../basics/commands/#dicomget) to load an image from URL
@@ -50,7 +50,7 @@ $dicom:get -r "https://nroduit.github.io/demo-archive/us-palette.dcm"
5050
{{< highlight text >}}
5151
%24dicom%3Aget+-r+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2Fus-palette.dcm%22
5252
{{< /highlight >}}
53-
3. Make the final URI by adding "weasis://" at the beginning
53+
3. Make the final URI by adding "weasis://?" at the beginning
5454
{{< launch title="Open the remote image" >}}
5555
$dicom:get -r "https://nroduit.github.io/demo-archive/us-palette.dcm"
5656
{{< /launch >}}

layouts/shortcodes/launch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{- $style := .Get "style" | default "transparent" }}
44
{{- $title := .Get "title" | default "Launch" }}
55
<span class="btn cstyle {{ $style }}">
6-
<a href="weasis://{{ urlquery $cmd }}" class="no-lightbox">
6+
<a href="weasis://?{{ urlquery $cmd }}" class="no-lightbox">
77
<i class="fa-fw fas fa-play"></i>
88
{{ $title }}
99
</a>

0 commit comments

Comments
 (0)