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:

  1. Java System property providing from parameters of weasis:config or the launching URI)
  2. Property defined in weasis/conf/xxx.json
  3. 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/).

  1. 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"
  2. Add the property in weasis/conf/xxx.json:
    locale.lang.code=fr_CH
  3. 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:

  1. Property Key: The name of the property, used as a key by the viewer.
  2. Default Value: The property’s default value, provided after the arrow. If it is marked as Null, the property is not set by default.
  3. First Badge: The JavaType of the property, indicating its type in Java (String, Integer, Boolean, etc.).
  4. 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.
  5. Description: A brief explanation of the property, provided on the second line.

Base preferences

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
    Controls the number of series downloaded simultaneously
  • download.concurrent.series.images4 int A
    The number of concurrently downloaded images within a series
  • weasis.rt.dvh.recalculate.enabletrue 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.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
    Specifies the 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
    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.port0 int A
    Define the port for the authentication callback. 0 means random port
Launch Category
  • 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 usage statistics in 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.export.annotationsfalse boolean A
    Show the Export Annotations button in the toolbar
  • 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

Dicomizer preferences

Dicom Category
  • weasis.acquire.dest.hostNull string A
    Hostname of DICOM send destination for Dicomizer. If no value, the list of DICOM nodes for storage is displayed.
  • weasis.acquire.dest.aetDCM4CHEE string A
    AETitle of DICOM send destination for Dicomizer
  • weasis.acquire.dest.port11112 int A
    Port of DICOM send destination for Dicomizer
  • weasis.acquire.video.max.size1024 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.displayPatientID,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.editStudyDescription 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.requiredPatientID,PatientName,AccessionNumber,StudyDescription string A
    Comma-separated list of patient and study tags which are required to publish an image
  • weasis.acquire.meta.series.displayModality,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.editReferringPhysicianName,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.requiredModality,SeriesDescription string A
    Comma-separated list of series tags which are required to publish an image
  • weasis.acquire.meta.image.displayImageComments,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.editImageComments,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.requiredContentDate string A
    Comma-separated list of image tags which are required to publish an image
  • weasis.acquire.meta.study.descriptionPictures 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.descriptionNull 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.enablefalse boolean A
    Show the rotation toolbar with base 2D viewer
  • weasis-base-viewer2d.all.importtoolbar.enablefalse boolean A
    Show the import toolbar with base 2D viewer
  • weasis-base-viewer2d.all.minitool.enablefalse string A
    Show the mini tool with base 2D viewer
  • weasis-base-viewer2d.all.imagetool.enablefalse boolean A
    Show Image Tools with base 2D viewer
  • weasis-base-viewer2d.all.measuretool.enablefalse boolean A
    Application
  • weasis.toolbar.layout.buttonfalse boolean A
    Show the layout toolbar
  • weasis.toolbar.synch.buttonfalse 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