comparison Resources/Samples/WebApplications/README.txt @ 816:2f63c225c4c0

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