# HG changeset patch # User Sebastien Jodogne # Date 1468999568 -7200 # Node ID 669ea65ba7fbf65f909bc0018935a1a324bcbc8f # Parent 25fa874803ab93d8ce98772029e36298105557b2 fix links diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/developers/coding-style.rst --- a/Sphinx/source/developers/coding-style.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/developers/coding-style.rst Wed Jul 20 09:26:08 2016 +0200 @@ -52,7 +52,7 @@ keyword (the code being moved at the end of the header) * Rule 40: Use ``#pragma once`` in each header file (cf. `Wikipedia - `__) + `__) * Rules 73 and 80: Use Visual Studio's default style that does not add two whitespaces in front of public, protected, private and case:: @@ -71,7 +71,7 @@ ---------------- * Use C++ exceptions, avoid error codes. -* Use the `RAII design pattern `__ (Resource Allocation Is Initialization) wherever possible. +* Use the `RAII design pattern `__ (Resource Allocation Is Initialization) wherever possible. * No C-style casting, use ``static_cast``, ``reinterpret_cast``, ``dynamic_cast`` and ``const_cast``. * Never use ``using namespace`` in header files (except inside inline @@ -81,7 +81,27 @@ * Minimize the number of #include in header files. * Never use ``catch (...)``, except when protecting non-Orthanc code. * To ease unit testing, favor the `JavaBeans - `__ conventions: + `__ conventions: * Single constructor without argument, * Use getters/setters. + + +Conventions for pointers and references +--------------------------------------- + +Except when clearly stated in the documentation: + +* A function that receives a **reference** to an object as an argument + is not responsible for the lifecycle of the object, and must not + ``delete`` it. The object is allowed to keep this reference in a + member variable. The caller must ensure that the referenced object + will not be freed between the object that references it. +* A function that receives a **pointer** to an object as an argument + takes the ownership of the object. +* A function that returns a **reference** to an object indicates that + the object should not be freed by the caller. +* A function that returns a **pointer** to an object transfers its + ownership to the caller. Occasionally, a pointer is also returned to + indicate the presence or the absence (represented by ``NULL``) of + some resource: In such a case, the pointer must not be freed. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/developers/creating-plugins.rst --- a/Sphinx/source/developers/creating-plugins.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/developers/creating-plugins.rst Wed Jul 20 09:26:08 2016 +0200 @@ -17,11 +17,25 @@ (in the ``Plugins/Samples`` folder of the ``plugins`` branch). A tutorial showing how to implement a basic WADO server is `available on CodeProject -`__. +`__. + +We suggest developers to adopt the :ref:`coding style of the Orthanc +core `, although this is of course not required. + +Do not hesitate to `contact us +`__ if you wish +your plugin to be **indexed** in :ref:`this part of the Orthanc Book +`! + + +Structure of the plugins +------------------------ A plugin takes the form of a shared library (``.DLL`` under Windows, -``.so`` under Linux, ``.dylib`` under Apple OS X...) that must declare 4 -public functions/symbols: +``.so`` under Linux, ``.dylib`` under Apple OS X...) that use the `ABI +of the C language +`__ to +declare 4 public functions/symbols: * ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This callback function is responsible for initializing the plugin. The @@ -33,11 +47,8 @@ * ``const char* OrthancPluginGetVersion()``. This function must provide the version of the plugin. -We suggest developers to adopt the :ref:`coding style of the Orthanc -core `, although this is of course not required. - -Do not hesitate to `contact us -`__ if you wish -your plugin to be **indexed** in :ref:`this part of the Orthanc Book -`! - +*Remark:* The size of the memory buffers that are exchanged between +the Orthanc core and the plugins must be below 4GB. This is a +consequence of the fact that the Orthanc plugin SDK uses ``uint32_t`` +to encode the size of a memory buffer. We might extend the SDK in +the future to deal with buffers whose size if above 4GB. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/dicom-guide.rst --- a/Sphinx/source/dicom-guide.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/dicom-guide.rst Wed Jul 20 09:26:08 2016 +0200 @@ -15,7 +15,7 @@ DICOM, such as the so-called "`Practical introduction and survival guide `__", or to read the full `DICOM specification -`__. +`__. All the DICOM concepts that are defined in this introduction are illustrated with `Orthanc `__, a @@ -151,7 +151,7 @@ This concludes our overview of the DICOM file format itself. It is now important to give an overview of the so-called "**DICOM model of the real world**" (`source -`__): +`__): .. image:: images/PS3.4_C.6-1.svg :align: center diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/compiling-old.rst --- a/Sphinx/source/faq/compiling-old.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/compiling-old.rst Wed Jul 20 09:26:08 2016 +0200 @@ -77,9 +77,9 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You have to build and install `CMake 2.8 from source -`_, or you can use +`_, or you can use the cmake28 package from `EPEL -`_. The +`_. The ``STATIC_BUILD=ON`` option will then work:: $ /usr/local/bin/cmake -DSTATIC_BUILD:BOOL=ON -DCMAKE_BUILD_TYPE=Debug diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/compiling.rst --- a/Sphinx/source/faq/compiling.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/compiling.rst Wed Jul 20 09:26:08 2016 +0200 @@ -32,11 +32,11 @@ --------------------------------------- The build infrastructure of Orthanc is based upon `CMake -`_. The build scripts are designed to embed all +`_. The build scripts are designed to embed all the third-party dependencies directly inside the Orthanc executable. This is the meaning of the ``-DSTATIC_BUILD=TRUE`` option, as described in the `INSTALL -`_ file of Orthanc. +`_ file of Orthanc. Such a static linking is very desirable under Windows, since the Orthanc binaries do not depend on any external DLL, which results in a @@ -44,7 +44,7 @@ binaries and execute them), which eases the setup of the development machines (no external library is to be manually installed, everything is downloaded during the build configuration), and which avoids the -`DLL hell `_. As a downside, +`DLL hell `_. As a downside, this makes our build infrastructure rather complex. Static linking is not as desirable under Linux than under diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/features.rst --- a/Sphinx/source/faq/features.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/features.rst Wed Jul 20 09:26:08 2016 +0200 @@ -64,7 +64,7 @@ also consider using **disk space compression**. When compression is enabled, Orthanc compresses the incoming DICOM instances on-the-fly before writing them to the filesystem, using `zlib -`_. This is useful, because the +`_. This is useful, because the images are often stored as raw, uncompressed arrays in DICOM instances: The size of a typical DICOM instance can hopefully be divided by a factor 2 through lossless compression. This compression diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/https.rst --- a/Sphinx/source/faq/https.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/https.rst Wed Jul 20 09:26:08 2016 +0200 @@ -24,22 +24,22 @@ To enable the built-in HTTP server of Orthanc, you need to: -1. Obtain a `X.509 certificate `_ +1. Obtain a `X.509 certificate `_ in the `PEM format - `_. + `_. 2. Prepend this certificate with the content of your private key. 3. Modify the ``SslEnabled`` and ``SslCertificate`` variables in the :ref:`Orthanc configuration file `. Here are simple instructions to create a self-signed SSL certificate that is suitable for test environments with the `OpenSSL -`_ command-line tools:: +`_ command-line tools:: $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out certificate.crt $ cat private.key certificate.crt > certificate.pem Some interesting references about this topic can be found `here -`__, `here +`__, `here `__, and `here `__. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/orthanc-ids.rst --- a/Sphinx/source/faq/orthanc-ids.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/orthanc-ids.rst Wed Jul 20 09:26:08 2016 +0200 @@ -7,7 +7,7 @@ an unique identifier that is derived from the DICOM identifiers. Contrarily to the :ref:`identifiers of the DICOM standard `, the Orthanc identifiers are formatted as a -`SHA-1 hash `__ with a fixed +`SHA-1 hash `__ with a fixed length, so as to be more Web-friendly. More specifically: * Patients are identified as the SHA-1 hash of their PatientID tag diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/supported-images.rst --- a/Sphinx/source/faq/supported-images.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/supported-images.rst Wed Jul 20 09:26:08 2016 +0200 @@ -28,7 +28,7 @@ Other type of encodings are available in the `Web viewer plugin `__, that mostly supports whatever is supported by the well-known `GDCM toolkit -`__ by Mathieu Malaterre. Note +`__ by Mathieu Malaterre. Note that multiframe (notably cine) DICOM instances are currently not supported by the Web viewer plugin. It is also planned to create a `plugin to extend the image formats `__ diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/viewers.rst --- a/Sphinx/source/faq/viewers.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/viewers.rst Wed Jul 20 09:26:08 2016 +0200 @@ -11,9 +11,9 @@ with Orthanc (do not hesitate to `warn us `__ about other compatible FOSS): -* `Horos `__. -* `Gingko CADx `__ (a :ref:`configuration - guide ` is available). +* `Horos `__. +* `Gingko CADx `__ (a + :ref:`configuration guide ` is available). * `3D Slicer `__. * `medInria `__. * `Aeskulap `__. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/faq/why-orthanc.rst --- a/Sphinx/source/faq/why-orthanc.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/faq/why-orthanc.rst Wed Jul 20 09:26:08 2016 +0200 @@ -2,13 +2,13 @@ ============== The spelling "`Orthanc -`__" originates from +`__" originates from `J.R.R. Tolkien `__'s work. Orthanc is the black tower of Isengard that houses one of the **palantíri**. A `palantír -`__ is a spherical stone +`__ is a spherical stone whose name literally means "One that Sees from Afar". When one looks into a palantír, one can communicate with other such stones and anyone who might be looking into them. This is quite similar to the Orthanc diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/plugins.rst --- a/Sphinx/source/plugins.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/plugins.rst Wed Jul 20 09:26:08 2016 +0200 @@ -3,6 +3,11 @@ Plugins ======= +.. contents:: + +Overview +-------- + The core of Orthanc can be extended through **plugins**. A plugin takes the form of a shared library (``.DLL`` under Windows, ``.so`` under Linux, ``.dylib`` under Apple OS X...). A plugin can do various @@ -20,6 +25,10 @@ in the official :ref:`DICOMweb ` plugin). * **Reacting** to the arrival of new DICOM images or other DICOM-related events so as to carry on automated processing. +* ... + +Developers external to the official Orthanc project are :ref:`invited +to contribute ` by creating third-party plugins. .. _plugins-official: @@ -48,5 +57,5 @@ `__ and extends Orthanc with a Web viewer of DICOM images. * Another Web viewer is provided courtesy of `Emsy Chan - `__. + `__. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/plugins/dicomweb.rst --- a/Sphinx/source/plugins/dicomweb.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/plugins/dicomweb.rst Wed Jul 20 09:26:08 2016 +0200 @@ -8,4 +8,4 @@ protocols `__. More precisely, the plugin introduces a basic, reference implementation of WADO-URI, WADO-RS, QIDO-RS and STOW-RS, following `DICOM PS3.18 -`__. +`__. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/users/backup.rst --- a/Sphinx/source/users/backup.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/users/backup.rst Wed Jul 20 09:26:08 2016 +0200 @@ -50,4 +50,4 @@ running), and you benefit from all the flexibility of PostgreSQL backup. These procedures are out of the scope of this manual. Please check the `official backup and restore manual -`__. +`__. diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/users/lua.rst --- a/Sphinx/source/users/lua.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/users/lua.rst Wed Jul 20 09:26:08 2016 +0200 @@ -6,7 +6,7 @@ .. contents:: Since release 0.5.2, Orthanc supports server-side scripting through -the `Lua `__ +the `Lua `__ scripting language. Thanks to this major feature, Orthanc can be tuned to specific medical workflows without being driven by an external script. This page summarizes the possibilities of Orthanc server-side @@ -45,7 +45,7 @@ *Note:* The ``--data-binary`` cURL option is used instead of ``--data`` to prevent the interpretation of newlines by cURL, which is `mandatory for the proper evaluation -`__ of the possible +`__ of the possible comments inside the Lua script. @@ -248,7 +248,7 @@ ``true``. This mechanism can be used to implement fine-grained `access control -lists `__. Here is +lists `__. Here is an example of a Lua script that limits POST, PUT and DELETE requests to an user that is called "admin":: diff -r 25fa874803ab -r 669ea65ba7fb Sphinx/source/users/rest.rst --- a/Sphinx/source/users/rest.rst Mon Jul 18 17:36:02 2016 +0200 +++ b/Sphinx/source/users/rest.rst Wed Jul 20 09:26:08 2016 +0200 @@ -20,7 +20,7 @@ can also be done through REST queries. *Note:* All the examples are illustrated with the `cURL command-line -tool `__, but equivalent calls can be readily +tool `__, but equivalent calls can be readily transposed to any programming language that supports both HTTP and JSON. @@ -50,7 +50,7 @@ Note that in the case of curl, setting the ``Expect`` HTTP Header will significantly `reduce the execution time of POST requests -`__:: +`__:: $ curl -X POST -H "Expect:" http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm @@ -83,7 +83,7 @@ $ curl http://localhost:8042/instances Note that the result of this command is a `JSON file -`__ that contains an array of +`__ that contains an array of resource identifiers. The JSON file format is lightweight and can be parsed from almost any computer language. @@ -93,7 +93,7 @@ .. highlight:: bash To access a single resource, add its identifier to the `URI -`__. You +`__. You would for instance retrieve the main information about one patient as follows:: @@ -475,7 +475,7 @@ by Orthanc. It records that a new instance, a new series, a new study and a new patient has been created inside Orthanc. Note that each changes is labeled by a ``ChangeType``, a ``Date`` (in the `ISO format -`__), the location of the +`__), the location of the resource inside Orthanc, and a sequence number (``Seq``). Note that this call is non-blocking. It is up to the calling program