# HG changeset patch # User Sebastien Jodogne # Date 1702989371 -3600 # Node ID 3b62529bfe91936932385449a7b90105846fd2d7 # Parent bd7fbe3042f7f37069567ab458882f79b67b5d0f added java plugin diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/contributing.rst --- a/Sphinx/source/contributing.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/contributing.rst Tue Dec 19 13:36:11 2023 +0100 @@ -132,7 +132,7 @@ `__ to import/export such STL files from/to Orthanc. + Create a plugin to edit DICOM files (add, update or remove DICOM tags). - + Create samples of :ref:`Python plugins ` to take + + Create samples of :ref:`Python plugins ` or :ref:`Java plugins ` to take care of HL7 messages, especially for :ref:`merging patients ` (which is a `typical HL7 event `__ @@ -147,7 +147,7 @@ clients/viewers), or a `DICOMweb proxy `__ (to turn a DICOM-only PACS into a DICOMweb server). This could - be done as a :ref:`Python plugin ` by wrapping + be done as a :ref:`Python plugin ` or as a :ref:`Java plugin ` by wrapping the C-FIND and C-MOVE callbacks in the Python API. + Get involved in the call for ideas by Salim Kanoun about a `DICOM router built on the top of Orthanc diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/developers/creating-plugins.rst --- a/Sphinx/source/developers/creating-plugins.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/developers/creating-plugins.rst Tue Dec 19 13:36:11 2023 +0100 @@ -23,9 +23,10 @@ `__ (such as Rust or Objective-C). -For developers who are more familiar with Python, it is also possible -to create plugins using this simpler language. Check out the -:ref:`dedicated Python plugin `. +For developers who are more familiar with Python or Java, it is also +possible to create plugins using either of those simpler +languages. Check out the :ref:`dedicated Python plugin +` or the :ref:`dedicated Java plugin `. Because the C header providing the Orthanc SDK interface is licensed using the GPLv3 license, any Orthanc plugin must be licensed either diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/faq/licensing.rst --- a/Sphinx/source/faq/licensing.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/faq/licensing.rst Tue Dec 19 13:36:11 2023 +0100 @@ -85,8 +85,9 @@ | AGPL-licensed plugin is installed | | | | | | | +-----------------------------------------------------+---------------+-------+--------+--------------+------------------------+-------------------+ | Creating a :ref:`C/C++ plugin `, | | | | | | | -| creating a :ref:`Lua script `, or | | | | | | | -| creating a :ref:`Python plugin `. | | | | | | | +| creating a :ref:`Lua script `, | | | | | | | +| creating a :ref:`Python plugin `, or | | | | | | | +| creating a :ref:`Java plugin `. | | | | | | | | 2 possible cases: | | | | | | | +----+------------------------------------------------+---------------+-------+--------+--------------+------------------------+-------------------+ | | Case 1: No AGPL-licensed plugin is in use | No | Yes | Yes | Yes | Dual license | Yes | diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/faq/scalability.rst --- a/Sphinx/source/faq/scalability.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/faq/scalability.rst Tue Dec 19 13:36:11 2023 +0100 @@ -346,9 +346,10 @@ three possibilities: (1) Introduce a distinguished Orthanc server that is responsible to take care of all the jobs (including modalities and peers), (2) create an :ref:`Orthanc plugin ` - (e.g. using :ref:`Python `) that queries all the - Orthanc in the cluster and that aggregates all of their answers, - or (3) do the same using a higher-level framework (such as Node.js). + (e.g. using :ref:`Python ` or :ref:`Java + `) that queries all the Orthanc in the cluster and that + aggregates all of their answers, or (3) do the same using a + higher-level framework (such as Node.js). Latency diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/plugins.rst --- a/Sphinx/source/plugins.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/plugins.rst Tue Dec 19 13:36:11 2023 +0100 @@ -88,6 +88,7 @@ plugins/indexer.rst plugins/neuro.rst plugins/multitenant-dicom.rst + plugins/java.rst .. _plugins-contributed: diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/plugins/java.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sphinx/source/plugins/java.rst Tue Dec 19 13:36:11 2023 +0100 @@ -0,0 +1,67 @@ +.. _java-plugin: + + +Java plugin for Orthanc +======================= + +.. contents:: + + +Overview +-------- + +This plugin can be used to write :ref:`Orthanc plugins +` using the `Java programming language +`__ instead +of the more complex C/C++ programming languages. + +Java plugins have access to more features and a more consistent SDK +than :ref:`Lua scripts `. The largest part of the Java API is +automatically generated from the `Orthanc plugin SDK in C +`__ +using the `Clang `__ compiler +front-end. + +As of release 1.0 of the plugin, the coverage of the C SDK is about +76% (122 functions are automatically wrapped in Java out of a total of +160 functions from the Orthanc SDK 1.10.0). + + +Source code +----------- + +* Link to the `official releases of this plugin + `__. + +* Link to the `code repository + `__. + + +Licensing +--------- + +This plugin is licensed under the terms of the `GPLv3+ license +`__, +which is the same as the core of Orthanc. + +This has an important consequence: If you distribute Orthanc to +clients together with one Java plugin, you **must** disclose the +source code of your Java script to the Orthanc community under the +terms of the GPL or AGPL licenses. + +We suggest you to put the source code of your Java scripts on the +dedicated `"OrthancContributed" repository on GitHub +`__, +and/or to send it to the `Orthanc Users discussion forum +`__. + +Check out the :ref:`FAQ about licensing ` for more context. + + +Usage +----- + + +FHIR server +----------- + diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/plugins/stone-webviewer.rst --- a/Sphinx/source/plugins/stone-webviewer.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/plugins/stone-webviewer.rst Tue Dec 19 13:36:11 2023 +0100 @@ -166,7 +166,7 @@ API of Orthanc `__. It would be easy to automate this workflow using a :ref:`Python - plugin `. + plugin ` or a :ref:`Java plugin `. If you have an interest in DICOM-SR, the Orthanc community would love to have access to sample DICOM files that could be used to diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/users/cookbook.rst --- a/Sphinx/source/users/cookbook.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/users/cookbook.rst Tue Dec 19 13:36:11 2023 +0100 @@ -56,11 +56,12 @@ $ /etc/init.d/orthanc start Note that this standalone Debian repository **does not** contain the -:ref:`Python plugin `, as this plugin must be -dynamically linked against the system-wide version of your Python -runtime. You should install the ``orthanc-python`` package from your -native Debian/Ubuntu distribution if available, or compile the plugin -from sources. +:ref:`Python plugin ` and the :ref:`Java plugin +`, because these plugins must be dynamically linked +against the system-wide version of your Python or Java runtime +environment. You should install the ``orthanc-python`` or +``orthanc-java`` package from your native Debian/Ubuntu distribution +if available, or compile the plugin from sources. .. _orthanc-explorer: diff -r bd7fbe3042f7 -r 3b62529bfe91 Sphinx/source/users/lua.rst --- a/Sphinx/source/users/lua.rst Mon Dec 18 09:47:49 2023 +0100 +++ b/Sphinx/source/users/lua.rst Tue Dec 19 13:36:11 2023 +0100 @@ -16,7 +16,8 @@ `__. A more expressive alternative to Lua scripts is provided by -:ref:`Python plugins `. +:ref:`Python plugins ` and :ref:`Java plugins +`. Installing a Lua script