Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3

Commands at start-up and commands for driving Weasis from a socket

All the following commands must be used The commands listed below can be applied at start-up , or in the OSGI console, in a telnet session. All the commands starting by "dcmview2d:" allow to drive Weasis and are not adapted to be used at start-up.

Warning
titleCommands status

This page matches to Weasis 2.5.1 or

...

higher
The syntax of usage comes from POSIX


For getting the list of commands, after starting Weasis, open a local telnet session:

Code Block
languagetext
themeDJango
titleOSGI Console
telnet localhost 17179

Trying 127.0.0.1...

Connected to localhost.localdomain.

Escape character is '^]'.

____________________________

Welcome to Apache Felix Gogo

g! 

...

Type "help" for getting all the available commands.

Info
titleModifying the default port number

This value can be changed in the configuration of the launcher (by overriding the property or with a new jnlp template)



Here are the list of Weasis specific commands:

Code Block
languagetext
themeDJango
titledcmview2d:layout
g! dcmview2d:layout
Select a split-screen layout
Usage: dcmview2d:layout [number( -n NUMBER | id] [VALUE]
 -i ID )
  -n --number=NUMBER [integer value]  select select the best matching number of views
   -i --id  select=ID          select the layout from its identifier
   -? --help                 show help


Code Block
languagetext
themeDJango
titledcmview2d:mouseLeftAction
g! dcmview2d:mouseLeftAction
Change the mouse left action
Usage: dcmview2d:mouseLeftAction [action String value]COMMAND
COMMAND is (sequence|winLevel|zoom|pan|rotation|crosshair|measure|draw|contextMenu|none)
  -? --help       show help


Code Block
languagetext
themeDJango
titledcmview2d:move
g! dcmview2d:move
ChangePan the pan value of the selected image
Usage: dcmview2d:move -- [x integer value] [y integer value] (itX Y
X and Y are Integer. It is mandatory to have '--' (end of options) for negative values)
  -? --help       show help


Code Block
languagetext
themeDJango
titledcmview2d:reset
g! dcmview2d:reset

Reset aimage tool or all the tools
display
Usage: dcmview2d:reset [action String value | all] (-a | COMMAND...)
COMMAND is (winLevel|zoom|pan|rotation)
  -a --all        reset to original display
  -? --help       show help


Code Block
languagetext
themeDJango
titledcmview2d:scroll
g! dcmview2d:scroll
Scroll into the images of the selected series
Usage: dcmview2d:scroll [set ( -s NUMBER | increase-i NUMBER | decrease] [VALUE]-d NUMBER)
  -s --set [integer value]=NUMBER       set a new value from 01 to series size
less one   -i --increase=NUMBER [integer value]  increase of some amount
  -d --decrease=NUMBER [integer value]  decrease of some amount
  -? --help             show help


Code Block
languagetext
themeDJango
titledcmview2d:synch
g! dcmview2d:synch
Set a synchronization mode
{None Stack Tile }
Usage: dcmview2d:synch [VALUE]VALUE
VALUE is (None|Stack|Tile)
  -? --help       show help


Code Block
languagetext
themeDJango
titledcmview2d: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 [windowLEVEL
integerWIN value]and [levelLEVEL integerare value] (itInteger. It is mandatory to have '--' (end of options) for negative values)
  -? --help       show help


Code Block
languagetext
themeDJango
titledcmview2d:zoom
g! dcmview2d:zoom
Change the zoom value of the selected image
(0.0 is the best fit value in the window
Usage: dcmview2d:zoom [(set VALUE | increase NUMBER | decrease] [VALUE]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 [integer value]=NUMBER  increase of some amount
  -d --decrease [integer value]=NUMBER  decrease of some amount
  -? --help             show help


Code Block
languagetext
themeDJango
titledicom:get
g! dicom:closeget
RemoveLoad DICOM files inremotely Dicomor Explorerlocally
Usage: dicom:closeget ([-l PATH]... [patient | study | series] [ARGS]
  -a --all Close all patients
  -p --patient <args>	Close patient, [arg] is patientUID (PatientID + Patient Birth Date, by default)-r URI]... [-p] [-i DATA]... [-w 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
  -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)
  -w --wado=URI     open DICOMs from an XML manifest
  -? --help         show help


Code Block
languagetext
themeDJango
titledicom:close
g! dicom:close
Close DICOM files
Usage: dicom:close  (-a | ([-y UID]... [-s UID]...))
  -a --all           close all the patients
  -y --study <args>	Close=UID     close a study, [arg]UID is Study Instance UID
  -s --series <args>	Close=UID    close a series, [arg]UID is Series Instance UID
  -? --help		          show help


Code Block
languagetext
themeDJango
titleimage:get
g! image:get
Load images remotely or locally
Usage: dicomimage:get ([Options] SOURCE-f file]... [-u url]...)
  -lf --local		Open DICOMsfile=FILE     open an image from locala diskfile
  -ru --remoteurl=URL       open Openan DICOMsimage from an URL
  -p? --portablehelp           Open DICOMs from default directories at the same level of the executable
  -i --iwado        Open DICOMs from an XML (GZIP, Base64) file containing UIDs
  -w --wado		Open DICOMs from an XML (URL) file containing UIDs
  -? --help		show help
Code Block

show help


Code Block
languagetext
themeDJango
titleimage 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


Code Block
languagetext
themeDJango
titleweasis:info
g! weasis:info
Show information about Weasis
Usage: weasis:info [Options] (-v | -a)
  -v --version		    show version
  -a --all        show weasis specifications
  -? --help		       show help


Code Block
languagetext
themeDJango
titleweasis:ui
g! weasis:ui
Manage user interface
Usage: weasis:ui [Options](-q | -v)
  -q --quit		shutdown Weasis
  -v --visible		set window on top
  -? --help		show help


Code Block
languagetext
themeDJango
titleacquire: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


Info
titleCommands at start-up

For identifying the commands at start-up, the symbol "$" must be added before the command (not required in the OSGI console).

Weasis Portable distribution

There are two ways to open local images with the portable distribution:.

Load images automatically from configured directory

...

Set images into a “dicom” or “images” directory at the same level of the binary launcher (c.f. weasis-win32.exe). The default directories can be changed in weasis/conf/config.properties, see the property

...

"weasis.portable.dicom.directory" and "weasis.portable.dicom.

...

cache".

Launch Weasis by double clicking on the executable file or in command-line (c.f. on Linux: ./weasis-linux.sh '$dicom:get --portable')

Launch arguments

Code Block
languagetext
themeDJango
titleLinux and Mac,

...

commands must be in between quotes

...

./

...

viewer-linux.sh '$dicom:get -l /home/Images/'

...




Multiple commands:

...


./

...

viewer-linux.sh '$dicom:get -l "/DICOM/Overlay"' '$weasis:ui --visible'


Local directories (recursive) or files:
./viewer-linux.sh '$dicom:get -l "/DICOM/Overlay" -l "/DICOM/test/file.dcm"'

...



Open non DICOM images (Local and URL):
./viewer-linux.sh '

...

$image:get -

...

f "/home/Images/test.png" -u https://dcm4che.atlassian.net/wiki/download/attachments/3670024/weasis-mpr.png'


Code Block
languagetext
themeDJango
titleWindows commands
viewer-win32.exe $dicom:get -l "E:\\DICOM\\Overlay" -l "E:\\DICOM\\Shutter"

...


 

...

viewer-win32.exe $dicom:get -l "E:/DICOM/Overlay" -l "E:/DICOM/Shutter"

...


Warning
titleSpecial characters

The command interpreter has changed from weasis 2.6.0. Command containing special characters like '&' must be within quotes or double quotes. Example: 
dicom:get -w "http://launcher-weasis.rhcloud.com/weasis-pacs-connector/manifest?studyUID=2.16.756.5.5.100.397184556.14391.1373576413.1508&studyUID=1.3.6.1.4.1.5962.1.1.0.0.0.1168612284.20369.0.1&studyUID=1.3.6.1.4.1.21367.0.1.13.1021"

It also depends of the command line system. For instance, in Eclipse the launcher parameters needs to escape get an escaped '&', so the command is:
$dicom:get -w "http://launcher-weasis.rhcloud.com/weasis-pacs-connector/manifest?studyUID=2.16.756.5.5.100.397184556.14391.1373576413.1508\&studyUID=1.3.6.1.4.1.5962.1.1.0.0.0.1168612284.20369.0.1\&studyUID=1.3.6.1.4.1.21367.0.1.13.1021"