changeset 24:25fa874803ab

plugins inside book
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 18 Jul 2016 17:36:02 +0200
parents f99aa6a6f0c9
children 669ea65ba7fb
files Sphinx/source/contributing.rst Sphinx/source/developers.rst Sphinx/source/developers/coding-style.rst Sphinx/source/developers/creating-plugins.rst Sphinx/source/index.rst Sphinx/source/plugins.rst Sphinx/source/plugins/dicomweb.rst Sphinx/source/plugins/postgresql.rst Sphinx/source/plugins/serve-folders.rst Sphinx/source/plugins/webviewer.rst Sphinx/source/plugins/worklists-plugin.rst
diffstat 11 files changed, 151 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/contributing.rst	Thu Jul 14 09:47:19 2016 +0200
+++ b/Sphinx/source/contributing.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -1,3 +1,5 @@
+.. _contributing:
+
 Contributing to Orthanc
 =======================
 
--- a/Sphinx/source/developers.rst	Thu Jul 14 09:47:19 2016 +0200
+++ b/Sphinx/source/developers.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -4,5 +4,6 @@
 .. toctree::
    :maxdepth: 1
 
+   developers/creating-plugins.rst
+   developers/coding-style.rst
    developers/db-versioning.rst
-   developers/coding-style.rst
--- a/Sphinx/source/developers/coding-style.rst	Thu Jul 14 09:47:19 2016 +0200
+++ b/Sphinx/source/developers/coding-style.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -1,3 +1,4 @@
+.. _coding-style:
 .. highlight:: c++
 
 Coding style
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/developers/creating-plugins.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,43 @@
+Creating new plugins
+====================
+
+The recommended way of :ref:`contributing to the Orthanc code <contributing>`
+is by extending it by :ref:`creating new plugins <plugins>`.
+
+Overview
+--------
+
+Orthanc plugins must use the `plugin SDK
+<https://orthanc.chu.ulg.ac.be/sdk/index.html>`__ and must be written
+in C or C++. They must also fullfil the terms of the `GPLv3 license
+<http://www.gnu.org/licenses/quick-guide-gplv3.en.html>`__ that is
+used by the core of Orthanc. Sample code for plugins can be found `in
+the official Orthanc repository
+<https://bitbucket.org/sjodogne/orthanc/src/default/Plugins/Samples/>`__
+(in the ``Plugins/Samples`` folder of the ``plugins`` branch). A
+tutorial showing how to implement a basic WADO server is `available on
+CodeProject
+<http://codeproject.com/Articles/797118/Implementing-a-WADO-Server-using-Orthanc>`__.
+
+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:
+
+* ``int32_t OrthancPluginInitialize(OrthancPluginContext* context)``. This
+  callback function is responsible for initializing the plugin. The
+  ``context`` argument gives access to the API of Orthanc.
+* ``void OrthancPluginFinalize()``. This function is responsible
+  for finalizing the plugin, releasing all the allocated resources.
+* ``const char* OrthancPluginGetName()``. This function must give a
+  name to the plugin.
+* ``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 <coding-style>`, although this is of course not required.
+
+Do not hesitate to `contact us
+<http://www.orthanc-server.com/static.php?page=contact>`__ if you wish
+your plugin to be **indexed** in :ref:`this part of the Orthanc Book
+<plugins-contributed>`!
+
--- a/Sphinx/source/index.rst	Thu Jul 14 09:47:19 2016 +0200
+++ b/Sphinx/source/index.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -17,6 +17,7 @@
 
    users.rst
    dicom-guide.rst
+   plugins.rst
    developers.rst
    faq.rst
    contributing.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,52 @@
+.. _plugins:
+
+Plugins
+=======
+
+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
+things, among others:
+
+* Serving new **Web applications** that have full access to the REST
+  API of Orthanc, which makes easy to handle DICOM images from
+  JavaScript code.
+* Replacing **the way DICOM images are decoded** (e.g. the official
+  :ref:`Web viewer plugin <webviewer>` introduces the decoding of
+  JPEG2000 images, which is not available in the core of Orthanc).
+* Replacing the default **database back-end** of Orthanc (that is built
+  upon SQLite) by another (:ref:`PostgreSQL <postgresql>`, MySQL, SQL Server...).
+* Creating **new REST APIs** on the top of the Orthanc built-in API (as in
+  in the official :ref:`DICOMweb <dicomweb>` plugin).
+* **Reacting** to the arrival of new DICOM images or other
+  DICOM-related events so as to carry on automated processing.
+
+
+.. _plugins-official:
+
+Index of the official plugins
+-----------------------------
+
+.. toctree::
+   :maxdepth: 1
+
+   plugins/serve-folders.rst
+   plugins/dicomweb.rst
+   plugins/postgresql.rst
+   plugins/webviewer.rst
+   plugins/worklists-plugin.rst
+
+
+.. _plugins-contributed:
+
+Index of the contributed plugins
+--------------------------------
+
+* `DWV Orthanc Plugin
+  <https://github.com/ivmartel/dwv-orthanc-plugin>`__: This plugin by
+  Yves Martelli is based on `dwv
+  <https://github.com/ivmartel/dwv/wiki>`__ and extends Orthanc with a
+  Web viewer of DICOM images.
+* Another Web viewer is provided courtesy of `Emsy Chan
+  <https://groups.google.com/forum/#!topic/orthanc-users/EC5Z2KaM4Hs>`__.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/dicomweb.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,11 @@
+.. _dicomweb:
+
+
+DICOMweb plugin
+===============
+
+This **official** plugin extends Orthanc with support of the `DICOMweb
+protocols <https://en.wikipedia.org/wiki/DICOMweb>`__. More precisely,
+the plugin introduces a basic, reference implementation of WADO-URI,
+WADO-RS, QIDO-RS and STOW-RS, following `DICOM PS3.18
+<http://medical.nema.org/medical/dicom/current/output/html/part18.html>`__.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/postgresql.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,7 @@
+.. _postgresql:
+
+
+PostgreSQL plugins
+==================
+
+Two **official** plugins to replace the default storage area (on the filesystem) and the default SQLite index by PostgreSQL.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/serve-folders.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,15 @@
+.. _serve-folders:
+
+
+Serve Folders plugin
+====================
+
+This **official** plugin enables Orthanc to serve additional folders
+from the filesystem using its embedded Web server.
+
+This plugin is extremely useful to create new Web applications on the
+top of the REST API of Orthanc, as it allows to fulfill the
+`same-origin policy
+<https://en.wikipedia.org/wiki/Same-origin_policy>`__ without setting
+up a reverse proxy.
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/webviewer.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,7 @@
+.. _webviewer:
+
+
+Web Viewer plugin
+=================
+
+This **official** plugin extends Orthanc with a Web viewer of medical images.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/plugins/worklists-plugin.rst	Mon Jul 18 17:36:02 2016 +0200
@@ -0,0 +1,10 @@
+.. _worklists-plugin:
+
+
+Modality Worklists plugin
+=========================
+
+This **official** plugin turns Orthanc into a server of DICOM
+worklists. The worklists must be provided in some folder of the
+filesystem by an external script. The support of DICOM worklists in
+Orthanc is explained in the :ref:`FAQ <worklist>`.