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.
Priority order for loading a property
Here is the priority order to set a property:
- Java System property providing from parameters of weasis:config or the launching URI)
- Property defined in weasis/conf/xxx.json
- 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 property
locale.lang.code
:http://localhost:8080/weasis-pacs-connector/weasis?patientID=9702672&pro="locale.lang.code%20fr_CH"
- Add the property in weasis/conf/xxx.json:
locale.lang.code=fr_CH
- The default value is “en_US”
List of Preferences
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.aet
Null
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.uid
2.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.immediately
true
boolean
F
Start to download series immediately -
download.concurrent.series
3
int
A
The number of concurrently downloaded series -
download.concurrent.series.images
4
int
A
The number of concurrently downloaded images in a series
General Category
-
weasis.theme
org.weasis.launcher.FlatWeasisTheme
string
F
FaltLaf Look and feel, see https://www.formdev.com/flatlaf/themes/ -
weasis.confirm.closing
false
boolean
F
Show a message of confirmation when closing the application -
locale.lang.code
en
string
F
Language code (see Java Locale: https://www.oracle.com/java/technologies/javase/jdk20-suported-locales.html). Default value is "en". -
locale.format.code
system
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_le
armv7a
string
A
Processor alias for 32-bit arm native libraries -
weasis.clean.previous.version
false
boolean
A
If true, the bundle cache is cleared when the weasis version has changed from the previous launch -
weasis.main.ui
weasis-base-ui
string
A
Application main user interface bundle. Mandatory with the default launcher. -
weasis.name
Weasis
string
AP
Change the name of the application everywhere in UI -
weasis.profile
default
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.user
Null
string
AP
Defines a user name to store its own preferences. Null value will be the system user. -
weasis.pref.store.local.session
Null
string
AP
Store user preferences when weasis.user is not specified (only with remote preferences service) -
flatlaf.uiScale
Null
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.disclaimer
true
boolean
A
Show a disclaimer at the first launch of Weasis (requires to be accepted to start the application) -
weasis.show.release
true
boolean
A
Show a message when the release has changed -
weasis.update.release
true
boolean
A
Show a message when a new release is available -
weasis.portable.dicom.directory
dicom,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.level
1
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.level
INFO
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.activate
false
boolean
F
Activation of rolling log files -
org.apache.sling.commons.log.file.number
20
int
F
The max number of rolling log files -
org.apache.sling.commons.log.file.size
10MB
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.limit
3
int
F
Defines the maximum number of lines for stack trace (0 => NONE, -1 => ALL). Default value is 3 -
audit.log
false
boolean
A
Audit log for giving statistics about usage of Weasis
Ui Category
-
weasis.import.images
true
boolean
A
Show the import image toolbar and menu -
weasis.import.dicom
true
boolean
A
Show the DICOM import menu and dialog -
weasis.import.dicom.qr
true
boolean
A
Show the DICOM Q/R page in the DICOM Export dialog -
weasis.export.dicom
true
boolean
A
Show the DICOM export menu and dialog -
weasis.export.dicom.send
true
boolean
A
Show the send page in the DICOM Export dialog -
weasis.toolbar.mouse.buttons
7170
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.visible
false
boolean
A
Show all the cine toolbars -
weasis.all.keyobjecttoolbar.visible
false
boolean
A
Show all the key object toolbars -
weasis-dicom-viewer2d.all.rotationtoolbar.visible
false
boolean
A
Show the rotation toolbars in DICOM 2D viewer -
weasis.contextmenu.lutShape
false
boolean
A
Show LUT Shape in the contextual menu -
weasis.contextmenu.lut
false
boolean
A
Show LUT in the contextual menu -
weasis.contextmenu.filter
false
boolean
A
Show Filter in the contextual menu -
weasis.plugins.license
true
boolean
A
Show license activation in Help menu
Viewer Category
-
weasis.color.wl.apply
true
boolean
F
Allow applying Window/Level on color images -
weasis.level.inverse
true
boolean
F
Inverse level direction (moving the cursor down to increase brightness -
weasis.apply.latest.pr
false
boolean
F
Apply by default the most recent Presentation State to the related image -
weasis.force.3d
false
boolean
A
Force to detect a graphic card at every launch -
weasis.toolbar.mouse.left
winLevel
string
F
Left mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none -
weasis.toolbar.mouse.middle
pan
string
F
Middle mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none -
weasis.toolbar.mouse.right
contextMenu
string
F
Right mouse button action, possible values: pan|winLevel|sequence|zoom|rotation|measure|drawings|contextMenu|crosshair|none -
weasis.toolbar.mouse.wheel
sequence
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