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
proparameter.
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.jsonconfiguration.
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: - Add the property in weasis/conf/xxx.json:
- 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.jsonor other.jsonfiles.
- Description: A brief explanation of the property, provided on the second line.
Base preferences
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
Controls the number of series downloaded simultaneously -
download.concurrent.series.images
4
int
A
The number of concurrently downloaded images within a series -
weasis.rt.dvh.recalculate.enable
true
boolean
F
Enable the experimental DVH (re)calculation in the RT plugin. The DVH calculation algorithm (derived from dicompyler) has not been clinically validated and must not be used for medical decisions. When false (default), only DVHs stored in the RTDOSE files are displayed.
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
Specifies the 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
Uses the operating system's locale (on the client-side) with "system". For other values refer to Java Locale: https://www.oracle.com/java/technologies/javase/jdk20-suported-locales.html -
weasis.auth.back.port
0
int
A
Define the port for the authentication callback. 0 means random port
Launch Category
-
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 usage statistics in 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.export.annotations
false
boolean
A
Show the Export Annotations button in the toolbar -
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
Dicomizer preferences
Dicom Category
-
weasis.acquire.dest.host
Null
string
A
Hostname of DICOM send destination for Dicomizer. If no value, the list of DICOM nodes for storage is displayed. -
weasis.acquire.dest.aet
DCM4CHEE
string
A
AETitle of DICOM send destination for Dicomizer -
weasis.acquire.dest.port
11112
int
A
Port of DICOM send destination for Dicomizer -
weasis.acquire.video.max.size
1024
int
A
Maximum size in MB of a video file that can be imported into the Dicomizer. A video file larger than this value is rejected with a message. A value of 0 or less disables the limit.
Metadata Category
-
weasis.acquire.meta.global.display
PatientID,PatientName,PatientBirthDate,PatientSex,AccessionNumber,StudyDescription
string
A
Comma-separated list of patient and study tags which are displayed in UI. When a required tag has no value, it will be displayed. -
weasis.acquire.meta.global.edit
StudyDescription
string
A
Comma-separated list of patient and study tags which are editable in UI. When a required tag has no value, it will be editable. -
weasis.acquire.meta.global.required
PatientID,PatientName,AccessionNumber,StudyDescription
string
A
Comma-separated list of patient and study tags which are required to publish an image -
weasis.acquire.meta.series.display
Modality,OperatorsName,ReferringPhysicianName,SeriesDescription
string
A
Comma-separated list of series tags which are displayed in UI. When a required tag has no value, it will be displayed. -
weasis.acquire.meta.series.edit
ReferringPhysicianName,SeriesDescription
string
A
Comma-separated list of series tags which are editable in UI. When a required tag has no value, it will be editable. -
weasis.acquire.meta.series.required
Modality,SeriesDescription
string
A
Comma-separated list of series tags which are required to publish an image -
weasis.acquire.meta.image.display
ImageComments,ContentDate,ContentTime,AnatomicRegion
string
A
Comma-separated list of image tags which are displayed in UI. When a required tag has no value, it will be displayed. -
weasis.acquire.meta.image.edit
ImageComments,ContentDate,ContentTime,AnatomicRegion
string
A
Comma-separated list of image tags which are editable in UI. When a required tag has no value, it will be editable. -
weasis.acquire.meta.image.required
ContentDate
string
A
Comma-separated list of image tags which are required to publish an image -
weasis.acquire.meta.study.description
Pictures of follow-up,Pictures of observation,Pictures preoperative,Pictures intraoperative,Pictures postoperative
string
A
Comma-separated list of study description elements (to obtain a selection in a combo box). Empty value will be an editable text field -
weasis.acquire.meta.series.description
Null
string
A
Comma-separated list of series description elements (to obtain a selection in a combo box). Empty value will be an editable text field
Ui Category
-
weasis-base-viewer2d.all.rotationtoolbar.enable
false
boolean
A
Show the rotation toolbar with base 2D viewer -
weasis-base-viewer2d.all.importtoolbar.enable
false
boolean
A
Show the import toolbar with base 2D viewer -
weasis-base-viewer2d.all.minitool.enable
false
string
A
Show the mini tool with base 2D viewer -
weasis-base-viewer2d.all.imagetool.enable
false
boolean
A
Show Image Tools with base 2D viewer -
weasis-base-viewer2d.all.measuretool.enable
false
boolean
A
Application -
weasis.toolbar.layout.button
false
boolean
A
Show the layout toolbar -
weasis.toolbar.synch.button
false
boolean
A
Show the synch toolbar
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