Mercurial > hg > orthanc
annotate Resources/Samples/WebApplications/README.txt @ 2107:88831c3edd8f
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Oct 2016 17:22:09 +0200 |
parents | 2f63c225c4c0 |
children |
rev | line source |
---|---|
816
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 =================== |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 GENERAL INFORMATION |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 =================== |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 This folder contains sample Web applications. |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 These Web applications make use of NodeJs (http://nodejs.org/). To run |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 the applications, you therefore need to install NodeJs on your |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 computer. NodeJs acts here as a lightweight, cross-platform Web server |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 that statically serves the HTML/JavaScript files and that dynamically |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 serves the Orthanc REST API as a reverse proxy (to avoid cross-domain |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 problems with AJAX). |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 Once NodeJs is installed, start Orthanc with default parameters |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 (i.e. HTTP port set to 8042), start NodeJs with the sample application |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 you are interested in (e.g. "node DrawingDicomizer.js"). Then, open |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 http://localhost:8000/ with a standard Web browser to try the sample |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 application. |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 ======================================= |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 DRAWING DICOMIZER (DrawingDicomizer.js) |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 ======================================= |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 This sample shows how to convert the content of a HTML5 canvas as a |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 DICOM file, using a single AJAX request to Orthanc. |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 Internally, the content of the HTML5 canvas is serialized through the |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 standard "toDataURL()" method of the canvas object. This returns a |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 string containing the PNG image encoded using the Data URI Scheme |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 (http://en.wikipedia.org/wiki/Data_URI_scheme). Such a string is then |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 sent to Orthanc using the '/tools/create-dicom' REST call, that |
2f63c225c4c0
readme Web applications
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 transparently decompresses the PNG image into a DICOM image. |