Weasis is a multipurpose standalone and web-based DICOM viewer designed with a highly modular architecture. It is a very popular clinical viewer used in healthcare by hospitals, health networks, multicenter research trials, and by patients.
Leveraging the OpenCV library, Weasis delivers high-performance and high-quality medical imaging renderings.
From version 4 onwards, Weasis features a responsive user interface aligned with operating system options, offering an enhanced experience on high-resolution screens.
Weasis has been designed to meet the evolving needs of clinical information systems in medical imaging. Its features focus on providing web-based access to radiological images, supporting a wide range of DICOM types, and offering multimedia capabilities.
Visit the Download Page for a comprehensive list of installation options adapted to your system.
Since version 4, only the distribution with a native installer is maintained to ensure a better user experience in terms of installation, configuration and compatibility. This distribution also supports launching Weasis from a web context via the weasis protocol.
For details about GLIBC versions and Linux distribution compatibility, see this page.
Note
To manage Weasis version at the server side, it is possible to install the Weasis web package which will upgrade the native installation at the client side (it works for minor releases by updating all the plugins except the launcher).
Explore more integration possibilities with other systems here.
Tip
Stay informed about new releases and updates by joining our Google Group. Choose “Email” to get updates directly to your inbox.
General Topics
Get started with these links to learn more about Weasis and its features:
Live Demo: Explore Weasis with a variety of DICOM datasets.
Weasis Web Protocol: Learn how to launch Weasis directly from web links or network-based workflows.
The package management systems above can limit certain functionalities because they work in sandbox mode, especially for Flatpak (see Fedora issue) and Snap (see removable media issue).
The Snap package installation uses a <user.home>/snap/weasis/current/.weasis directory instead of the <user.home>/.weasis directory for all other installations.
List of All Installers
All the packages can be found on Github and the legacy repository Sourceforge
For details about GLIBC versions and Linux distribution compatibility, see this page.
This page describes how installing Weasis to be the default web viewer of dcm4chee-arc-light web interface. See How to launch Weasis from any environments to integrate Weasis into your own user interface.
Weasis is launched from the dcm4chee administrative web interface with the weasis protocol, as shown in the pictures below.
For a simpler and faster installation without server components, please follow these instructions; no need to consider the following points on this page. Otherwise if you need more advanced configurations then follow these steps:
Install dcm4chee, if not already done (Installation with Docker is straightforward).
Go here and download these following files:
Warning
Download issue: Some browsers (like Internet Explorer) may rename war files to zip. If so, use the Save As option when downloading and change the name back to war.
From weasis-pacs-connector folder:
[weasis-pacs-connector.war] Requires at least the version 7.1.2
From the folder with the latest version number (Optional if you want to run only the native version installed on the client system):
Add the .war files using the “Add” button (Choose Upload a new deployment or select Replace when the file already exists)
Note
Alternatively one may deploy .war files using JBoss Command Line Interface Console.
Configure weasis-pacs-connector (This step is optional if you just want to keep the default configuration).
The default configuration is stored in two files inside weasis-pacs-connector.war. To override the default configuration:
Edit the configuration as needed. For example, dcm4chee may be running on a different computer than Weasis, or the AE Title of dcm4chee may have been changed. If so, edit weasis-pacs-connector.properties or dicom-dcm4chee-arc.properties (Change pacs.host, pacs.port, and pacs.aet).
Copy weasis-pacs-connector.properties and dicom-dcm4chee-arc.properties into $WILDFLY_HOME/standalone/configuration (where $WILDFLY_HOME is the path of the running Wildfly).
With the docker installation use the docker copy command ($ docker cp …)
Tip
Instead of copying the files into $WILDFLY_HOME/standalone/configuration, JBoss Command Line Interface Console can be used to override files in the war. Add the two configuration files with the deployment-overlay command:
For applying the new configuration, from the management console “Disable” weasis-pacs-connector.war and then “Enable”
To activate Weasis in the dcm4chee-arc-light user interface (see the matrix of the required versions in the table below):
you need to add attributes by either editing docker-compose.env (from 5.22.0) or from the left menu Configuration > Devices > dcm4chee-arc > Extensions > Edit extension > Child Objects > Web Applications > DCM4CHEE (add &cdb to the URL if weasis.war has not been deployed on the server-side):
Configure the URL for having a view button for the patient or study level.
From dcm4chee-arc-light 5.10.2 to 5.19.0 the left menu Configuration > Devices > dcm4chee-arc > Extensions > Archive Device
From dcm4chee-arc-light 5.19.1 the left menu Configuration > Devices > dcm4chee-arc > Extensions > Edit extension > Child Objects > Web Applications > DCM4CHEE
From dcm4chee-arc-light 5.22.0 by editing docker-compose.env (It allows you to directly apply the properties when deploying, then the can be edited in the web portal). Note: the character ‘&’ must be escaped (e.g. IID_STUDY_URL=../../weasis-pacs-connector/weasis?studyUID={{studyUID}}\&access_token={{access_token}})
Note
URL parameters
access_token is necessary in secure mode (secured RESTful services) from dcm4chee-arc-light 5.15.1
_self avoids to open a new empty window in the web browser
cdbcdb parameter to override the URL of the Weasis web context to null (when you want only the native local version or when weasis.war has not be deployed with weasis-pacs-connector)
Absolute path: The values above starting by “../” are the default relative path when weasis-pacs-connector is installed in the same JBoss as dcm4chee. Otherwise replace the relative URL by an absolute value, ex: http://<your-host>:<port>/weasis-pacs-connector/...
* Running only the local native version of Weasis (when not connected to a remote version - weasis.war -)
Weasis Web Protocol
The Weasis Protocol enables the launch of Weasis (starting from
v3.6.0
) in a web context using a specific URI scheme: weasis://commands.
How to Use the Weasis Protocol
To launch Weasis from various contexts:
From a Web Page: Create a link that begins with weasis:// (see below How to build an URI).
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 can assist with this.
From the Command Line: Utilize the appropriate Weasis command from the terminal:
open weasis://%24dicom%3Aget+-w+%22https%3A%2F%2Fnroduit.github.io%2Fdemo-archive%2FLumbar%2Fmf.xml%22
How to Build a URI
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 to load images or perform other actions.
Weasis PACS Connector 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.
If you’re not using the Weasis PACS Connector, you can build a URI manually by following these steps:
Choose Commands: Select one or more commands to execute.
Encode the Commands: Use a URL encoder to format the commands correctly for URI inclusion.
Prefix the Commands: Add the weasis:// scheme at the beginning of the encoded command string to create the final URI.
For loading multiple images, it’s recommended to use a manifest file that references all desired images instead of including each image individually in the URI. The easiest way to build this manifest dynamically is by using the Weasis PACS Connector. Alternatively, you can create the manifest manually following the provided instructions.
Examples to Load Images
If you use weasis-pacs-connector, please refer to Launch Weasis.
Use $dicom:get to load a static XML manifest containing direct links (without WADO server)
Launch
The command for modifying the configuration at launch is $weasis:config which can have different arguments:
cdb is the Weasis web context (The URL of weasis.war). If the value is null, the weasis version installed from the native installer is used. In the weasis-pacs-connector configuration, the default value is defined by weasis.base.url.
cdb-ext is the extension web context of Weasis (The URL of weasis-ext.war containing additionnal plugins). In the weasis-pacs-connector configuration, the default value is defined by weasis.ext.url.
arg is an argument for the launcher. The value must start by $, like arg="$dicom:close –all" (Note: the value can also be directly in the base URI, outside $weasis:config). Single-valued argument but can be specified multiple times.
pro is a property for the launcher containing a key and a value separate by a space. Single-valued property but can be specified multiple times.
auth is the web authorization parameter
wcfg is the URL the remote Weasis configuration service.
Here are some examples that modify the launcher properties without using weasis-pacs-connector:
Configuration for launching Weasis Dicomizer
Launch
Change the user, by default is the one of the current system session. The local preferences are associated to a user.
Launch
$weasis:config pro="weasis.user user2"
Building Weasis
These instructions guide you through building Weasis directly from its GitHub repository. For IDE-based builds, refer to the Weasis plugin development guidelines.
-P compressXZ: Option for compressing the packages in xz, only from Weasis 3.6.0. The compression pack200 is not supported anymore (removed from Java 14), before 3.6.0 the profile was -P pack200.
Tip
-P purgeI18nPackage: Option to delete the translation package in the local maven repository (active by default). To disable this option, add - before the profile:
For production, the version must not include SNAPSHOT (as packages with a SNAPSHOT are always downloaded, not cached). To remove SNAPASHOT or create your own release (use a specific name to prevent package conflicts in the cache), update the changelist property. From the Weasis root folder, execute:
However, you can also build the native binaries and installer locally using the package-weasis.sh script. This process is not guaranteed to work on all systems, as it requires proper configuration of multiple tools. Refer to the jpackage prerequisites for more details.
Obtain the weasis-native.zip file, extract the archive, and navigate to the root folder in a Bash prompt.
Run the following command to build the native binaries and installer:
Replace --jdk with the path to your local JDK installation.
To generate only the native binaries (without creating an installer), include the --no-installer flag.
For additional command options, run:
./build/script/package-weasis.sh --help
Tip
On Windows the bash script must be executed with Git Bash or Cygwin. Avoid having spaces in the input and output paths.
Guidelines
Weasis Plugin Development
This page describes the necessary configurations to be able to debug Weasis using an IDE. For developers who want to create new plugins, you can visit How to build and install a plugin.
We recommend the use of IntelliJ IDEA because the following instructions are based on it. Nevertheless, it is possible to use other IDEs by configuring weasis-launcher with similar instructions described in Add a launcher.
Prerequisites
Install IntelliJ IDEA (Community or Ultimate Edition 2024.3 or higher)
Use JDK 23 or higher and set the language level to SDK Default in File > Project Structure… >. Required Maven version is 3.6.3 or higher.
In File > Settings… > Plugins install google-java-format plugin from Marketplace and enable it from google-java-format Settings
Code style and convention
Weasis uses google-java-format as coding conventions. The format can be applied by Maven through the Spotless plugin or from the IDE (by importing the IntelliJ Java Google Style file). Formatting code with an IDE is not 100% compatible with Spotless, so it is better to use the latter before submitting new commits. This guarantees identical code formatting regardless of the system or code editor used.
From IntelliJ IDEA: New > Project from Version Control…
In the Get from Version Control dialog, select the menu Repository URL and enter the following URL: https://github.com/nroduit/Weasis.git (public repository)
Building Weasis plugins
In the maven panel, select clean/install in Lifecycle of weasis-framework (root) to compile and to install all the plugins in the local Maven repository.
Tip
It is possible to use a JVM Option (e.g. -Dweasis.arch=linux-x86-64) to limit the build of native plugins only to the architecture of the current system (do not use this option when building the distribution).
For running or debugging Weasis, you need to create a launcher:
Open Run > Edit Configurations…
Create a new Application
Select weasis-launcher as a module (field starting by -cp)
Main Class: browse org.weasis.launcher.AppLauncher
Click on Modify Options
Select Add dependencies with “Provided” scope to classpath
Select Do not build before run
Select Add VM Options and enter -Xms64m -Xmx768m -Dgosh.port=17179
Working Directory: remove the current value and add %MODULE_WORKING_DIR% from the Insert Macros button
Note
As the default build task has been removed it is necessary to apply the Maven command install on modules with modified code before launching the Run or Debug mode.
Keeping the build task and delegating the build to Maven does not seem configurable for a multi-module project, see this issue.
Examples of launching parameters by entering values in the Program arguments text box
Loading DICOM files from a local path:
$dicom:get -l \"D:\images test\dicom\"
Note
Some command interpreters need to escape the quotes or double quotes required for paths or URLs. This is the case with IntelliJ IDEA or Eclipse.
For more commands at startup see also Weasis commands.
Warning
In Eclipse launcher parameters, ‘&’ within URLs needs to be escaped with a backslash.
Examples of other VM options for overriding the default Preferences
Removing the possibility of exporting DICOM: -Dweasis.export.dicom=false
Defines a new user (for getting specific preferences): -Dweasis.user=user1
Examples with specific configuration files:
For launching Weasis Dicomizer: -Dfelix.extended.config.properties=file:target/conf/dicomizer.json
Configuration from an URL: -Dfelix.extended.config.properties=https://mysite.com/weasis/conf/config.json
Note
felix.config.properties defines the location of base.json (the OSGI configuration and the list of plugins to install/start) felix.extended.config.properties defines the location of a json file (extends/overrides base.json)
Internationalization
Translation files are hosted and managed on the Transifex website. Get an account and help to translate to your language! If your language is missing, just head over to Transifex and request a new language.
Warning
Text length: The translations for many languages frequently exceed the length of the corresponding English source. It could be a problem for the layout of graphical components (e.g. buttons). Some elements have a character limit on the translation tool.
Tip
Special characters: Some characters representing values (%d, %s), newline (\n) and HTML tags must not be translated. For other translating recommendations, see Transifex help
For special words or particular contexts look at the “Instructions” text box (gives explanations or definitions).
Building Weasis-i18n
weasis-i18n is the internationalization project (i18n) of Weasis. As a separate project, it can have its own release cycle. The OSGi fragments of plugins contain only the translation files which are merged during runtime to the matching module of the application.
That means the translation packages can be deployed at any time, it does not need to follow the Weasis life cycle. With remote packages, the plugin translation will be updated by Weasis only if the timestamp number has changed. This timestamp is set during the build phase described below.
Info
Additional projects to obtain a full translation of Weasis:
The java-swing-dialogs translations must be updated manually in the weasis-launcher module and docking-frames translations must be packaged witin the library.
Prerequisites
JDK 11 or higher
Maven 3 or higher
If your computer is behind a proxy server, configure maven.
Git or directly download the source code from GitHub
Getting the Source
To clone the repository, first install GIT and either clone using a graphical GIT client (such as Tortoise Git) or directly from the command line using the command:
The distribution files are located in the weasis-i18n-dist/target/dist folder.
Apply the translations
The translation package can be built manually as described below or it is automatically built every 24 hours and can be downloaded from here. When Building Weasis, the last package is downloaded automatically.
In order to update Weasis with new translations, unzip weasis-i18n.zip and either:
Replace the files in the “bundle-i18n” folder where Weasis is installed (not possible when Weasis is distributed from an application store or the Mac signed package).
Note
weasis-launcher-i18n cannot be updated dynamically as the launcher is not an OSGi module. It must be imported manually into the Weasis source (weasis-launcher).
Weasis is built on a modular architecture powered by OSGi: the dynamic module system for Java. This design allows for a highly flexible, dynamic, and extendable structure. At its core, Weasis utilizes the Apache Felix OSGi framework, a lightweight open-source implementation of the OSGi specification.
Key Architectural Features
The following diagrams illustrate the main plugin types (known as bundles in OSGi terminology) and their relationships. These include Viewer, Viewer Tool Pane, Tool Bar, Data Explorer, and Codec bundles, which are dynamically registered using Declarative Services—a mechanism to seamlessly provide or consume services in the OSGi environment.
Understanding The Categories of Plugins
Weasis employs a modular approach, where individual plugins (or bundles in OSGi terminology) handle specific functionalities. Here are the plugin categories represented by layers in the diagram:
Media Viewer and Editor
This category handles the main viewing and editing functionalities. Except the 2D viewer, it includes specialized viewers for different modalities and representations.
UI Aggregator
UI Aggregator plugins bring together various interface components to create a cohesive and user-friendly experience. They dynamically adapt the interface to include provided tools or modules, ensuring that Weasis remains customizable and modular.
Data Access and Management (Data Explorer)
This category focuses on managing how data is loaded, retrieved, and handled within the system.
Codec (Media Decoding)
Codec plugins are responsible for decoding and interpreting medical media files in the DICOM format and other supported formats. They sometimes include native libraries.
Utility and Core Services
This plugin provides essential utility functions and core services needed to support the other modules.
Each of these categories contributes to the flexibility and extensibility of Weasis, enabling it to be customized and adapted to different clinical and research workflows.
Fragment Bundles
A fragment bundle is a special type of bundle that is attached to a host bundle to provide additional resources or classes. In Weasis, fragment bundles are used to provide translations and native libraries for codecs. This design allows for a clean separation of concerns and ensures that only the required resources are loaded at runtime.
Bundle Translation Management
Each bundle has its translation files packaged in a separate bundle fragment (ending in i18n), an OSGi concept that merges these files dynamically during runtime. This design allows translations to be maintained independently, and they are automatically loaded by the application whenever they are available.
Codec Support with Native Libraries
Certain Codec bundles contain fragments with native libraries (using JNI wrappers). The Weasis launcher dynamically loads only the required native binaries relevant to the platform on which it is running, ensuring lightweight and efficient operation.
Shortcuts
Keyboard and Mouse Shortcuts
Here is a list of the most common keyboard and mouse shortcuts in Weasis. The shortcuts are divided into different categories for better understanding.
Central panel containing viewers and editors
Shortcut
Action
Ctrl + Tab
Select the next tab (since
v4.2.1
)
Ctrl + Shift + Tab
Select the previous tab (since
v4.2.1
)
Ctrl + Shift + E
Open a the docking panel list for selection
Ctrl + M
Maximize/Restore the selected tab
Ctrl + W
Close the tab
Tab Right-click
Open the contextual menu for more options
Selected view in the 2D DICOM Viewer
Shortcut
Action
Left Arrow
Display previous series (since
v4.2.1
)
Right Arrow
Display next series (since
v4.2.1
)
Page Up
Display first series (since
v4.2.1
)
Page Down
Display last series (since
v4.2.1
)
Ctrl + Left Arrow
Display previous study (since
v4.2.1
)
Ctrl + Right Arrow
Display next study (since
v4.2.1
)
Ctrl + Page Up
Display first study (since
v4.2.1
)
Ctrl + Page Down
Display last study (since
v4.2.1
)
Up Arrow
Display previous image (since
v4.2.1
)
Down Arrow
Display next image (since
v4.2.1
)
Home
Display first image (since
v4.2.1
)
End
Display last image (since
v4.2.1
)
Shift + Up Arrow
Go 10 images back (since
v4.2.1
)
Shift + Down Arrow
Go 10 images forward (since
v4.2.1
)
Ctrl + Up Arrow
Display previous patient (since
v4.2.1
)
Ctrl + Down Arrow
Display next patient (since
v4.2.1
)
Ctrl + Home
Display first patient (since
v4.2.1
)
Ctrl + End
Display last patient (since
v4.2.1
)
Tab
Go the next view when layout has more than one view
Shift + Tab
Go the previous view when layout has more than one view
Alt + Arrows
Move image of 5 pixels (since
v4.2.1
)
Alt + Shift + Arrows
Move image of 10 pixels (since
v4.2.1
)
Ctrl + Plus (+)
Zoom in (since
v4.2.1
)
Ctrl + Minus (-)
Zoom out (since
v4.2.1
)
Ctrl + Enter
Set zoom to best fit (since
v4.2.1
)
T
Translate (pan) the image canvas
W
Window / Level
S
Series scroll
Z
Zoom
R
Rotation
H
Crosshair: in multiview mode synchronizes the crosshair position to all the views (Note: Ctrl + click or Ctrl + Shift + click allows changing the Window/Level values)
C
Cine Start / Stop
M
Measure
D
Distance measurement
A
Angle measurement
Y
Polyline measurement
B
Textbox
Q
Context menu
Ctrl + Spacebar
Change to the next action
Ctrl + mouse drag
Accelerate the current action
Ctrl + Shift + mouse drag
Accelerate more the current action
Alt + R
90° rotation (clockwise)
Alt + L
90° rotation (counterclockwise)
Alt + F
Flip horizontally (after rotation action)
0 1 2 3…
DICOM presets
K
Toggle key image state
Spacebar
Show/Hide all the annotations (three states)
I
Show/Hide all the annotations (three states)
Escape
Reset the selected view
P
Print view(s) with the operating system printer
Right-click
Open the contextual menu for more options
Double click or F11
Toggle fullscreen (F11 since
v4.5.2
)
Drag files/directories (from the OS file manager)
Open DICOMs files
Selected view in the MPR Viewer
MPR view inherits the same shortcuts as the 2D viewer, with the following additional shortcuts since
v4.5.2
:
Shortcut
Action
Alt + A
Center crosshair of the selected view
Alt + S
Show/Hide the crosshair center of the selected view
Alt + D
Show/Hide the crosshair of the selected view
Alt + C
Center crosshair of all views
Alt + V
Show/Hide the crosshair center of all views
Alt + B
Show/Hide the crosshair of all views
DICOM explorer
Shortcut
Action
Ctrl + click on the thumbnail
Select multiple series
Click on a thumbnail and then Shift + click on another one
Select all series between
Ctrl + A
Select all the series
Home or Page Up
Select the first series
End or Page Down
Select the last series
Up Arrow
Select previous series
Down Arrow
Select next series
Enter
Open the selected series in the default viewer
Click + drag a thumbnail in the main view
Display a series
Right-click
Open the contextual menu for more options
Drag files/directories (from the OS file manager)
Open DICOMs files
Note
Downloading Priorities: Selecting a thumbnail gives the best priority to download.
Graphics
Shortcut
Action
Click on a graphic
Select a Graphics
Click + mouse drag
In selection mode: select all the graphics inside the selection area. In drawing mode: draw the selected graphic shape.
Ctrl + A
Select all the graphics
Ctrl + D
Deselect all the graphics
Delete
Delete the selected graphics
Shift + click on a graphic
In selection mode: add or remove a graphic to the current selection. In drawing mode: force to draw on another graphic (without shift the graphic is selected).
Double click
Stop adding points for polyline (also available in the context menu)
Right-click
Open the contextual menu for more options
Tips and Tricks
Window / Level Adjustment
Move the mouse horizontally to the right to increase the window width (reduce the perceived contrast).
Move the mouse vertically upwards to lower the window center (increase the perceived brightness).
Tip: Use Preferences to reverse the direction of level adjustments.
Drawing a Segment
You can draw a segment in two ways:
Click + Drag: Click, drag to draw, then release.
Click > Release > Drag: Click to start, release, drag to draw, and release again.
The schema above shows that the queries to the PACS are made at the same time as the viewer starts. This makes it possible to optimize the launch by simultaneously launching weasis and building the manifest.
Tip
weasis-pacs-connector services allow either to build a manifest from a PACS via DICOM C-Find or to upload the manifest by http POST.
Build your own connector
This documentation describes how to create your own connector without weasis-pacs-connector and with different DICOM archive types. The weasis protocol allows you to build URIs to launch Weasis according to different configurations and allows to load DICOM files locally or remotely.
Here are examples with XML manifests or with DICOMWeb RESTful services.
Build an XML manifest
Use $dicom:get to load a XML manifest returned by your service.
Build an XML file containing the UIDs of the images which will be retrieved from Weasis. There is XLS to validate the content of xml. This output file can be either compressed in gzip or uncompressed. Here is an example:
Important Parameters (except mandatory parameters defined in xsd):
PatientBirthDate helps to identify a patient.
StudyDate,StudyTime, Modality, SeriesNumber and InstanceNumber help to sort data before downloading images.
SeriesDescription and StudyDescription allow immediately displaying the descriptions before downloading the images.
Tip
From Weasis 2.5 it is possible to have multiple archives (allows several arcQuery tags) and the presentations tag which contains the image annotations.
Build an XML manifest (no WADO server)
This example requires only a WEB server. Weasis will download DICOM files by URLs.
DirectDownloadFile defines the URL of the DICOM file to download (the final URL is the combination of wadoURL + DirectDownloadFile)
DirectDownloadThumbnail defines the URL of the JPEG file representing the series (the final URL is the combination of wadoURL + DirectDownloadThumbnail)
See in the previous note above.
Download directly with DICOMWeb RESTful services
This integration requires a PACS/VNA with DICOMweb services (QUERY/RETRIEVE) where the requests are managed directly by Weasis. Here are some of the advantages:
Straightforward integration
Do not require to install weasis-pacs-connector
Allow passing token directly in headers (not in the URL)
The following configurations allow images to be loaded by initiating the request from a WEB context. However, it is possible to access DICOMWeb services by initiating the request directly from the Weasis import.
Use $dicom:rs to load DICOM files. Here are some configuration examples of DICOMweb applications:
dcm4chee-arc-light
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
The character ‘&’ must be escaped in the Docker environment variables.
The Authorization header is not required for unsecure service.
URL with HTTPS requires a real valid certificate; otherwise, the certificate must be imported into the Weasis Java keystore. For testing purposes in secure mode, you can use the HTTP URL if it is mapped in the OIDC client of keycloack (–url “http://:8080/dcm4chee-arc/aets/DCM4CHEE/rs”).
Note
Known issue: Weasis cannot open the images because of the token length which is cut by IE and Chrome only under Windows. It is working with Firefox on Windows.
Currently, the DICOMWeb service of DICOMcloud doesn’t support:
Thumbnail service is not implemented.
Preferences
ViewerHub (is a separate project that will be available soon) is a tool designed for managing server-side Weasis preferences across all native client installations. The preferences are defined in each release package (bin-dist/weasis/conf within weasis-native.zip) and can be modified either through the ViewerHub web portal or via the Weasis protocol with the pro parameter.
Some server-side preferences are applied by Weasis only during the initial launch, as they can later be adjusted in the Weasis user interface. On the other hand, certain server-side preferences are utilized by Weasis during every launch and cannot be modified through the User Interface (client-side).
Changing Preferences in Weasis
Client-Side Preferences
Local preferences can be modified in the following ways:
Through the Weasis User Interface: Navigate to File > Preferences.
Using the Weasis Protocol: Use the weasis:config command with the pro parameter.
Server-Side Preferences
Server-side preferences can be updated using any of the following methods:
Through the ViewerHub Web Portal: Manage preferences directly via the web portal for all users, for user group or for a specific hostname.
By Extending the Configuration File: Create a new JSON file to extend the base.json configuration.
The default value of the property (see table below)
Example to change language property (It will work only during the first launch of Weasis on a user session, otherwise delete ${user.home}/.weasis/preferences/).
If you are using weasis-pacs-connector, add the propertylocale.lang.code:
The preferences listed below are extracted from the base.json file, which is located in the source code.
The properties are grouped into categories (note: not all categories are shown in the list below), and each property includes the following details:
Property Key: The name of the property, used as a key by the viewer.
Default Value: The property’s default value, provided after the arrow. If it is marked as Null, the property is not set by default.
First Badge: The JavaType of the property, indicating its type in Java (String, Integer, Boolean, etc.).
Second Badge: Represents the Type, defining how the viewer handles the property:
F: Processed only during the viewer’s initial launch as it can be adjusted in the client-side preferences.
A: Always processed by the viewer.
AP: Always processed by the viewer but only from base.json or other .json files.
Description: A brief explanation of the property, provided on the second line.
Dicom Category
weasis.aetNull
string
A
Calling AETitle for DICOM send and Dicomizer publish. ? null means displaying the DICOM calling node combobox otherwise the combo is not displayed and the value is directly used
weasis.dicom.root.uid2.25
string
A
Set values for dicom root UID when creating DICOM objects (KO or PR). See company list at https://www.iana.org/assignments/enterprise-numbers
weasis.download.immediatelytrue
boolean
F
Start to download series immediately
download.concurrent.series3
int
A
The number of concurrently downloaded series
download.concurrent.series.images4
int
A
The number of concurrently downloaded images in a series
General Category
weasis.themeorg.weasis.launcher.FlatWeasisTheme
string
F
FaltLaf Look and feel, see https://www.formdev.com/flatlaf/themes/
weasis.confirm.closingfalse
boolean
F
Show a message of confirmation when closing the application
locale.lang.codeen
string
F
Language code (see Java Locale: https://www.oracle.com/java/technologies/javase/jdk20-suported-locales.html). Default value is "en".
locale.format.codesystem
string
F
If value is "system" then the locale of the operating system will be used (in client-side).
See Java Locale: https://www.oracle.com/java/technologies/javase/jdk20-suported-locales.html
Launch Category
felix.native.processor.alias.arm_learmv7a
string
A
Processor alias for 32-bit arm native libraries
weasis.clean.previous.versionfalse
boolean
A
If true, the bundle cache is cleared when the weasis version has changed from the previous launch
weasis.main.uiweasis-base-ui
string
A
Application main user interface bundle. Mandatory with the default launcher.
weasis.nameWeasis
string
AP
Change the name of the application everywhere in UI
weasis.profiledefault
string
AP
Application profile: when no profile name is provided, the value is "default".
It allows having a custom preferences' directory on the client side (will not share preferences with other Weasis instances)
weasis.userNull
string
AP
Defines a user name to store its own preferences. Null value will be the system user.
weasis.pref.store.local.sessionNull
string
AP
Store user preferences when weasis.user is not specified (only with remote preferences service)
flatlaf.uiScaleNull
string
F
Specifies a custom scale factor used to scale the user interface. Allowed values: e.g. 1.5, 1.5x, 150% or 144dpi (96dpi is 100%)
weasis.resources.url${dollar}{weasis.codebase.url}/resources.zip
string
A
Application resources (logo, presets, LUTs, dicom annotations configuration...)
"resources.zip" is downloaded again only when the last modified date has changed
weasis.show.disclaimertrue
boolean
A
Show a disclaimer at the first launch of Weasis (requires to be accepted to start the application)
weasis.show.releasetrue
boolean
A
Show a message when the release has changed
weasis.update.releasetrue
boolean
A
Show a message when a new release is available
weasis.portable.dicom.directorydicom,DICOM,IMAGES,images
string
A
For loading automatically DICOMs in the portable Weasis distribution (CD/DVD).
Comma-separated directories relative to the Weasis executable file.
Log Category
felix.log.level1
int
A
Set the logging levels for OSGI framework 0=None / 1(default)=Error / 2=Warning / 3=Information / 4=Debug
org.apache.sling.commons.log.levelINFO
string
F
Application logging level. This may be any of the defined logging levels TRACE, DEBUG, INFO, WARN, ERROR
org.apache.sling.commons.log.file.activatefalse
boolean
F
Activation of rolling log files
org.apache.sling.commons.log.file.number20
int
F
The max number of rolling log files
org.apache.sling.commons.log.file.size10MB
string
F
The max size of a rolling log file
org.apache.sling.commons.log.pattern%d{dd.MM.yyyy HH:mm:ss.SSS} *%-5level* [%thread] %logger{36}: %msg%ex{3}%n
string
F
Log pattern: {0} The timestamp of type java.util.Date, {1} the log marker,
{2} the name of the current thread, {3} the name of the logger, {4} the debug level and {5} the actual debug message.
org.apache.sling.commons.log.stack.limit3
int
F
Defines the maximum number of lines for stack trace (0 => NONE, -1 => ALL). Default value is 3
audit.logfalse
boolean
A
Audit log for giving statistics about usage of Weasis
Ui Category
weasis.import.imagestrue
boolean
A
Show the import image toolbar and menu
weasis.import.dicomtrue
boolean
A
Show the DICOM import menu and dialog
weasis.import.dicom.qrtrue
boolean
A
Show the DICOM Q/R page in the DICOM Export dialog
weasis.export.dicomtrue
boolean
A
Show the DICOM export menu and dialog
weasis.export.dicom.sendtrue
boolean
A
Show the send page in the DICOM Export dialog
weasis.toolbar.mouse.buttons7170
int
A
Show all mouse buttons. Sum of LEFT=1024 + MIDDLE=2048 + RIGHT=4096 + SCROLL=2. Show all:7170 and show none:0.
weasis.all.cinetoolbar.visiblefalse
boolean
A
Show all the cine toolbars
weasis.all.keyobjecttoolbar.visiblefalse
boolean
A
Show all the key object toolbars
weasis-dicom-viewer2d.all.rotationtoolbar.visiblefalse
boolean
A
Show the rotation toolbars in DICOM 2D viewer
weasis.contextmenu.lutShapefalse
boolean
A
Show LUT Shape in the contextual menu
weasis.contextmenu.lutfalse
boolean
A
Show LUT in the contextual menu
weasis.contextmenu.filterfalse
boolean
A
Show Filter in the contextual menu
weasis.plugins.licensetrue
boolean
A
Show license activation in Help menu
Viewer Category
weasis.color.wl.applytrue
boolean
F
Allow applying Window/Level on color images
weasis.level.inversetrue
boolean
F
Inverse level direction (moving the cursor down to increase brightness
weasis.apply.latest.prfalse
boolean
F
Apply by default the most recent Presentation State to the related image
weasis.force.3dfalse
boolean
A
Force to detect a graphic card at every launch
weasis.toolbar.mouse.leftwinLevel
string
F
Left mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none
weasis.toolbar.mouse.middlepan
string
F
Middle mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none
weasis.toolbar.mouse.rightcontextMenu
string
F
Right mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none
weasis.toolbar.mouse.wheelsequence
string
F
Mouse wheel action, possible values: sequence|zoom|rotation|none
Customize resources
The default resources are located:
With ViewerHub you can upload a new package “resources.zip” for a specific release.
For the installed distribution in installedPath/app/resources
How to add DICOM nodes or DICOM printers at the server-side
From the graphical user interface, configure the DICOM printers from File > Print > DICOM Print or DICOM nodes from File > Preferences > Dicom node list
Go to the folder ${user.home}/.weasis/data/weasis-dicom-explorer
Copy the desired configuration files: dicomNodes.xml, dicomPrinterNodes.xml, dicomWebNodes.xml and dicomCallingNodes.xml
Paste at the root path of resources. For web distribution, unzip, place files and zip again.
The new configurations should appear for all the users as non-editable configurations in Weasis
Build Plugins
How to build and install a plugin
This page provides a guide on creating new Weasis plugins and explains how to integrate them into the distributions. For details on configuring the development environment, refer to this guidelines page.
Types of Plugins in Weasis
The following list describes the types of plugins, the interfaces they implement and the factories they use:
Media Viewer or Editor
Represents the main central panel and implements either ViewerPlugin or ImageViewerPlugin.
The factory for this type implements SeriesViewerFactory.
For DICOM special modalities, you can use DicomSpecialElementFactory to associate a viewer to a specific DICOM object.
Toolbar Associated with a Viewer
Implements the Toolbar or DynamicToolbar interface.
The factory for this type implements InsertableFactory
Tool Associated with a Viewer
Represents the right panel and implements DockableTool.
The factory for this type implements InsertableFactory.
Data Explorer
The explorer model implements DataExplorerModel.
The explorer view implements DataExplorerView.
The factory for this type implements DataExplorerViewFactory.
Import Data into an Explorer
Adds a new page into the DICOM Import UI with ImportDicom.
The factory for this type implements DicomImportFactory.
Export Data from an Explorer
Adds a new page into the DICOM Export UI with ExportDicom
The factory for this type implements DicomExportFactory.
Media Codec
Implements the Codec interface to decode and encode media files related to a file extension or a mime type.
Preferences
Implements PreferencesPageFactory to add a new page in the Preferences dialog.
UI Aggregator
Represents the bundle for the application’s main user interface which aggregates various interface components.
The Maven artifact for this bundle must be defined in the base.json file (e.g., code:weasis.main.ui value:weasis-base-ui).
Note
The factories are used to create the instances of the plugins and are registered as OSGi services. For performance reasons, the factories are created at startup and the plugins are created only if they are needed.
Tip
For more information about the plugin hierarchy and their relationships, refer to the Weasis Architecture.
Building Plugins Using Maven Archetype
To add the Weasis archetypes to your local Maven repository, go to the Weasis/archetype directory and execute the following command:
mvn install
Navigate to the target folder, which should be the parent folder of the new plugin project, and execute the following command to create your plugin:
mvn archetype:generate -DarchetypeCatalog=local
When prompted, enter the number of one of the archetypes. Currently, the following archetypes are available:
weasis-plugin-base-viewer-archetype: Example of a toolbar and tool for a non-DICOM viewer.
weasis-plugin-dicom-viewer-archetype: Example of a toolbar and tool for a DICOM viewer.
Modify the generated project as needed.
In the pom.xml file, ensure the <relativePath> tag corresponds to the location of your Weasis source folder. By default, the value is <relativePath>../Weasis/weasis-parent/pom.xml</relativePath> (In this scenario, the plugin resides in the same parent folder as the Weasis source code).
When the relative path is set correctly, <version>${revision}${changelist}</version> in the pom.xml file will automatically be updated to the latest version of the Weasis source.
For easier version management in the pom.xml, you can remove <version> at the project level to inherit it from the parent.
Build the plugin by executing the following command in the plugin project directory:
mvn clean install
Integrating Plugins into Weasis Distributions
Once the plugin is built, it can be integrated into the Weasis distributions either locally or remotely.
Warning
The plugin depends on the Weasis framework, and its version must align with the version of the Weasis distribution being integrated.
If the versions do not match, the plugin may fail to start and produce an error such as org.osgi.framework.BundleException: Unable to resolve myplugin ….
Testing the Plugin
To test the plugin with an installed version of Weasis without making any changes to the installed directory, create a JSON file that extends the configuration specified in base.json.
Create a new json file (e.g., myplugin.json) with the following content:
{"weasisPreferences":[{"code":"org.osgi.framework.startlevel.beginning","value":"550"},{"code":"felix.auto.start.500","value":"file:///git/myplugin/target/myplugin-4.5.2.jar","description":"Myplugin - a viewer for ..."}]}
Update the content of myplugin.json as required:
Ensure the plugin start level (above 500) is lower than the OSGi beginning level (above 550). Avoid using values below this range to prevent conflicts with other plugins.
For easier testing, use an absolute JAR path that matches your local plugin directory. Use a URI format for the path like:
file:///D:/git/myplugin/target/myplugin-4.5.2.jar
file:///git/myplugin/target/myplugin-4.5.2.jar
file:///git/myplugin/target/myplugin-4.5.2.jar
Launch Weasis with your configuration:
Use the following parameter to extend the configuration (adapt the path to your local file):
Build a valid URI with the above parameter (see How to build an 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)) and launch Weasis from the terminal using a command:
open weasis://%24weasis%3Aconfig%20pro%3D%22felix.extended.config.properties%20file%3A%2F%2F%2Fgit%2Fmyplugin%2Fmyplugin.json%22
Using ViewerHub
This feature will be available soon. It will allow you to manage the plugins and their configurations directly from the ViewerHub web portal.
Build OSGi Services
All the plugin type described in the list above are OSGi services that are registered and aggregated in the GUI. Building the plugin from the Maven archetype will configure the OSGi service automatically. For adding new OSGi services, here is the procedure:
Create a class that implements the Insertable interface and represents a visual component. For example:
publicclassMyPrefViewextendsAbstractItemDialogPage{publicMyPrefView(){super("My Preferences",100);// Provide a name and the page positioninitGUI();}privatevoidinitGUI(){// Add a basic JLabel to the preference panel for demonstrationadd(newJLabel("Welcome to My Preferences!"));}@OverridepublicvoidcloseAdditionalWindow(){// Handle any cleanup or saving preferences when closing}@OverridepublicvoidresetToDefaultValues(){// Reset preferences to default values}}
Create a class that implements one of the plugin factories and include the annotations @Component and the @Service parameter. For example:
The commands listed below can be applied at start-up or in a telnet session. All the commands starting with “dcmview2d:” allow you to drive Weasis and are not adapted to be used at start-up.
Info
This page matches to Weasis 3.5.1 or higher. The syntax of usage comes from POSIX.
To obtain the list of commands, after starting Weasis, open a local telnet session of the OSGI Console and type lb for getting the list of bundles and their state or type help for getting all the available commands:
telnet localhost 17179
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
____________________________
Welcome to Apache Felix Gogo
g!
List of Weasis commands
dcmview2d:layout
g! dcmview2d:layout
Select a split-screen layout
Usage: dcmview2d:layout ( -n NUMBER | -i ID )
-n --number=NUMBER select the best matching number of views
-i --id=ID select the layout from its identifier
-? --help show help
dcmview2d:mouseLeftAction
g! dcmview2d:mouseLeftAction
Change the mouse left action
Usage: dcmview2d:mouseLeftAction COMMAND
COMMAND is (sequence|winLevel|zoom|pan|rotation|crosshair|measure|draw|contextMenu|none)
-? --help show help
dcmview2d:move
g! dcmview2d:move
Pan the selected image
Usage: dcmview2d:move -- X Y
X and Y are Integer. It is mandatory to have '--' (end of options) for negative values
-? --help show help
dcmview2d:reset
g! dcmview2d:reset
Reset image display
Usage: dcmview2d:reset (-a | COMMAND...)
COMMAND is (winLevel|zoom|pan|rotation)
-a --all reset to original display
-? --help show help
dcmview2d:scroll
g! dcmview2d:scroll
Scroll into the images of the selected series
Usage: dcmview2d:scroll ( -s NUMBER | -i NUMBER | -d NUMBER)
-s --set=NUMBER set a new value from 1 to series size
-i --increase=NUMBER increase of some amount
-d --decrease=NUMBER decrease of some amount
-? --help show help
dcmview2d:synch
g! dcmview2d:synch
Set a synchronization mode
Usage: dcmview2d:synch VALUE
VALUE is (None|Stack|Tile)
-? --help show help
dcmview2d:wl
g! dcmview2d:wl
Change the window/level values of the selected image (increase or decrease into a normalized range of 4096)
Usage: dcmview2d:wl -- WIN LEVEL
WIN and LEVEL are Integer. It is mandatory to have '--' (end of options) for negative values
-? --help show help
dcmview2d:zoom
g! dcmview2d:zoom
Change the zoom value of the selected image
Usage: dcmview2d:zoom (set VALUE | increase NUMBER | decrease NUMBER)
-s --set=VALUE [decimal value] set a new value from 0.0 to 12.0 (zoom magnitude, 0.0 => default, -200.0 => best fit, -100.0 => real size)
-i --increase=NUMBER increase of some amount
-d --decrease=NUMBER decrease of some amount
-? --help show help
dicom:get
g! dicom:get
Load DICOM files remotely or locally
Usage: dicom:get ([-l PATH]... [-w URI]... [-r URI]... [-p] [-i DATA]... [-z URI]...)
PATH is either a directory(recursive) or a file
-l --local=PATH open DICOMs from local disk
-r --remote=URI open DICOMs from an URI
-w --wado=URI open DICOMs from an XML manifest
-z --zip=URI open DICOM ZIP from an URI
-p --portable open DICOMs from configured directories at the same level of the executable
-i --iwado=DATA open DICOMs from an XML manifest (GZIP-Base64)
-? --help show help
dicom:close
g! dicom:close
Close DICOM files
Usage: dicom:close (-a | ([-y UID]... [-s UID]...))
-a --all close all the patients
-p --patient=ID close a patient from its patient ID (since v4.4.1)
-y --study=UID close a study, UID is Study Instance UID
-s --series=UID close a series, UID is Series Instance UID
-? --help show help
dicom:rs
g! dicom:rs
Load DICOM files from DICOMWeb API (QIDO/WADO-RS)
Usage: dicom:rs -u URL -r QUERYPARAMS... [-H HEADER]... [--query-header HEADER]... [--retrieve-header HEADER]... [--query-ext EXT] [--retrieve-ext EXT] [--accept-ext EXT]
-u --url=URL URL of the DICOMWeb service
-r --request=QUERYPARAMS Query params of the URL, see weasis-pacs-connector
-H --header=HEADER Pass custom header(s) to all the requests
--query-header=HEADER Pass custom header(s) to the query requests (QIDO)
--retrieve-header=HEADER Pass custom header(s) to the retrieve requests (WADO)
--query-ext=EXT Additionnal parameters for Query URL (QIDO)
--retrieve-ext=EXT Additionnal parameters for Retrieve URL (WADO)
--accept-ext=EXT Additionnal parameters for DICOM multipart/related Accept header of the retrieve URL (WADO). Default value is: transfer-syntax=*
--show-whole-study when downloading a series, show all the other series (ready for download) from the same study
-? --help show help
image:get
g! image:get
Load images remotely or locally
Usage: image:get ([-f file]... [-u url]...)
-f --file=FILE open an image from a file
-u --url=URL open an image from an URL
-? --help show help
image close
g! image:close
Close images
Usage: dicom:close (-a | ([-g UID]... [-s UID]...))
-a --all close all series
-g --group=UID close a group from its UID
-s --series=UID close an series/image from its UID
-? --help show help
weasis:info
g! weasis:info
Show information about Weasis
Usage: weasis:info (-v | -a)
-v --version show version
-a --all show weasis specifications
-? --help show help
weasis:ui
g! weasis:ui
Manage user interface
Usage: weasis:ui (-q | -v)
-q --quit shutdown Weasis
-v --visible set window on top
-? --help show help
acquire:patient
g! acquire:patient
Load Patient Context from the first argument
Usage: acquire:patient (-x | -i | -s | -u) arg
arg is an XML text in UTF8 or an url with the option '--url'
-x --xml open Patient Context from an XML data containing all DICOM Tags
-i --inbound open Patient Context from an XML data containing all DICOM Tags, decoding syntax is [Base64/GZip]
-s --iurlsafe open Patient Context from an XML data containing all DICOM Tags, decoding syntax is [Base64_URL_SAFE/GZip]
-u --url open Patient Context from an URL (XML file containing all DICOM TAGs)
-? --help show help
Depending the command line system, quotes or double quote needs to be escaped with a backslash. Ex. simple quote must be escaped in Eclipse but not in Intellij.
ViewerHub is the successor to weasis-pacs-connector. This is a server component with an administration interface for managing preferences, plugins and versions of Weasis with DICOM archives.
Essentially, it simplifies the management of Weasis in IT environments and facilitates connections to DICOM archives.
The main features of ViewerHub are:
Management of Weasis user preferences
Control of launch contexts and profiles by user, group, or host
Handling of live minor version updates of Weasis at the client side
Management of Weasis translation packages
Integration with connectors for DICOM archives
Configuration of Keycloak clients and token transmission for DICOMWeb or WADO URI calls
Here is a list of pages related to ViewerHub documentation:
The import process of a Weasis version follows these different steps:
Retrieval of the “weasis-native xxx.zip” file, decompression and storage of the version’s resources/bundles in minio/S3.
Compression of the version’s “resources” folder into a zip file (necessary for Weasis) and storage on S3.
Update on S3 of the Weasis version compatibility file if the imported version is more recent.
Cache update regarding Weasis version compatibility mapping.
Loading of the version’s properties into the database.
Nexus Import
Currently not available, will be implemented later.
Remove Weasis package version
In order to delete a version of Weasis, it is necessary to select the version to delete, then right-click and confirm the deletion.
Deleting a version whose “launch config” is “default” will result in the deletion of all versions linked to this “default”.
Group-specific versions
It is possible to create a version of Weasis that will only be launched for certain groups of users or hosts.
In the “package” view, click on “Create new group config”.
Then select the desired Weasis version (package version + launch config) and the new group to associate then press “Create”.
The new version will thus be displayed in the list of versions already present.
If the user or host belongs to the group, the previously created configuration will be used to launch Weasis.
Configuring version properties
ViewerHub allows to modify the properties of versions on-the-fly.
To modify a property, it is necessary to open a version and double-click on the property to modify.
For example to modify the name of the viewer for a package/launch config/group:
modification of the property “weasis.name”
launching the viewer after modification: the label corresponds to the modified property
Internationalization
Import
It is possible to import the translations that will be used by Weasis depending on the version of Weasis launched and the correspondence of this version with the compatibility file.
The name of the file to import must have the format “weasis-i18n-dist-X.X.X-SNAPSHOT.zip”.
In ViewerHub, management of translation packages is located in the “Translation” tab.
The import will decompress the zip file and load the translation resources into the MinIO S3.
Removal
Deleting a translation version is done by selecting the version and right-clicking on this version and then confirming the deletion.
Package Qualifier
Default values
When calling the ViewerHub, Weasis will send in an Http header the version installed on the client workstation (User-Agent header).
If the corresponding Weasis version has not been installed on ViewerHub and/or when no qualifier has been associated with the user/host/group making the request, a version and/or a qualifier are used by default to retrieve the resources to launch Weasis.
These default values are defined in the config-server in the application-package.yml file.
Qualifier mapping to user/host/group
In order to be able to test specific versions or to be able to launch a version of Weasis different from the default one for a group, it is possible to specify the version to launch for a user/host/group by mapping a particular qualifier.
In order to use this feature:
the weasis-native.zip file containing the specific version must be loaded into ViewerHub and associated with a group.
the “qualifier” property must be defined in the launch_prefered table and must be of type “qualifier”.
the mapping of the qualifier to use this version must be done at the launch table level for the target/launch_config/launch_preferred association.
If this mapping is not done, the default qualifier defined in ViewerHub configuration will be taken into account (see previous paragraph).
In order to do this mapping, you must define a configuration in the launch table associating the desired group/launch_config, the previous launch_preferred “qualifier” and for the “selection” column specify the qualifier to launch.
Version Compatibility
Compatibility file
A compatibility file named “version-compatibility.json” is present in each Weasis release (in the weasis-native.zip file => bin-dist => weasis => conf).
This file contains the mapping between the release version (“release-version”) and the minimum version of Weasis that should be installed on the client workstation (“minimal-version”).
This file also indicates which translation version should be used (“i18n-version”).
Cache
When uploading a new version in ViewerHub or when starting the application (in case the compatibility file is already present in the S3), ViewerHub will construct the different possible combinations from the compatibility file between the versions installed in ViewerHub and the Weasis releases.
These combinations will be stored in a redis cache. This cache is currently refreshed every 24 hours.
So when a client will launch Weasis via ViewerHub, it will directly know which version, i18n, resources to use when launching Weasis on the user computer.
Minio/S3
By importing a new version of Weasis into ViewerHub, if the compatibility file is more recent, ViewerHub will replace the compatibility file present on the S3. This compatibility file will be renamed on S3 “mapping-minimal-version.json”
In order to compare if this mapping file is more recent, ViewerHub will compare the version number of the latest release.
Groups
To easily manage your computer network, ViewerHub allows the creation and association of user or host groups.
Creation
Users, hosts, user groups and host groups are represented by ‘targets’.
There are 4 types of target:
user
host
user group
host group
To create a target, go to the ‘association’ menu and define the type of target to be created.
Group association
To associate a target with a group or a host/user, look for the desired target in the target name section and add the group or host/user in the ‘Belongs to/Member of’ section.
It is possible to associate several users with a user group and several hosts with a host group.
It is not possible to mix up the association between a user and a host group or a host in a user group.
Imaging Hub
This page describes how to install the Imaging Hub, a Docker Compose stack for managing dcm4chee PACS, ViewerHub, and related services.
Warning
This stack is designed for development and testing purposes only. It enables debugging ViewerHub and testing integration with dcm4chee PACS. It is not suitable for production use.
Included Services
This stack comprises the following components:
dcm4chee: PACS server for storing and retrieving medical images.
ViewerHub: Manages resources for different versions of Weasis.
MinIO: Object storage server compatible with Amazon S3 APIs.
Redis: Cache service storing manifest data for Weasis resources.
Postgres: Database backend for ViewerHub and dcm4chee.
Keycloak: Manages user authentication and access.
Config-server: Manages configuration of all services.
Eureka: Provides service discovery for stack components.
Prerequisites
Docker
Docker Compose CLI
Configurations
This stack supports multiple configurations:
Debug (local): Includes all the required stack except ViewerHub and uses local volumes.
Unsecure (unsecure): Enables HTTP and uses development-grade settings. dcm4chee and ViewerHub services have no authentication.
Secure (secure) [Not yet available]: Enables HTTPS and uses production-grade settings. dcm4chee and ViewerHub services have authentication.
Usage
Run the following commands based on the environment:
For debugging ViewerHub:
./scripts/start.sh local
And then run ViewerHub from your IDE
Minio
Minio is an open-source object storage server compatible with Amazon S3 APIs. It is used to store resources required by the different versions of Weasis.
Access the Minio console at: http://localhost:9090
Use the following credentials:
User: weasis-manager
Password: weasis-manager
Keycloak
Keycloak is an open-source identity and access management server used to authenticate users.
Access the Keycloak console at: http://localhost:8085
Use the following credentials:
User: admin
Password: admin
Dcm4chee
Dcm4chee is a PACS server that enables storing and retrieving medical images.
Access the dcm4chee console at: http://localhost:8080/dcm4chee-arc/ui2/en/study/study
For secure mode, access the dcm4chee console at: https://localhost:8443/dcm4chee-arc/ui2/en/study/study
Use the following credentials:
User: admin
Password: changeit
ViewerHub
ViewerHub is a web application that manages the resources required by the different versions of Weasis.
Access the ViewerHub console at: http://localhost:8081
Use the following credentials:
User: weasis-manager-user
Password: weasis-manager-password
Guidelines for development
This page provides guidelines for developing and debugging ViewerHub.
We recommend the use of IntelliJ IDEA because the following instructions are based on it.
This URL works with the Imaging Hub stack. If you are using a different setup, you may need to adjust the URL accordingly.
For more information, refer to the Launch APIs documentation.
Connectors
This page outlines the configuration of connectors used by ViewerHub to connect to DICOM archives.
Model
In order to create the Weasis manifest, connectors are configured to enable connections to various PACS or VNA systems.
Three types of connectors are defined in the configuration server: DB, DICOM, and DICOM_WEB.
The global connector configuration is defined as follows:
connector:# If value is present: use the connectors specified, if not present or wrong connector ids: use all the valid connectors defined in the configdefault:# connectorId1, connectorId2config:connector-id:type:# Type of connector used => DB, DICOM, DICOM_WEB# ------- Search Criteria ----search-criteria:deactivated:# If a search criteria needs to be deactivated=> SOP_INSTANCE_UID, SERIE_INSTANCE_UID, STUDY_INSTANCE_UID, STUDY_ACCESSION_NUMBER, PATIENT_ID
WADO configuration
WADO configuration is used by Weasis to retrieve images from manifest
WADO:authentication:# Used to force usage of basic authentication parameters to retrieve images (even if request is authenticated)force-basic:# true/false# If request is authenticated,retrieve the token from the authenticated request and inject it in the manifest for Weasis to get the imagesoauth2:url:# Url used to retrieve images by adding authenticated request token in manifest# Retrieve the images by using this basic authentication parametersbasic:url:# Url used to retrieve images by using basic authenticationlogin:# Basic credential login password:# Basic credential password
Database connector
This connector is used to be able to connect to the PACS database in order to find the studies, series, instances of images for the construction of the manifest.
db-connector:user:# Database userpassword:# Encoded passworduri:# Database uridriver:# Database driverquery:select:# SQL query to retrieve patientName, patientId, patientBirthDate, patientSex, studyInstanceUid, studyDate, accessionNumber, studyId, referringPhysicianName, studyDescription, seriesInstanceUid, modality, seriesDescription, seriesNumber, sopInstanceUid, instanceNumberaccession-number-column:# Accession number column used in the SQL query abovepatient-id-column:# Patient id column used in the SQL query abovestudy-instance-uid-column:# Study instance uid column used in the SQL query aboveserie-instance-uid-column:# Serie instance uid column used in the SQL query abovesop-instance-uid-column:# Sop instance uid column used in the SQL query above
DICOM connector
This connector is used to be able to connect to the pacs in DICOM in order to find the studies, series, instances of images for the construction of the manifest.
dicom-connector:calling-aet:# Calling aetaet:# Aethost:# Hostport:# Port
DICOM Web connector
Not implemented yet
Launch APIs
Launch Weasis from your own web application
The display service is available at the URL: http://localhost:8081/display/weasis
To launch Weasis from your own web application, you need to build the URL with the following parameters:
archive: The archive name to be used to retrieve the study. The list of archives is defined in the config server.
patientID: The Patient ID of the study to be displayed. Note to handle a universal patientID, add IssuerOfPatientID like in hl7: patientID=1168514^^^issuerValue
Ex with multiple patientID: http://localhost:8081/display/weasis?patientID=1168514&patientID=2023231696&archive=dcm4chee-local
Ex with URL encoding of separators ^^^ and IssuerOfPatientID value test: http://localhost:8081/display/weasis?patientID=1168514%5E%5E%5Etest&archive=dcm4chee-local
studyUID: The Study Instance UID of the study to be displayed.
Ex with multiple studies and series: http://localhost:8081/display/weasis?studyUID=1.3.6.1.4.1.5962.1.2.2.20031208063649.855&studyUID=1.3.6.1.4.1.5962.1.2.2.20031208063649.857&seriesUID=1.2.840.113704.1.111.4924.1273631010.17&archive=dcm4chee-local
objectUID: The SOP Instance UID of the object to be displayed.
modalitiesInStudy: Filter the studies containing the specified modalities.
Ex with only CT or XA: http://localhost:8081/display/weasis?patientID=1168514&modalitiesInStudy=CT,XA&archive=dcm4chee-local
containsInDescription: Filter the studies containing the specified string in the study description. Note that the search is case-insensitive and diacritic-insensitive.
Ex with only coronary or thorax: http://localhost:8081/display/weasis?patientID=1168514&containsInDescription=coronary,thorax&archive=dcm4chee-local
lowerDateTime: Filter the studies which are older than the specified date.
Ex CT older than 01.01.2010 12:00:00: http://localhost:8081/display/weasis?patientID=1168514&modalitiesInStudy=CT&lowerDateTime=2010-01-01T12:00:00Z&archive=dcm4chee-local
upperDateTime: Filter the studies which are more recent than the specified date.
Ex CT more recent than 01.01.2010 12:00:00: http://localhost:8081/display/weasis?patientID=1168514&modalitiesInStudy=CT&upperDateTime=2010-01-01T12:00:00Z&archive=dcm4chee-local
Note
You can restrict the types of UIDs (patientID, studyUID, accessionNumber, seriesUID, objectUID) that services can access. Refer to the “request.ids” section in the configuration file to specify which UIDs are permitted. By default, all UIDs are allowed.
Launch Weasis with IHE IID profile
he Invoke Image Display Profile enables an Image Display Invoker, typically a non-image-aware system such as an EHR, PHR, or RIS, to request the display of patient studies, which are then presented by an image-aware system like an Image Display (PACS).
The display service is available at the URL: http://localhost:8081/display/IHEInvokeImageDisplay
To launch Weasis with IHE IID profile, you need to build the URL with the following parameters:
archive: The archive name to be used to retrieve the study. The list of archives is defined in the config server.
requestType: The type of the request (PATIENT, STUDY)
patientID: The Patient ID of the study to be displayed. Note to handle a universal patientID, add IssuerOfPatientID like in hl7: patientID=1168514^^^issuerValue
studyUID: The Study Instance UID of the study to be displayed.
modalitiesInStudy: Filter the studies containing the specified modalities.
Ex studies containing CT or XA: http://localhost:8081/display/IHEInvokeImageDisplay?requestType=PATIENT&patientID=11685148&modalitiesInStudy=CT,XA
containsInDescription: Filter the studies containing the specified string in the study description. Note that the search is case-insensitive and diacritic-insensitive.
Ex studies containing coronary or thorax: http://localhost:8081/display/IHEInvokeImageDisplay?requestType=PATIENT&patientID=11685148&containsInDescription=coronary,thorax
lowerDateTime: Filter the studies which are older than the specified date.
Ex studies older than 01.01.2010 12:00:00: http://localhost:8081/display/IHEInvokeImageDisplay?requestType=PATIENT&patientID=11685148&lowerDateTime=2010-01-01T12:00:00
upperDateTime: Filter the studies which are more recent than the specified date.
Ex studies more recent than 01.01.2010 12:00:00: http://localhost:8081/display/IHEInvokeImageDisplay?requestType=PATIENT&patientID=11685148&lowerDateTime=2010-01-01T12:00:00
Manifest
Manifest
The manifest contains the list of exams, series, and instances to retrieve when loading images by Weasis. It is represented in this format.
The creation of the manifest occurs when a client calls ViewerHub to launch Weasis through the launch URL using the Launch APIs.
Construction
According to the search criteria of the request, ViewerHub constructs the manifest through connectors.
There are 3 types of connectors:
DB (database)
DICOM (DICOM DIMSE)
DICOM_WEB (DICOMWeb connector will be implemented later).
DB queries or DICOM calls are made to retrieve the necessary information to populate the manifest according to the search criteria.
The connectors are defined according to a model in the config server.
Cache Redis
Once the manifest built, it will be stored in a Redis cache for a defined period (TTL currently 3 minutes).
This mechanism allows multiple instances of ViewerHub, as the retrieval of the manifest by Weasis is asynchronous.
It is also useful when the user requests the visualization of the same study within the TTL period: the manifest will be retrieved directly from the Redis cache.
The key for retrieving the manifest corresponds to the hash of the search criteria.
Cryptography
When launching the Weasis viewer with ViewerHub, a URL containing search criteria in “query parameters” is used.
It is possible to encrypt these search parameters when launching the Weasis viewer in order to not transmit certain sensitive data in plain text (e.g. patient identifier).
To enable this feature, the application-cryptography.yml file in the config-server must be modified by setting the “enabled” field below to true.
Defining a password and a salt is also necessary to encode/decode the search parameters.
The same encryption algorithm must be used on the client side (encryption) and on the ViewerHub side (decryption).
Tutorials
Weasis provides the tools to visualize and analyze images obtained from medical imaging equipment according to the DICOM standard. This free DICOM viewer is used by healthcare professionals, researchers and patients.
If you are new to Weasis, it is recommended to read this page to understand the main elements of the interface.
The tutorials are organized by topics and can be read independently.
If you find any errors or inaccuracies, just click the Edit button displayed on top right of each page, and make a pull request to submit your changes.
Subsections of Tutorials
GUI Overview
Essential aspects of the interface
The following image shows the main elements of the graphical user interface (GUI). For more detailed documentation on the various elements of the interface, click on the green or blue areas of the image.