comparison Sphinx/source/users/lua.rst @ 360:d217af5e6cb3

links to hg
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Mar 2020 20:14:52 +0200
parents 011b01ccf52d
children 1974913fd28a
comparison
equal deleted inserted replaced
359:9acb9354da1a 360:d217af5e6cb3
11 to specific medical workflows without being driven by an external 11 to specific medical workflows without being driven by an external
12 script. This page summarizes the possibilities of Orthanc server-side 12 script. This page summarizes the possibilities of Orthanc server-side
13 scripting. 13 scripting.
14 14
15 Many other examples are `available in the source distribution 15 Many other examples are `available in the source distribution
16 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/>`__. 16 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Lua/>`__.
17 17
18 18
19 Installing a Lua script 19 Installing a Lua script
20 ----------------------- 20 -----------------------
21 21
106 * ``function IncomingFindRequestFilter(source, origin)``: Invoked 106 * ``function IncomingFindRequestFilter(source, origin)``: Invoked
107 whenever Orthanc receives an incoming C-Find query through the DICOM 107 whenever Orthanc receives an incoming C-Find query through the DICOM
108 protocol. This allows to inspect the content of the C-Find query, 108 protocol. This allows to inspect the content of the C-Find query,
109 and possibly modify it if a patch is needed for some manufacturer. A 109 and possibly modify it if a patch is needed for some manufacturer. A
110 `sample script is available 110 `sample script is available
111 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/IncomingFindRequestFilter.lua>`__. 111 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Lua/IncomingFindRequestFilter.lua>`__.
112 112
113 Some other **resource-related events** are available: 113 Some other **resource-related events** are available:
114 114
115 * ``function OnDeletedPatient(patientId)``: Invoked when a patient has 115 * ``function OnDeletedPatient(patientId)``: Invoked when a patient has
116 been removed from the Orthanc database (new in Orthanc 1.6.0). 116 been removed from the Orthanc database (new in Orthanc 1.6.0).
135 135
136 Furthermore, whenever a DICOM association is negotiated for C-Store 136 Furthermore, whenever a DICOM association is negotiated for C-Store
137 SCP, several callbacks are successively invoked to specify which 137 SCP, several callbacks are successively invoked to specify which
138 **transfer syntaxes** are accepted for the association. These 138 **transfer syntaxes** are accepted for the association. These
139 callbacks are listed in `this sample script 139 callbacks are listed in `this sample script
140 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/TransferSyntaxEnable.lua>`__. 140 <https://hg.orthanc-server.com/orthanc/file/default/Resources/Samples/Lua/TransferSyntaxEnable.lua>`__.
141 141
142 *Note:* All of these callbacks are guaranteed to be **invoked in 142 *Note:* All of these callbacks are guaranteed to be **invoked in
143 mutual exclusion**. This implies that Lua scripting in Orthanc does 143 mutual exclusion**. This implies that Lua scripting in Orthanc does
144 not support any kind of concurrency. 144 not support any kind of concurrency.
145 145