Versions Compared

Key

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

...

weasis-pacs-connector

weasis-pacs-connector 4: standard usage
Image Removed Image Added

weasis-pacs-connector 5
Image Removed: when embedding the xml manifest
Image Added

Info
titleExecute JNLP

JNLP is generally executed from a web browser but it can be also executed directly from the operating system by the command:
javaws http://localhost:8080/weasis-pacs-connector/viewer.jnlp?patientID=9702672

The servlet in weasis-pacs-connector (download the latest release or build it from the sources) will build the XML manifest and the JNLP file for launching Weasis, here are some URL examples:

...

Info

It is possible to have multiple UIDs for patient, study, series and instance. When using a combination of UIDs the order is not relevant.

For getting only the xml file:

For getting all the image references, weasis-pacs-connector makes queries to the PACS with C-FIND. It is configured to work directly with dcm4che-web3.

To override the default configuration of weasis-pacs-connector, place a file named weasis-pacs-connector.properties in the classpath of the application. In JBOSS, the best location would be "/server/default/conf/". The file content must match to the default configuration.
In weasis-pacs-connector.properties, choose which IDs are allowed (patientID, studyUID, accessionNumber, seriesUID, objectUID) and for each ID, it is possible to require other IDs (see examples in comments in the properties file).

weasis-jnlp-default.xml can also be overridden by placing a file named weasis-jnlp.xml in the classpath.

Build your own connector

There are two requirements:

...

Build your own connector

There are two requirements:

  1. Build a Java Webstart file (.jnlp) for launching Weasis. This file has at least one dynamic parameter (<argument>$dicom:get ... </argument>) that is the reference to the xml file containing the UIDs (This is the second point).
    Code Block
    xml
    xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
      <jnlp spec="1.6+" codebase="http://localhost:8080/weasis" href="">
    	<information>
    		  <information>
        <title>Weasis</title>
        		<vendor>Weasis Team</vendor>
        		<description>DICOM images viewer</description>
        		<description kind="short">An application to visualize and analyze DICOM images.
    		</description>description>
        		<description kind="one-line">DICOM images viewer</description>
    		    <description kind="tooltip">Weasis</description>
      	</information>
      	<security>
     		   <all-permissions />
      	</security>
    
      	<resources>
        		<!-- Requires Java SE 6 update 10 release for jnlp extension without codebase (substance.jnlp) -->
    		    <j2se version="1.6.0_10+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128m" max-heap-size="512m" />
        		<j2se version="1.6.0_10+" initial-heap-size="128m" max-heap-size="512m" />
    
        		<jar href="http://localhost:8080/weasis/weasis-launcher.jar" main="true" />
        		<jar href="http://localhost:8080/weasis/felix.jar" />
    
        		<!-- Optional library (Substance Look and feel, only since version 1.0.8). Requires the new Java Plug-in introduced in  			the Java SE 6 update 10 release.For previous JRE 6, substance.jnlp needs a static codebase URL -->
        		<extension href="http://localhost:8080/weasis/substance.jnlp" />
    
        		<!-- Allows to get the filefiles in pack200 compression, only since Weasis 1.1.2 -->
        		<property name="jnlp.packEnabled" value="true" />
    	</resources>
     	<application-desc main-class="org.weasis.launcher.WebstartLauncher">  		<!-- ================================================================================================================= -->
        <!-- Security 			Workaround for Java security restriction which only allow to put property in resources when starting 
    			with "java." or "jnlp.". So property is passed here as argument with prefix "-VMP": <argument>-VMPpropertyname="value"</argument>. 
    			This workaround allows to have a fully trusted application with dynamic jnlp (only since weasis 1.1.2, 
    			for previous version see revision=16573), http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6653241 -->
    
    		<!-- RequiredWorkaround. Add prefix "jnlp.weasis" for having a fully trusted application without signing jnlp (only since weasis 1.2.9), http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6653241 -->
        <!-- Required parameter. Define the location of config.properties (the OSGI configuration and the list of plug-ins to install/start) -->
        <property name="jnlp.weasis.felix.config.properties" value="http://localhost:8080/weasis/conf/config.properties" />
        <!-- Optional parameter. Define the location of ext-config.properties (the OSGI configuration and the list 
    			of plug-ins to install/start) -->
    		<argument>-VMPfelix.config.propertiesextend/override config.properties) -->
        <property name="jnlp.weasis.felix.extended.config.properties" value="http://localhost:8080/weasis-ext/conf/ext-config.properties"</argument> />
        		<!-- OptionalRequired parameter. Define the code locationbase of ext-config.properties (extend/override config.properties) Weasis for the JNLP -->
    		<argument>-VMPfelix.extended.config.properties
        <property name="jnlp.weasis.weasis.codebase.url" value="http://localhost:8080/weasis/conf/ext-config.properties"</argument>
    
    		" />
        <!-- RequiredOptional parameter. Define the code base ext of Weasis for the JNLP -->
    		<argument>-VMPweasis.codebase.url
        <property name="jnlp.weasis.weasis.codebase.ext.url" value="http://localhost:8080/weasis-ext"</argument> />
        		<!-- Required parameter. StartOSGI localconsole OSGIparameter console-->
    on the port 17179 -->
    		<argument>-VMPgosh.args<property name="jnlp.weasis.gosh.args" value="-sc telnetd -p 17179 start"</argument> />
        		<!-- Optional parameter. Allows to have the Weasis menu bar in the top bar on Mac OS X (works only  			with the native Aqua look and feel) -->
    		<argument>-VMPapple
        <property name="jnlp.weasis.apple.laf.useScreenMenuBar" value="true"</argument> />
        		<!-- Optional parameter. Allows to get plug-ins translations -->
    		<argument>-VMPweasis.i18n    <property name="jnlp.weasis.weasis.i18n" value="http://localhost:8080/weasis-i18n"</argument> />
        		<!-- Optional Weasis Documentation, appears in the menu Help  -->
    User Manual -->  		<!-- <argument>-VMPweasis<property name="jnlp.weasis.weasis.help.url" value="http://localhost:8080${cdb}/../weasis-doc"< /argument>> -->
        		<!-- =================================================================================================================== -->
    
    	 -->
      </resources>
    
      <application-desc main-class="org.weasis.launcher.WebstartLauncher">
    	<!-- Example for opening dicom files from remote xml file -->
    		<argument>$dicom:get -w http://localhost:8080/dcm4chee-web/wadoQueries/wado_query3888637380.xml.gz</argument>
    
    		<!-- Example for opening dicom files from local foler -->
    		<argument>$dicom:get -l "/home/Images/MRIX LUMBAR/"</argument>
    
    		<!-- Example for opening dicom files by embedding the xml file encoded in gzip and then in base64, it 			must be in one line without space at the beginning -->
    		<argument>$dicom:get -i "H4sIAAAAAAAAALVV7Y+aMBz+vr+i6XdLXwDBHHdxpy4mvgX0dvtkOqnaBOGO1qn//RUQnW5uy3JHCC2/1+d5Wsrdw36TgB8iVzJLA0gQhkCkiyyW6SqAW71seBA83H+62/E4m79uRX4AJiNVAYBrrV9alrXb7dBOcCUVyvKVtVcxrEJaeyWDiyhWRlCMifU8HESLtdjwhkyV5ulCQFD0mIWDU06SLXiyzpRuedjDVuGGIBevW5mLcZocovGkf0ye9TsBXPJEmTI8jqU2dFKeTHjON0IbegGEwNCYcC1FqsFxLLIapMmID2vTyCQEsD0aj/rD8cn6WeZ63eHauIjvedjGzskXiX0Ae2X5SG/jAyifF8gIYsh2kdvEjucjQhDxXMqQgzByPNtDFBNibo8QhzLbd7Bnw6pMR6hFLl90uTyP3fCp/9gegOFsMO33wvawW4eV0OoyR+NUFlRIYbURLq+jp8DEbM/2me+YTqFYijw3Sz5ZH5RcSJ5WKnRCBJ4rYiKXQoFq+FdqLnbcMzUzoTYltFlQK+tccItm4VP3W+0abTffRW6qYwLBMIt5IvUhgMOwRFMDANc74CYYipF5+QOiusypMQSW6WRVcP5bAXbZz3YcRqpl+FUBMaVf59Oo24jaXxrXQlBM31WIm8A+RgjHd/HP/VzGmHNbCFIKMVd8da0De18dbuP6oA1xtQGbZh0oY/S3OhT7odfrNqZh+1oG+2O/izOsv8pglQdKMTkeh8X0/Le4fwN7IF3jYgYAAA==+vr+i6XdLXwDBHHdxpy4mvgX0dvtkOqnaBOGO1qn//RUQnW5uy3JHCC2/1+d5Wsrdw36TgB8iVzJLA0gQhkCkiyyW6SqAW71seBA83H+62/E4m79uR..."</argument>
    
    		<!-- Example for opening dicom files from URLs -->
    		<argument>$dicom:get -r http://server/images/img1.dcm http://server/images/img2.dcm</argument>
        </application-desc>
      </jnlp>
    
    Info
    titleCustomize JNLP

    Replace "http://localhost:8080/weasis" by your server location and <argument>...</argument> must be injected dynamically.
    Adapt parameters if necessary.

    Tip
    titleWeb service to build jnlp based on templates

    See the project JNLP-Builder

    <script type="text/javascript" src="https://www.java.com/js/deployJava.js"></script> <script type="text/javascript"> deployJava.launchButtonPNG= 'http://www.dcm4che.org/confluence/download/attachments/17891332/weasis2.png'; var url = 'http://dicom.vital-it.ch:8089
    r http://server/images/img1.dcm http://server/images/img2.dcm</argument>
      </application-desc>
      </jnlp>
    
    Tip
    titleExample of creating a Java Web Start button in a webpage
    Code Block
    javascriptjavascript
    Info
    titleCustomize JNLP

    Replace "http://localhost:8080/weasis" by your server location and "<argument>...</argument>" by your data to load. Adapt other parameters if necessary.

    Tip
    titleWeb service for building jnlp based on templates

    weasis-pacs-connector services return jnlp and they allow either to build a manifest from a PACS via DICOM C-Find or to upload the manifest by http POST (http://localhost:8080/weasis-pacs-connector/viewer

    .jnlp

    ?

    studyUID=1.2.840.113619.2.176.2025.1499492.8612.1098277309.15'; deployJava.createWebStartLaunchButton(url, '1.6.0_10'); </script>

    upload=manifest).

  2. Build an XML file containing the UIDs of the images which will be retrieved from Weasis. There is XLS schema to validate the content of xml. This file can be either compressed in gzip or uncompressed. Here is an example:

...

Info
titleImportant Parameters (except mandatory parameters):

PatientBirthDate help to identify a patient.
StudyDate, StudyTime, Modality, SeriesNumber and InstanceNumber help to sort data before downloading images.
WadoTransferSyntaxUID and WadoCompressionRate (when tsuid is lossy compression) allow to select in which transfer syntax the images are transfered to the viewer. A wado request without transfer syntax should return the original syntax (this is the case in dcm4chee) or DICOMs encoded in Explicit VR Little Endian
SeriesDescription and StudyDescription allow to immediately display the descriptions before downloading the images.

Note
titlePACS requirement

The example above requires a PACS with a WADO server to retrieve the images.

Anchor
nowado
nowado

Example that requires only a WEB server (Weasis will only download files - no WADO requests)

...