Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

weasis-pacs-connector provides the easiest way to launch Weasis from a web

context and to connect Weasis to any PACS supporting WADO. For more
information see https://github.com/nroduit/weasis-pacs-connector Release Notes
- weasis-pacs-connector - Version 5.0.0
===================================================== * Used weasis-dicom-
tools (based on dcm4che3) for building the manifest * Starting Weasis and
building manifest are executed in parallel (improve the time to get the
images) * The manifest is not embedded any more by default in the jnlp, only
an url with an id can be called once within 5 min. That means clicking on a
jnlp a second time won't show any images (this behavior is desirable for
security reasons as most browsers downloads jnlp) * Configure the maximum
number of manifests treated simultaneous and the maximum life time of a
building manifest process (5 min by default) * Error messages (when building
the manifest) are transmitted to the viewer via the manifest * New context
(/IHEInvokeImageDisplay) compliant to the IHE IID profile * Parameters at
patient level defined in IID profile (mostRecentResults, lowerDateTime,
upperDateTime, modalitiesInStudy) are also available in the other contexts
(/viewer, /viewer-applet and /manifest) * Allows to have on different servers
the following components: weasis-pacs-connector, PACS, Weasis, weasis-ext
(additional plugins) and jnlp templates * Major improvement of the JNLP
builder servlet (allows dynamic injection of arguments, properties and
templates) * Option for DICOM query in TLS mode * Launching Weasis as an
Applet in web page * Uploading the manifest by http POST * Option to embed the
manifest into the jnlp

http://www.dcm4che.org/confluence/display/WEA/How+to+launch+Weasis+from+any+environments

There are two Weasis distributions: the WEB distribution (weasis.war) and the
portable distribution (weasis-portable.zip). Here we are talking about how to connect
the WEB distribution with any web application.

The easiest way to launch Weasis from a web context is to use weasis-pacs-
connector. For connecting to dcm4chee web interface, follow the instructions
in Installing Weasis in DCM4CHEE.

weasis-pacs-connector
weasis-pacs-connector: standard usage

weasis-pacs-connector: when embedding the xml manifest


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

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).
2. <?xml version="1.0" encoding="UTF-8"?>
3. <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor
6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
4. <jnlp spec="1.6+" codebase="http://localhost:8080/weasis" href="">
5. <information>
6. <title>Weasis</title>
7. <vendor>Weasis Team</vendor>
8. <description>DICOM images viewer</description>
9. <description kind="short">An application to visualize and analyze
DICOM images.</description>
10. <description kind="one-line">DICOM images viewer</description>
11. <description kind="tooltip">Weasis</description>
12. </information>
13. <security>
14. <all-permissions />
15. </security>
16.
17. <resources>
18. <!-- Requires Java SE 6 update 10 release for jnlp extension
without codebase (substance.jnlp) -->
19. <j2se version="1.6.0_10+"
href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128m"
max-heap-size="512m" />
20. <j2se version="1.6.0_10+" initial-heap-size="128m" max-heap-
size="512m" />
21.
22. <jar href="http://localhost:8080/weasis/weasis-launcher.jar"
main="true" />
23. <jar href="http://localhost:8080/weasis/felix.jar" />
24.
25. <!-- 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 -->
26. <extension href="http://localhost:8080/weasis/substance.jnlp" />
27.
28. <!-- Allows to get files in pack200 compression, only since Weasis
1.1.2 -->
29. <property name="jnlp.packEnabled" value="true" />
30.
31. <!--
========================================================================
========================================= -->
32. <!-- Security Workaround. 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 -->
33. <!-- Required parameter. Define the location of config.properties
(the OSGI configuration and the list of plug-ins to install/start) -->
34. <property name="jnlp.weasis.felix.config.properties"
value="http://localhost:8080/weasis/conf/config.properties" />
35. <!-- Optional parameter. Define the location of ext-
config.properties (extend/override config.properties) -->
36. <property name="jnlp.weasis.felix.extended.config.properties"
value="http://localhost:8080/weasis-ext/conf/ext-config.properties" />
37. <!-- Required parameter. Define the code base of Weasis for the
JNLP -->
38. <property name="jnlp.weasis.weasis.codebase.url"
value="http://localhost:8080/weasis" />
39. <!-- Optional parameter. Define the code base ext of Weasis for
the JNLP -->
40. <property name="jnlp.weasis.weasis.codebase.ext.url"
value="http://localhost:8080/weasis-ext" />
41. <!-- Required parameter. OSGI console parameter -->
42. <property name="jnlp.weasis.gosh.args" value="-sc telnetd -p 17179
start" />
43. <!-- 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) -->
44. <property name="jnlp.weasis.apple.laf.useScreenMenuBar"
value="true" />
45. <!-- Optional parameter. Allows to get plug-ins translations -->
46. <property name="jnlp.weasis.weasis.i18n"
value="http://localhost:8080/weasis-i18n" />
47. <!-- Optional Weasis Documentation -->
48. <!-- <property name="jnlp.weasis.weasis.help.url" value="$
{cdb}/../weasis-doc" /> -->
49. <!--
========================================================================
========================================= -->
50. </resources>
51.
52. <application-desc main-class="org.weasis.launcher.WebstartLauncher">
53. <!-- Example for opening dicom files from remote xml file -->
54. <argument>$dicom:get -w
http://localhost:8080/dcm4chee-web/wadoQueries/wado_query3888637380.xml.
gz</argument>
55.
56. <!-- Example for opening dicom files from local foler -->
57. <argument>$dicom:get -l "/home/Images/MRIX
LUMBAR/"</argument>
58.
59. <!-- 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 -->
60. <argument>$dicom:get -i
"H4sIAAAAAAAAALVV7Y+aMBz+vr+i6XdLXwDBHHdxpy4mvgX0dvtkOqnaBOGO1qn//
RUQnW5uy3JHCC2/1+d5Wsrdw36TgB8iVzJLA0gQhkCkiyyW6SqAW71seBA83H+62/
E4m79uR..."</argument>
61.
62. <!-- Example for opening dicom files from URLs -->
63. <argument>$dicom:get -r http://server/images/img1.dcm
http://server/images/img2.dcm</argument>
64. </application-desc>
65. </jnlp>

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

Web 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?
upload=manifest).

66. 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:
<?xml version="1.0" encoding="utf-8" ?>
<wado_query xmlns= "http://www.weasis.org/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
wadoURL="http://localhost:8080/wado" requireOnlySOPInstanceUID="false"
additionnalParameters="" overrideDicomTagsList="" >
<Patient PatientID="VafMYPDf" PatientName="MATRIX"
PatientBirthDate="19450201" >
<Study StudyInstanceUID="2.16.840.1.113669.632.20.1211.10000322126"
StudyDescription="Angio^Membres inferieurs" StudyDate="20061006"
StudyTime="163746.921000" >
<Series
SeriesInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300005943"
SeriesDescription="V_Fl3d_cor_dynamique_SUB_MIP_COR" SeriesNumber="45"
Modality="MR" >
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006058"
InstanceNumber="1" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006176"
InstanceNumber="2" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006294"
InstanceNumber="3" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006412"
InstanceNumber="4" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006530"
InstanceNumber="5" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006648"
InstanceNumber="6" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006766"
InstanceNumber="7" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300006886"
InstanceNumber="8" />
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30000006100606325120300007001"
InstanceNumber="9" />
</Series>
<Series
SeriesInstanceUID="1.3.12.2.1107.5.2.31.30222.30010006100612371225000000838"
SeriesDescription="MIP TOTAL" SeriesNumber="63" Modality="MR" >
<Instance
SOPInstanceUID="1.3.12.2.1107.5.2.31.30222.30010006100612371225000000837"
InstanceNumber="1" />
</Series>
</Study>
</Patient>
<Patient PatientID="017589" PatientName="Validate WADAKOKOA"
PatientBirthDate="20010901" >
<Study StudyInstanceUID="1.2.392.200036.9107.500.11141010042100073"
StudyDescription="胸部立位 V→D犬 4" StudyDate="20100421" StudyTime="113836" >
<Series
SeriesInstanceUID="1.2.392.200036.9107.500.305.1410.141010042100073.121"
SeriesDescription="V→D犬 4" SeriesNumber="1" Modality="CR" >
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114831.109.101410"
InstanceNumber="1" />
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114828.234.101410"
InstanceNumber="2" />
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114823.421.101410"
InstanceNumber="3" />
</Series>
</Study>
</Patient>
</wado_query>

Important 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 im
request without transfer syntax should return the original syntax (this is the case in dcm4chee) or DICOMs encoded in Explicit VR Little
SeriesDescription and StudyDescription allow to immediately display the descriptions before downloading the images.

PACS requirement
The example above requires a PACS with a WADO server to retrieve the images.
Example that requires only a WEB server (Weasis will only download files - no WADO
requests)
<?xml version="1.0" encoding="utf-8" ?>
<wado_query xmlns= "http://www.weasis.org/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
wadoURL="http://localhost:8080/images" requireOnlySOPInstanceUID="false"
additionnalParameters="" overrideDicomTagsList="" >
<Patient PatientID="017589" PatientName="Validate WADAKOKOA"
PatientBirthDate="20010901" >
<Study StudyInstanceUID="1.2.392.200036.9107.500.11141010042100073"
StudyDescription="胸部立位 V→D犬 4" StudyDate="20100421" StudyTime="113836" >
<Series
SeriesInstanceUID="1.2.392.200036.9107.500.305.1410.141010042100073.121"
SeriesDescription="V→D犬 4" SeriesNumber="1" Modality="CR"
DirectDownloadThumbnail="thumb_4563173729424544.jpg" >
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114831.109.101410"
InstanceNumber="1" DirectDownloadFile="image_4563173729424543.dcm"/>
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114828.234.101410"
InstanceNumber="2" DirectDownloadFile="image_4563173729424544.dcm"/>
<Instance
SOPInstanceUID="1.2.392.200036.9107.500.305.1410.20100421.114823.421.101410"
InstanceNumber="3" DirectDownloadFile="image_4563173729424545.dcm"/>
</Series>
</Study>
</Patient>
</wado_query>

Important Parameters:
The same ones as above.
DirectDownloadFile defines the URL of the DICOM file to download (the final URL is the combination of wadoURL + DirectDownloadF
DirectDownloadThumbnail defines the URL of the JPEG file representing the series (the final URL is the combination of wadoURL + Di

You might also like