Mercurial > hg > orthanc
annotate Plugins/Include/orthanc/OrthancCPlugin.h @ 1740:5e99a70b0635
DicomToJson callable from plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 22 Oct 2015 19:53:51 +0200 |
parents | b80e76dd1d56 |
children | 06addfcd1d4c |
rev | line source |
---|---|
906
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
1 /** |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
2 * \mainpage |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
3 * |
907 | 4 * This C/C++ SDK allows external developers to create plugins that |
5 * can be loaded into Orthanc to extend its functionality. Each | |
6 * Orthanc plugin must expose 4 public functions with the following | |
906
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
7 * signatures: |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
8 * |
907 | 9 * -# <tt>int32_t OrthancPluginInitialize(const OrthancPluginContext* context)</tt>: |
10 * This function is invoked by Orthanc when it loads the plugin on startup. | |
1041
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
11 * The plugin must: |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
12 * - Check its compatibility with the Orthanc version using |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
13 * ::OrthancPluginCheckVersion(). |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
14 * - Store the context pointer so that it can use the plugin |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
15 * services of Orthanc. |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
16 * - Register all its REST callbacks using ::OrthancPluginRegisterRestCallback(). |
1466
0cd0f2ad3599
Fix potential deadlock in the callbacks of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1430
diff
changeset
|
17 * - Possibly register its callback for received DICOM instances using ::OrthancPluginRegisterOnStoredInstanceCallback(). |
0cd0f2ad3599
Fix potential deadlock in the callbacks of plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1430
diff
changeset
|
18 * - Possibly register its callback for changes to the DICOM store using ::OrthancPluginRegisterOnChangeCallback(). |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
19 * - Possibly register a custom storage area using ::OrthancPluginRegisterStorageArea(). |
1609
c74495267acf
Implementation of the "GetAllPublicIdsWithLimit" extension
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1608
diff
changeset
|
20 * - Possibly register a custom database back-end area using OrthancPluginRegisterDatabaseBackendV2(). |
907 | 21 * -# <tt>void OrthancPluginFinalize()</tt>: |
22 * This function is invoked by Orthanc during its shutdown. The plugin | |
23 * must free all its memory. | |
24 * -# <tt>const char* OrthancPluginGetName()</tt>: | |
25 * The plugin must return a short string to identify itself. | |
1041
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
26 * -# <tt>const char* OrthancPluginGetVersion()</tt>: |
907 | 27 * The plugin must return a string containing its version number. |
28 * | |
29 * The name and the version of a plugin is only used to prevent it | |
1602 | 30 * from being loaded twice. Note that, in C++, it is mandatory to |
31 * declare these functions within an <tt>extern "C"</tt> section. | |
907 | 32 * |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
33 * To ensure multi-threading safety, the various REST callbacks are |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
34 * guaranteed to be executed in mutual exclusion since Orthanc |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
35 * 0.8.5. If this feature is undesired (notably when developing |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
36 * high-performance plugins handling simultaneous requests), use |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
37 * ::OrthancPluginRegisterRestCallbackNoLock(). |
906
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
38 **/ |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
39 |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
40 |
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
41 |
900 | 42 /** |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
43 * @defgroup Images Images and compression |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
44 * @brief Functions to deal with images and compressed buffers. |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
45 * |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
46 * @defgroup REST REST |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
47 * @brief Functions to answer REST requests in a callback. |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
48 * |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
49 * @defgroup Callbacks Callbacks |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
50 * @brief Functions to register and manage callbacks by the plugins. |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
51 * |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
52 * @defgroup Orthanc Orthanc |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
53 * @brief Functions to access the content of the Orthanc server. |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
54 **/ |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
55 |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
56 |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
57 |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
58 /** |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
59 * @defgroup Toolbox Toolbox |
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
60 * @brief Generic functions to help with the creation of plugins. |
900 | 61 **/ |
62 | |
63 | |
906
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
64 |
886 | 65 /** |
66 * Orthanc - A Lightweight, RESTful DICOM Store | |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1282
diff
changeset
|
67 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics |
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1282
diff
changeset
|
68 * Department, University Hospital of Liege, Belgium |
886 | 69 * |
70 * This program is free software: you can redistribute it and/or | |
71 * modify it under the terms of the GNU General Public License as | |
72 * published by the Free Software Foundation, either version 3 of the | |
73 * License, or (at your option) any later version. | |
74 * | |
75 * In addition, as a special exception, the copyright holders of this | |
76 * program give permission to link the code of its release with the | |
77 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
78 * that use the same license as the "OpenSSL" library), and distribute | |
79 * the linked executables. You must obey the GNU General Public License | |
80 * in all respects for all of the code used other than "OpenSSL". If you | |
81 * modify file(s) with this exception, you may extend this exception to | |
82 * your version of the file(s), but you are not obligated to do so. If | |
83 * you do not wish to do so, delete this exception statement from your | |
84 * version. If you delete this exception statement from all source files | |
85 * in the program, then also delete it here. | |
86 * | |
87 * This program is distributed in the hope that it will be useful, but | |
88 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
89 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
90 * General Public License for more details. | |
91 * | |
92 * You should have received a copy of the GNU General Public License | |
93 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
94 **/ | |
95 | |
96 | |
906
cbc0ea03dffe
sample plugin configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
904
diff
changeset
|
97 |
886 | 98 #pragma once |
99 | |
100 | |
900 | 101 #include <stdio.h> |
102 #include <string.h> | |
103 | |
886 | 104 #ifdef WIN32 |
105 #define ORTHANC_PLUGINS_API __declspec(dllexport) | |
106 #else | |
107 #define ORTHANC_PLUGINS_API | |
108 #endif | |
109 | |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
110 #define ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER 0 |
1407
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
111 #define ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER 9 |
1629
bad4772b605c
OrthancPluginErrorCode in database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1628
diff
changeset
|
112 #define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 5 |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
113 |
886 | 114 |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
115 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
116 /******************************************************************** |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
117 ** Check that function inlining is properly supported. The use of |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
118 ** inlining is required, to avoid the duplication of object code |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
119 ** between two compilation modules that would use the Orthanc Plugin |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
120 ** API. |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
121 ********************************************************************/ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
122 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
123 /* If the auto-detection of the "inline" keyword below does not work |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
124 automatically and that your compiler is known to properly support |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
125 inlining, uncomment the following #define and adapt the definition |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
126 of "static inline". */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
127 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
128 /* #define ORTHANC_PLUGIN_INLINE static inline */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
129 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
130 #ifndef ORTHANC_PLUGIN_INLINE |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
131 # if __STDC_VERSION__ >= 199901L |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
132 /* This is C99 or above: http://predef.sourceforge.net/prestd.html */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
133 # define ORTHANC_PLUGIN_INLINE static inline |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
134 # elif defined(__cplusplus) |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
135 /* This is C++ */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
136 # define ORTHANC_PLUGIN_INLINE static inline |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
137 # elif defined(__GNUC__) |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
138 /* This is GCC running in C89 mode */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
139 # define ORTHANC_PLUGIN_INLINE static __inline |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
140 # elif defined(_MSC_VER) |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
141 /* This is Visual Studio running in C89 mode */ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
142 # define ORTHANC_PLUGIN_INLINE static __inline |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
143 # else |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
144 # error Your compiler is not known to support the "inline" keyword |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
145 # endif |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
146 #endif |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
147 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
148 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
149 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
150 /******************************************************************** |
907 | 151 ** Inclusion of standard libraries. |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
152 ********************************************************************/ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
153 |
1322
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1313
diff
changeset
|
154 /** |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1313
diff
changeset
|
155 * For Microsoft Visual Studio, a compatibility "stdint.h" can be |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1313
diff
changeset
|
156 * downloaded at the following URL: |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1313
diff
changeset
|
157 * https://orthanc.googlecode.com/hg/Resources/ThirdParty/VisualStudio/stdint.h |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1313
diff
changeset
|
158 **/ |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
159 #include <stdint.h> |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
160 |
886 | 161 #include <stdlib.h> |
162 | |
163 | |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
164 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
165 /******************************************************************** |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
166 ** Definition of the Orthanc Plugin API. |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
167 ********************************************************************/ |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
168 |
900 | 169 /** @{ */ |
170 | |
886 | 171 #ifdef __cplusplus |
172 extern "C" | |
173 { | |
174 #endif | |
175 | |
907 | 176 /** |
1578 | 177 * The various error codes that can be returned by the Orthanc core. |
178 **/ | |
179 typedef enum | |
180 { | |
1579
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
181 OrthancPluginErrorCode_InternalError = -1 /*!< Internal error */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
182 OrthancPluginErrorCode_Success = 0 /*!< Success */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
183 OrthancPluginErrorCode_Plugin = 1 /*!< Error encountered within the plugin engine */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
184 OrthancPluginErrorCode_NotImplemented = 2 /*!< Not implemented yet */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
185 OrthancPluginErrorCode_ParameterOutOfRange = 3 /*!< Parameter out of range */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
186 OrthancPluginErrorCode_NotEnoughMemory = 4 /*!< Not enough memory */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
187 OrthancPluginErrorCode_BadParameterType = 5 /*!< Bad type for a parameter */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
188 OrthancPluginErrorCode_BadSequenceOfCalls = 6 /*!< Bad sequence of calls */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
189 OrthancPluginErrorCode_InexistentItem = 7 /*!< Accessing an inexistent item */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
190 OrthancPluginErrorCode_BadRequest = 8 /*!< Bad request */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
191 OrthancPluginErrorCode_NetworkProtocol = 9 /*!< Error in the network protocol */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
192 OrthancPluginErrorCode_SystemCommand = 10 /*!< Error while calling a system command */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
193 OrthancPluginErrorCode_Database = 11 /*!< Error with the database engine */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
194 OrthancPluginErrorCode_UriSyntax = 12 /*!< Badly formatted URI */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
195 OrthancPluginErrorCode_InexistentFile = 13 /*!< Inexistent file */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
196 OrthancPluginErrorCode_CannotWriteFile = 14 /*!< Cannot write to file */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
197 OrthancPluginErrorCode_BadFileFormat = 15 /*!< Bad file format */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
198 OrthancPluginErrorCode_Timeout = 16 /*!< Timeout */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
199 OrthancPluginErrorCode_UnknownResource = 17 /*!< Unknown resource */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
200 OrthancPluginErrorCode_IncompatibleDatabaseVersion = 18 /*!< Incompatible version of the database */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
201 OrthancPluginErrorCode_FullStorage = 19 /*!< The file storage is full */, |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
202 OrthancPluginErrorCode_CorruptedFile = 20 /*!< Corrupted file (e.g. inconsistent MD5 hash) */, |
1579
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
203 OrthancPluginErrorCode_InexistentTag = 21 /*!< Inexistent tag */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
204 OrthancPluginErrorCode_ReadOnly = 22 /*!< Cannot modify a read-only data structure */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
205 OrthancPluginErrorCode_IncompatibleImageFormat = 23 /*!< Incompatible format of the images */, |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
206 OrthancPluginErrorCode_IncompatibleImageSize = 24 /*!< Incompatible size of the images */, |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
207 OrthancPluginErrorCode_SharedLibrary = 25 /*!< Error while using a shared library (plugin) */, |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
208 OrthancPluginErrorCode_UnknownPluginService = 26 /*!< Plugin invoking an unknown service */, |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
209 OrthancPluginErrorCode_UnknownDicomTag = 27 /*!< Unknown DICOM tag */, |
1596
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1595
diff
changeset
|
210 OrthancPluginErrorCode_BadJson = 28 /*!< Cannot parse a JSON document */, |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
211 OrthancPluginErrorCode_Unauthorized = 29 /*!< Bad credentials were provided to an HTTP request */, |
1610
2dff2bdffdb8
font support within Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1609
diff
changeset
|
212 OrthancPluginErrorCode_BadFont = 30 /*!< Badly formatted font file */, |
1643
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
213 OrthancPluginErrorCode_DatabasePlugin = 31 /*!< The plugin implementing a custom database back-end does not fulfill the proper interface */, |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
214 OrthancPluginErrorCode_StorageAreaPlugin = 32 /*!< Error in the plugin implementing a custom storage area */, |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
215 OrthancPluginErrorCode_SQLiteNotOpened = 1000 /*!< SQLite: The database is not opened */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
216 OrthancPluginErrorCode_SQLiteAlreadyOpened = 1001 /*!< SQLite: Connection is already open */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
217 OrthancPluginErrorCode_SQLiteCannotOpen = 1002 /*!< SQLite: Unable to open the database */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
218 OrthancPluginErrorCode_SQLiteStatementAlreadyUsed = 1003 /*!< SQLite: This cached statement is already being referred to */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
219 OrthancPluginErrorCode_SQLiteExecute = 1004 /*!< SQLite: Cannot execute a command */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
220 OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction = 1005 /*!< SQLite: Rolling back a nonexistent transaction (have you called Begin()?) */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
221 OrthancPluginErrorCode_SQLiteCommitWithoutTransaction = 1006 /*!< SQLite: Committing a nonexistent transaction */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
222 OrthancPluginErrorCode_SQLiteRegisterFunction = 1007 /*!< SQLite: Unable to register a function */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
223 OrthancPluginErrorCode_SQLiteFlush = 1008 /*!< SQLite: Unable to flush the database */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
224 OrthancPluginErrorCode_SQLiteCannotRun = 1009 /*!< SQLite: Cannot run a cached statement */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
225 OrthancPluginErrorCode_SQLiteCannotStep = 1010 /*!< SQLite: Cannot step over a cached statement */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
226 OrthancPluginErrorCode_SQLiteBindOutOfRange = 1011 /*!< SQLite: Bing a value while out of range (serious error) */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
227 OrthancPluginErrorCode_SQLitePrepareStatement = 1012 /*!< SQLite: Cannot prepare a cached statement */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
228 OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted = 1013 /*!< SQLite: Beginning the same transaction twice */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
229 OrthancPluginErrorCode_SQLiteTransactionCommit = 1014 /*!< SQLite: Failure when committing the transaction */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
230 OrthancPluginErrorCode_SQLiteTransactionBegin = 1015 /*!< SQLite: Cannot start a transaction */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
231 OrthancPluginErrorCode_DirectoryOverFile = 2000 /*!< The directory to be created is already occupied by a regular file */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
232 OrthancPluginErrorCode_FileStorageCannotWrite = 2001 /*!< Unable to create a subdirectory or a file in the file storage */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
233 OrthancPluginErrorCode_DirectoryExpected = 2002 /*!< The specified path does not point to a directory */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
234 OrthancPluginErrorCode_HttpPortInUse = 2003 /*!< The TCP port of the HTTP server is already in use */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
235 OrthancPluginErrorCode_DicomPortInUse = 2004 /*!< The TCP port of the DICOM server is already in use */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
236 OrthancPluginErrorCode_BadHttpStatusInRest = 2005 /*!< This HTTP status is not allowed in a REST API */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
237 OrthancPluginErrorCode_RegularFileExpected = 2006 /*!< The specified path does not point to a regular file */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
238 OrthancPluginErrorCode_PathToExecutable = 2007 /*!< Unable to get the path to the executable */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
239 OrthancPluginErrorCode_MakeDirectory = 2008 /*!< Cannot create a directory */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
240 OrthancPluginErrorCode_BadApplicationEntityTitle = 2009 /*!< An application entity title (AET) cannot be empty or be longer than 16 characters */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
241 OrthancPluginErrorCode_NoCFindHandler = 2010 /*!< No request handler factory for DICOM C-FIND SCP */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
242 OrthancPluginErrorCode_NoCMoveHandler = 2011 /*!< No request handler factory for DICOM C-MOVE SCP */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
243 OrthancPluginErrorCode_NoCStoreHandler = 2012 /*!< No request handler factory for DICOM C-STORE SCP */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
244 OrthancPluginErrorCode_NoApplicationEntityFilter = 2013 /*!< No application entity filter */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
245 OrthancPluginErrorCode_NoSopClassOrInstance = 2014 /*!< DicomUserConnection: Unable to find the SOP class and instance */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
246 OrthancPluginErrorCode_NoPresentationContext = 2015 /*!< DicomUserConnection: No acceptable presentation context for modality */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
247 OrthancPluginErrorCode_DicomFindUnavailable = 2016 /*!< DicomUserConnection: The C-FIND command is not supported by the remote SCP */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
248 OrthancPluginErrorCode_DicomMoveUnavailable = 2017 /*!< DicomUserConnection: The C-MOVE command is not supported by the remote SCP */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
249 OrthancPluginErrorCode_CannotStoreInstance = 2018 /*!< Cannot store an instance */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
250 OrthancPluginErrorCode_CreateDicomNotString = 2019 /*!< Only string values are supported when creating DICOM instances */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
251 OrthancPluginErrorCode_CreateDicomOverrideTag = 2020 /*!< Trying to override a value inherited from a parent module */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
252 OrthancPluginErrorCode_CreateDicomUseContent = 2021 /*!< Use \"Content\" to inject an image into a new DICOM instance */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
253 OrthancPluginErrorCode_CreateDicomNoPayload = 2022 /*!< No payload is present for one instance in the series */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
254 OrthancPluginErrorCode_CreateDicomUseDataUriScheme = 2023 /*!< The payload of the DICOM instance must be specified according to Data URI scheme */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
255 OrthancPluginErrorCode_CreateDicomBadParent = 2024 /*!< Trying to attach a new DICOM instance to an inexistent resource */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
256 OrthancPluginErrorCode_CreateDicomParentIsInstance = 2025 /*!< Trying to attach a new DICOM instance to an instance (must be a series, study or patient) */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
257 OrthancPluginErrorCode_CreateDicomParentEncoding = 2026 /*!< Unable to get the encoding of the parent resource */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
258 OrthancPluginErrorCode_UnknownModality = 2027 /*!< Unknown modality */, |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
259 OrthancPluginErrorCode_BadJobOrdering = 2028 /*!< Bad ordering of filters in a job */, |
1583
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
260 OrthancPluginErrorCode_JsonToLuaTable = 2029 /*!< Cannot convert the given JSON object to a Lua table */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
261 OrthancPluginErrorCode_CannotCreateLua = 2030 /*!< Cannot create the Lua context */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
262 OrthancPluginErrorCode_CannotExecuteLua = 2031 /*!< Cannot execute a Lua command */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
263 OrthancPluginErrorCode_LuaAlreadyExecuted = 2032 /*!< Arguments cannot be pushed after the Lua function is executed */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
264 OrthancPluginErrorCode_LuaBadOutput = 2033 /*!< The Lua function does not give the expected number of outputs */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
265 OrthancPluginErrorCode_NotLuaPredicate = 2034 /*!< The Lua function is not a predicate (only true/false outputs allowed) */, |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
266 OrthancPluginErrorCode_LuaReturnsNoString = 2035 /*!< The Lua function does not return a string */, |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1629
diff
changeset
|
267 OrthancPluginErrorCode_StorageAreaAlreadyRegistered = 2036 /*!< Another plugin has already registered a custom storage area */, |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1629
diff
changeset
|
268 OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered = 2037 /*!< Another plugin has already registered a custom database back-end */, |
1643
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1642
diff
changeset
|
269 OrthancPluginErrorCode_DatabaseNotInitialized = 2038 /*!< Plugin trying to call the database during its initialization */, |
1674
4fc502d469f4
fix build if SSL is disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1673
diff
changeset
|
270 OrthancPluginErrorCode_SslDisabled = 2039 /*!< Orthanc has been built without SSL support */, |
1703
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1674
diff
changeset
|
271 OrthancPluginErrorCode_CannotOrderSlices = 2040 /*!< Unable to order the slices of the series */, |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
272 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
273 _OrthancPluginErrorCode_INTERNAL = 0x7fffffff |
1578 | 274 } OrthancPluginErrorCode; |
275 | |
276 | |
277 /** | |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
278 * Forward declaration of one of the mandatory functions for Orthanc |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
279 * plugins. |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
280 **/ |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
281 ORTHANC_PLUGINS_API const char* OrthancPluginGetName(); |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
282 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
283 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
284 /** |
907 | 285 * The various HTTP methods for a REST call. |
286 **/ | |
894 | 287 typedef enum |
288 { | |
907 | 289 OrthancPluginHttpMethod_Get = 1, /*!< GET request */ |
290 OrthancPluginHttpMethod_Post = 2, /*!< POST request */ | |
291 OrthancPluginHttpMethod_Put = 3, /*!< PUT request */ | |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
292 OrthancPluginHttpMethod_Delete = 4, /*!< DELETE request */ |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
293 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
294 _OrthancPluginHttpMethod_INTERNAL = 0x7fffffff |
896 | 295 } OrthancPluginHttpMethod; |
886 | 296 |
907 | 297 |
298 /** | |
299 * @brief The parameters of a REST request. | |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
300 * @ingroup Callbacks |
907 | 301 **/ |
899 | 302 typedef struct |
303 { | |
907 | 304 /** |
305 * @brief The HTTP method. | |
306 **/ | |
307 OrthancPluginHttpMethod method; | |
899 | 308 |
907 | 309 /** |
310 * @brief The number of groups of the regular expression. | |
311 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
312 uint32_t groupsCount; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
313 |
907 | 314 /** |
315 * @brief The matched values for the groups of the regular expression. | |
316 **/ | |
317 const char* const* groups; | |
318 | |
319 /** | |
320 * @brief For a GET request, the number of GET parameters. | |
321 **/ | |
899 | 322 uint32_t getCount; |
323 | |
907 | 324 /** |
325 * @brief For a GET request, the keys of the GET parameters. | |
326 **/ | |
327 const char* const* getKeys; | |
328 | |
329 /** | |
330 * @brief For a GET request, the values of the GET parameters. | |
331 **/ | |
332 const char* const* getValues; | |
333 | |
334 /** | |
335 * @brief For a PUT or POST request, the content of the body. | |
336 **/ | |
899 | 337 const char* body; |
907 | 338 |
339 /** | |
340 * @brief For a PUT or POST request, the number of bytes of the body. | |
341 **/ | |
899 | 342 uint32_t bodySize; |
1041
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
343 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
344 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
345 /* -------------------------------------------------- |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
346 New in version 0.8.1 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
347 -------------------------------------------------- */ |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
348 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
349 /** |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
350 * @brief The number of HTTP headers. |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
351 **/ |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
352 uint32_t headersCount; |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
353 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
354 /** |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
355 * @brief The keys of the HTTP headers (always converted to low-case). |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
356 **/ |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
357 const char* const* headersKeys; |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
358 |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
359 /** |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
360 * @brief The values of the HTTP headers. |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
361 **/ |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
362 const char* const* headersValues; |
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
363 |
899 | 364 } OrthancPluginHttpRequest; |
365 | |
1041
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
366 |
900 | 367 typedef enum |
886 | 368 { |
900 | 369 /* Generic services */ |
907 | 370 _OrthancPluginService_LogInfo = 1, |
371 _OrthancPluginService_LogWarning = 2, | |
372 _OrthancPluginService_LogError = 3, | |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
373 _OrthancPluginService_GetOrthancPath = 4, |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
374 _OrthancPluginService_GetOrthancDirectory = 5, |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
375 _OrthancPluginService_GetConfigurationPath = 6, |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
376 _OrthancPluginService_SetPluginProperty = 7, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
377 _OrthancPluginService_GetGlobalProperty = 8, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
378 _OrthancPluginService_SetGlobalProperty = 9, |
1280
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
379 _OrthancPluginService_GetCommandLineArgumentsCount = 10, |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
380 _OrthancPluginService_GetCommandLineArgument = 11, |
1407
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
381 _OrthancPluginService_GetExpectedDatabaseVersion = 12, |
1424
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
382 _OrthancPluginService_GetConfiguration = 13, |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
383 _OrthancPluginService_BufferCompression = 14, |
1588
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
384 _OrthancPluginService_ReadFile = 15, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
385 _OrthancPluginService_WriteFile = 16, |
1593
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
386 _OrthancPluginService_GetErrorDescription = 17, |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
387 _OrthancPluginService_CallHttpClient = 18, |
1649
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
388 _OrthancPluginService_RegisterErrorCode = 19, |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
389 _OrthancPluginService_RegisterDictionaryTag = 20, |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
390 _OrthancPluginService_DicomBufferToJson = 21, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
391 _OrthancPluginService_DicomInstanceToJson = 22, |
900 | 392 |
393 /* Registration of callbacks */ | |
907 | 394 _OrthancPluginService_RegisterRestCallback = 1000, |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
395 _OrthancPluginService_RegisterOnStoredInstanceCallback = 1001, |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
396 _OrthancPluginService_RegisterStorageArea = 1002, |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
397 _OrthancPluginService_RegisterOnChangeCallback = 1003, |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
398 _OrthancPluginService_RegisterRestCallbackNoLock = 1004, |
900 | 399 |
400 /* Sending answers to REST calls */ | |
907 | 401 _OrthancPluginService_AnswerBuffer = 2000, |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
402 _OrthancPluginService_CompressAndAnswerPngImage = 2001, /* Unused as of Orthanc 0.9.4 */ |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
403 _OrthancPluginService_Redirect = 2002, |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
404 _OrthancPluginService_SendHttpStatusCode = 2003, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
405 _OrthancPluginService_SendUnauthorized = 2004, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
406 _OrthancPluginService_SendMethodNotAllowed = 2005, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
407 _OrthancPluginService_SetCookie = 2006, |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
408 _OrthancPluginService_SetHttpHeader = 2007, |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
409 _OrthancPluginService_StartMultipartAnswer = 2008, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
410 _OrthancPluginService_SendMultipartItem = 2009, |
1593
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
411 _OrthancPluginService_SendHttpStatus = 2010, |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
412 _OrthancPluginService_CompressAndAnswerImage = 2011, |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
413 |
912
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
414 /* Access to the Orthanc database and API */ |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
415 _OrthancPluginService_GetDicomForInstance = 3000, |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
416 _OrthancPluginService_RestApiGet = 3001, |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
417 _OrthancPluginService_RestApiPost = 3002, |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
418 _OrthancPluginService_RestApiDelete = 3003, |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
419 _OrthancPluginService_RestApiPut = 3004, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
420 _OrthancPluginService_LookupPatient = 3005, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
421 _OrthancPluginService_LookupStudy = 3006, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
422 _OrthancPluginService_LookupSeries = 3007, |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
423 _OrthancPluginService_LookupInstance = 3008, |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
424 _OrthancPluginService_LookupStudyWithAccessionNumber = 3009, |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
425 _OrthancPluginService_RestApiGetAfterPlugins = 3010, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
426 _OrthancPluginService_RestApiPostAfterPlugins = 3011, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
427 _OrthancPluginService_RestApiDeleteAfterPlugins = 3012, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
428 _OrthancPluginService_RestApiPutAfterPlugins = 3013, |
1669
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
429 _OrthancPluginService_ReconstructMainDicomTags = 3014, |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
430 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
431 /* Access to DICOM instances */ |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
432 _OrthancPluginService_GetInstanceRemoteAet = 4000, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
433 _OrthancPluginService_GetInstanceSize = 4001, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
434 _OrthancPluginService_GetInstanceData = 4002, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
435 _OrthancPluginService_GetInstanceJson = 4003, |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
436 _OrthancPluginService_GetInstanceSimplifiedJson = 4004, |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
437 _OrthancPluginService_HasInstanceMetadata = 4005, |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1303
diff
changeset
|
438 _OrthancPluginService_GetInstanceMetadata = 4006, |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1303
diff
changeset
|
439 |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1303
diff
changeset
|
440 /* Services for plugins implementing a database back-end */ |
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1303
diff
changeset
|
441 _OrthancPluginService_RegisterDatabaseBackend = 5000, |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
442 _OrthancPluginService_DatabaseAnswer = 5001, |
1609
c74495267acf
Implementation of the "GetAllPublicIdsWithLimit" extension
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1608
diff
changeset
|
443 _OrthancPluginService_RegisterDatabaseBackendV2 = 5002, |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
444 _OrthancPluginService_StorageAreaCreate = 5003, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
445 _OrthancPluginService_StorageAreaRead = 5004, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
446 _OrthancPluginService_StorageAreaRemove = 5005, |
1309
8f4487d8f79e
new files for custom database back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1303
diff
changeset
|
447 |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
448 /* Primitives for handling images */ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
449 _OrthancPluginService_GetImagePixelFormat = 6000, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
450 _OrthancPluginService_GetImageWidth = 6001, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
451 _OrthancPluginService_GetImageHeight = 6002, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
452 _OrthancPluginService_GetImagePitch = 6003, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
453 _OrthancPluginService_GetImageBuffer = 6004, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
454 _OrthancPluginService_UncompressImage = 6005, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
455 _OrthancPluginService_FreeImage = 6006, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
456 _OrthancPluginService_CompressImage = 6007, |
1608
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
457 _OrthancPluginService_ConvertPixelFormat = 6008, |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
458 _OrthancPluginService_GetFontsCount = 6009, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
459 _OrthancPluginService_GetFontInfo = 6010, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
460 _OrthancPluginService_DrawText = 6011, |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
461 |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
462 _OrthancPluginService_INTERNAL = 0x7fffffff |
907 | 463 } _OrthancPluginService; |
900 | 464 |
465 | |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
466 typedef enum |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
467 { |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
468 _OrthancPluginProperty_Description = 1, |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
469 _OrthancPluginProperty_RootUri = 2, |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
470 _OrthancPluginProperty_OrthancExplorer = 3, |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
471 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
472 _OrthancPluginProperty_INTERNAL = 0x7fffffff |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
473 } _OrthancPluginProperty; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
474 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
475 |
900 | 476 |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
477 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
478 * The memory layout of the pixels of an image. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
479 * @ingroup Images |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
480 **/ |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
481 typedef enum |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
482 { |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
483 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
484 * @brief Graylevel 8bpp image. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
485 * |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
486 * The image is graylevel. Each pixel is unsigned and stored in |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
487 * one byte. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
488 **/ |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
489 OrthancPluginPixelFormat_Grayscale8 = 1, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
490 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
491 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
492 * @brief Graylevel, unsigned 16bpp image. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
493 * |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
494 * The image is graylevel. Each pixel is unsigned and stored in |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
495 * two bytes. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
496 **/ |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
497 OrthancPluginPixelFormat_Grayscale16 = 2, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
498 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
499 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
500 * @brief Graylevel, signed 16bpp image. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
501 * |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
502 * The image is graylevel. Each pixel is signed and stored in two |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
503 * bytes. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
504 **/ |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
505 OrthancPluginPixelFormat_SignedGrayscale16 = 3, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
506 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
507 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
508 * @brief Color image in RGB24 format. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
509 * |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
510 * This format describes a color image. The pixels are stored in 3 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
511 * consecutive bytes. The memory layout is RGB. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
512 **/ |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
513 OrthancPluginPixelFormat_RGB24 = 4, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
514 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
515 /** |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
516 * @brief Color image in RGBA32 format. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
517 * |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
518 * This format describes a color image. The pixels are stored in 4 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
519 * consecutive bytes. The memory layout is RGBA. |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
520 **/ |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
521 OrthancPluginPixelFormat_RGBA32 = 5, |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
522 |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
523 OrthancPluginPixelFormat_Unknown = 6, /*!< Unknown pixel format */ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
524 |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
525 _OrthancPluginPixelFormat_INTERNAL = 0x7fffffff |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
526 } OrthancPluginPixelFormat; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
527 |
894 | 528 |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
529 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
530 /** |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
531 * The content types that are supported by Orthanc plugins. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
532 **/ |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
533 typedef enum |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
534 { |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
535 OrthancPluginContentType_Unknown = 0, /*!< Unknown content type */ |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
536 OrthancPluginContentType_Dicom = 1, /*!< DICOM */ |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
537 OrthancPluginContentType_DicomAsJson = 2, /*!< JSON summary of a DICOM file */ |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
538 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
539 _OrthancPluginContentType_INTERNAL = 0x7fffffff |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
540 } OrthancPluginContentType; |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
541 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
542 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
543 |
907 | 544 /** |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
545 * The supported types of DICOM resources. |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
546 **/ |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
547 typedef enum |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
548 { |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
549 OrthancPluginResourceType_Patient = 0, /*!< Patient */ |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
550 OrthancPluginResourceType_Study = 1, /*!< Study */ |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
551 OrthancPluginResourceType_Series = 2, /*!< Series */ |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
552 OrthancPluginResourceType_Instance = 3, /*!< Instance */ |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
553 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
554 _OrthancPluginResourceType_INTERNAL = 0x7fffffff |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
555 } OrthancPluginResourceType; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
556 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
557 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
558 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
559 /** |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
560 * The supported types of changes that can happen to DICOM resources. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
561 * @ingroup Callbacks |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
562 **/ |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
563 typedef enum |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
564 { |
1198 | 565 OrthancPluginChangeType_CompletedSeries = 0, /*!< Series is now complete */ |
566 OrthancPluginChangeType_Deleted = 1, /*!< Deleted resource */ | |
567 OrthancPluginChangeType_NewChildInstance = 2, /*!< A new instance was added to this resource */ | |
568 OrthancPluginChangeType_NewInstance = 3, /*!< New instance received */ | |
569 OrthancPluginChangeType_NewPatient = 4, /*!< New patient created */ | |
570 OrthancPluginChangeType_NewSeries = 5, /*!< New series created */ | |
571 OrthancPluginChangeType_NewStudy = 6, /*!< New study created */ | |
572 OrthancPluginChangeType_StablePatient = 7, /*!< Timeout: No new instance in this patient */ | |
573 OrthancPluginChangeType_StableSeries = 8, /*!< Timeout: No new instance in this series */ | |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
574 OrthancPluginChangeType_StableStudy = 9, /*!< Timeout: No new instance in this study */ |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
575 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
576 _OrthancPluginChangeType_INTERNAL = 0x7fffffff |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
577 } OrthancPluginChangeType; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
578 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
579 |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
580 /** |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
581 * The compression algorithms that are supported by the Orthanc core. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
582 * @ingroup Images |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
583 **/ |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
584 typedef enum |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
585 { |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
586 OrthancPluginCompressionType_Zlib = 0, /*!< Standard zlib compression */ |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
587 OrthancPluginCompressionType_ZlibWithSize = 1, /*!< zlib, prefixed with uncompressed size (uint64_t) */ |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
588 OrthancPluginCompressionType_Gzip = 2, /*!< Standard gzip compression */ |
1580
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
589 OrthancPluginCompressionType_GzipWithSize = 3, /*!< gzip, prefixed with uncompressed size (uint64_t) */ |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
590 |
bf502300c52e
force the size of the enumerations in the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
591 _OrthancPluginCompressionType_INTERNAL = 0x7fffffff |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
592 } OrthancPluginCompressionType; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
593 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
594 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
595 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
596 * The image formats that are supported by the Orthanc core. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
597 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
598 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
599 typedef enum |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
600 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
601 OrthancPluginImageFormat_Png = 0, /*!< Image compressed using PNG */ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
602 OrthancPluginImageFormat_Jpeg = 1, /*!< Image compressed using JPEG */ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
603 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
604 _OrthancPluginImageFormat_INTERNAL = 0x7fffffff |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
605 } OrthancPluginImageFormat; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
606 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
607 |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
608 /** |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
609 * The value representations present in the DICOM standard (version 2013). |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
610 * @ingroup Toolbox |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
611 **/ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
612 typedef enum |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
613 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
614 OrthancPluginValueRepresentation_AE = 1, /*!< Application Entity */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
615 OrthancPluginValueRepresentation_AS = 2, /*!< Age String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
616 OrthancPluginValueRepresentation_AT = 3, /*!< Attribute Tag */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
617 OrthancPluginValueRepresentation_CS = 4, /*!< Code String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
618 OrthancPluginValueRepresentation_DA = 5, /*!< Date */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
619 OrthancPluginValueRepresentation_DS = 6, /*!< Decimal String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
620 OrthancPluginValueRepresentation_DT = 7, /*!< Date Time */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
621 OrthancPluginValueRepresentation_FD = 8, /*!< Floating Point Double */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
622 OrthancPluginValueRepresentation_FL = 9, /*!< Floating Point Single */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
623 OrthancPluginValueRepresentation_IS = 10, /*!< Integer String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
624 OrthancPluginValueRepresentation_LO = 11, /*!< Long String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
625 OrthancPluginValueRepresentation_LT = 12, /*!< Long Text */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
626 OrthancPluginValueRepresentation_OB = 13, /*!< Other Byte String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
627 OrthancPluginValueRepresentation_OF = 14, /*!< Other Float String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
628 OrthancPluginValueRepresentation_OW = 15, /*!< Other Word String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
629 OrthancPluginValueRepresentation_PN = 16, /*!< Person Name */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
630 OrthancPluginValueRepresentation_SH = 17, /*!< Short String */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
631 OrthancPluginValueRepresentation_SL = 18, /*!< Signed Long */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
632 OrthancPluginValueRepresentation_SQ = 19, /*!< Sequence of Items */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
633 OrthancPluginValueRepresentation_SS = 20, /*!< Signed Short */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
634 OrthancPluginValueRepresentation_ST = 21, /*!< Short Text */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
635 OrthancPluginValueRepresentation_TM = 22, /*!< Time */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
636 OrthancPluginValueRepresentation_UI = 23, /*!< Unique Identifier (UID) */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
637 OrthancPluginValueRepresentation_UL = 24, /*!< Unsigned Long */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
638 OrthancPluginValueRepresentation_UN = 25, /*!< Unknown */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
639 OrthancPluginValueRepresentation_US = 26, /*!< Unsigned Short */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
640 OrthancPluginValueRepresentation_UT = 27, /*!< Unlimited Text */ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
641 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
642 _OrthancPluginValueRepresentation_INTERNAL = 0x7fffffff |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
643 } OrthancPluginValueRepresentation; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
644 |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
645 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
646 typedef enum |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
647 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
648 OrthancPluginDicomToJsonFormat_Full = 1, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
649 OrthancPluginDicomToJsonFormat_Short = 2, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
650 OrthancPluginDicomToJsonFormat_Simple = 3, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
651 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
652 _OrthancPluginDicomToJsonFormat_INTERNAL = 0x7fffffff |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
653 } OrthancPluginDicomToJsonFormat; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
654 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
655 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
656 typedef enum |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
657 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
658 OrthancPluginDicomToJsonFlags_IncludeBinary = (1 << 0), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
659 OrthancPluginDicomToJsonFlags_IncludePrivateTags = (1 << 1), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
660 OrthancPluginDicomToJsonFlags_IncludeUnknownTags = (1 << 2), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
661 OrthancPluginDicomToJsonFlags_IncludePixelData = (1 << 3), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
662 OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii = (1 << 4), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
663 OrthancPluginDicomToJsonFlags_ConvertBinaryToNull = (1 << 5), |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
664 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
665 _OrthancPluginDicomToJsonFlags_INTERNAL = 0x7fffffff |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
666 } OrthancPluginDicomToJsonFlags; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
667 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
668 |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
669 /** |
907 | 670 * @brief A memory buffer allocated by the core system of Orthanc. |
671 * | |
672 * A memory buffer allocated by the core system of Orthanc. When the | |
673 * content of the buffer is not useful anymore, it must be free by a | |
674 * call to ::OrthancPluginFreeMemoryBuffer(). | |
675 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
676 typedef struct |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
677 { |
907 | 678 /** |
679 * @brief The content of the buffer. | |
680 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
681 void* data; |
907 | 682 |
683 /** | |
684 * @brief The number of bytes in the buffer. | |
685 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
686 uint32_t size; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
687 } OrthancPluginMemoryBuffer; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
688 |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
689 |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
690 |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
691 |
907 | 692 /** |
693 * @brief Opaque structure that represents the HTTP connection to the client application. | |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
694 * @ingroup Callback |
907 | 695 **/ |
900 | 696 typedef struct _OrthancPluginRestOutput_t OrthancPluginRestOutput; |
697 | |
907 | 698 |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
699 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
700 /** |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
701 * @brief Opaque structure that represents a DICOM instance received by Orthanc. |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
702 **/ |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
703 typedef struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
704 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
705 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
706 |
907 | 707 /** |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
708 * @brief Opaque structure that represents an image that is uncompressed in memory. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
709 * @ingroup Images |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
710 **/ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
711 typedef struct _OrthancPluginImage_t OrthancPluginImage; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
712 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
713 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
714 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
715 /** |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
716 * @brief Opaque structure that represents the storage area that is actually used by Orthanc. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
717 * @ingroup Images |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
718 **/ |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
719 typedef struct _OrthancPluginStorageArea_t OrthancPluginStorageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
720 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
721 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
722 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
723 /** |
908
e078ea944089
refactoring HttpOutput
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
907
diff
changeset
|
724 * @brief Signature of a callback function that answers to a REST request. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
725 * @ingroup Callbacks |
907 | 726 **/ |
1628
77c4cc4def0f
OrthancPluginErrorCode in REST callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1627
diff
changeset
|
727 typedef OrthancPluginErrorCode (*OrthancPluginRestCallback) ( |
900 | 728 OrthancPluginRestOutput* output, |
729 const char* url, | |
730 const OrthancPluginHttpRequest* request); | |
731 | |
907 | 732 |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
733 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
734 /** |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
735 * @brief Signature of a callback function that is triggered when Orthanc receives a DICOM instance. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
736 * @ingroup Callbacks |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
737 **/ |
1627
da7854deb662
Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
738 typedef OrthancPluginErrorCode (*OrthancPluginOnStoredInstanceCallback) ( |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
739 OrthancPluginDicomInstance* instance, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
740 const char* instanceId); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
741 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
742 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
743 |
907 | 744 /** |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
745 * @brief Signature of a callback function that is triggered when a change happens to some DICOM resource. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
746 * @ingroup Callbacks |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
747 **/ |
1627
da7854deb662
Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
748 typedef OrthancPluginErrorCode (*OrthancPluginOnChangeCallback) ( |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
749 OrthancPluginChangeType changeType, |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
750 OrthancPluginResourceType resourceType, |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
751 const char* resourceId); |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
752 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
753 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
754 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
755 /** |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
756 * @brief Signature of a function to free dynamic memory. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
757 **/ |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
758 typedef void (*OrthancPluginFree) (void* buffer); |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
759 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
760 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
761 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
762 /** |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
763 * @brief Callback for writing to the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
764 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
765 * Signature of a callback function that is triggered when Orthanc writes a file to the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
766 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
767 * @param uuid The UUID of the file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
768 * @param content The content of the file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
769 * @param size The size of the file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
770 * @param type The content type corresponding to this file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
771 * @return 0 if success, other value if error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
772 * @ingroup Callbacks |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
773 **/ |
1627
da7854deb662
Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
774 typedef OrthancPluginErrorCode (*OrthancPluginStorageCreate) ( |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
775 const char* uuid, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
776 const void* content, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
777 int64_t size, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
778 OrthancPluginContentType type); |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
779 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
780 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
781 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
782 /** |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
783 * @brief Callback for reading from the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
784 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
785 * Signature of a callback function that is triggered when Orthanc reads a file from the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
786 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
787 * @param content The content of the file (output). |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
788 * @param size The size of the file (output). |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
789 * @param uuid The UUID of the file of interest. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
790 * @param type The content type corresponding to this file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
791 * @return 0 if success, other value if error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
792 * @ingroup Callbacks |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
793 **/ |
1627
da7854deb662
Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
794 typedef OrthancPluginErrorCode (*OrthancPluginStorageRead) ( |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
795 void** content, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
796 int64_t* size, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
797 const char* uuid, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
798 OrthancPluginContentType type); |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
799 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
800 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
801 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
802 /** |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
803 * @brief Callback for removing a file from the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
804 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
805 * Signature of a callback function that is triggered when Orthanc deletes a file from the storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
806 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
807 * @param uuid The UUID of the file to be removed. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
808 * @param type The content type corresponding to this file. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
809 * @return 0 if success, other value if error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
810 * @ingroup Callbacks |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
811 **/ |
1627
da7854deb662
Plugin callbacks must now return explicit "OrthancPluginErrorCode" instead of integers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1615
diff
changeset
|
812 typedef OrthancPluginErrorCode (*OrthancPluginStorageRemove) ( |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
813 const char* uuid, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
814 OrthancPluginContentType type); |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
815 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
816 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
817 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
818 /** |
1297 | 819 * @brief Data structure that contains information about the Orthanc core. |
907 | 820 **/ |
900 | 821 typedef struct _OrthancPluginContext_t |
822 { | |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
823 void* pluginsManager; |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
824 const char* orthancVersion; |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
825 OrthancPluginFree Free; |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
826 OrthancPluginErrorCode (*InvokeService) (struct _OrthancPluginContext_t* context, |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
827 _OrthancPluginService service, |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
828 const void* params); |
899 | 829 } OrthancPluginContext; |
830 | |
886 | 831 |
907 | 832 |
833 /** | |
834 * @brief Free a string. | |
835 * | |
836 * Free a string that was allocated by the core system of Orthanc. | |
837 * | |
838 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
839 * @param str The string to be freed. | |
840 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
841 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeString( |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
842 OrthancPluginContext* context, |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
843 char* str) |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
844 { |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
845 if (str != NULL) |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
846 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
847 context->Free(str); |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
848 } |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
849 } |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
850 |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
851 |
907 | 852 /** |
1041
2c49b7dffcec
plugins have access to the HTTP headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1040
diff
changeset
|
853 * @brief Check the compatibility of the plugin wrt. the version of its hosting Orthanc. |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
854 * |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
855 * This function checks whether the version of this C header is |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
856 * compatible with the current version of Orthanc. The result of |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
857 * this function should always be checked in the |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
858 * OrthancPluginInitialize() entry point of the plugin. |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
859 * |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
860 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
861 * @return 1 if and only if the versions are compatible. If the |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
862 * result is 0, the initialization of the plugin should fail. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
863 * @ingroup Callbacks |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
864 **/ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
865 ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion( |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
866 OrthancPluginContext* context) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
867 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
868 int major, minor, revision; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
869 |
1579
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
870 if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
871 sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
872 sizeof(int32_t) != sizeof(_OrthancPluginService) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
873 sizeof(int32_t) != sizeof(_OrthancPluginProperty) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
874 sizeof(int32_t) != sizeof(OrthancPluginPixelFormat) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
875 sizeof(int32_t) != sizeof(OrthancPluginContentType) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
876 sizeof(int32_t) != sizeof(OrthancPluginResourceType) || |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
877 sizeof(int32_t) != sizeof(OrthancPluginChangeType) || |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
878 sizeof(int32_t) != sizeof(OrthancPluginCompressionType) || |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
879 sizeof(int32_t) != sizeof(OrthancPluginImageFormat) || |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
880 sizeof(int32_t) != sizeof(OrthancPluginValueRepresentation) || |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
881 sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFormat) || |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
882 sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFlags)) |
1578 | 883 { |
884 /* Mismatch in the size of the enumerations */ | |
885 return 0; | |
886 } | |
887 | |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
888 /* Assume compatibility with the mainline */ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
889 if (!strcmp(context->orthancVersion, "mainline")) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
890 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
891 return 1; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
892 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
893 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
894 /* Parse the version of the Orthanc core */ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
895 if ( |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
896 #ifdef _MSC_VER |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
897 sscanf_s |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
898 #else |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
899 sscanf |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
900 #endif |
1303 | 901 (context->orthancVersion, "%4d.%4d.%4d", &major, &minor, &revision) != 3) |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
902 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
903 return 0; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
904 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
905 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
906 /* Check the major number of the version */ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
907 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
908 if (major > ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
909 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
910 return 1; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
911 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
912 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
913 if (major < ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
914 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
915 return 0; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
916 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
917 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
918 /* Check the minor number of the version */ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
919 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
920 if (minor > ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
921 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
922 return 1; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
923 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
924 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
925 if (minor < ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER) |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
926 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
927 return 0; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
928 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
929 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
930 /* Check the revision number of the version */ |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
931 |
1040
d06186cdc502
check plugin version in samples
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1039
diff
changeset
|
932 if (revision >= ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER) |
1039
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
933 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
934 return 1; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
935 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
936 else |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
937 { |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
938 return 0; |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
939 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
940 } |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
941 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
942 |
5a5a4890ffca
check version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1037
diff
changeset
|
943 /** |
907 | 944 * @brief Free a memory buffer. |
945 * | |
946 * Free a memory buffer that was allocated by the core system of Orthanc. | |
947 * | |
948 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
949 * @param buffer The memory buffer to release. | |
950 **/ | |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
951 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeMemoryBuffer( |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
952 OrthancPluginContext* context, |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
953 OrthancPluginMemoryBuffer* buffer) |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
954 { |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
955 context->Free(buffer->data); |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
956 } |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
957 |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
958 |
907 | 959 /** |
960 * @brief Log an error. | |
961 * | |
962 * Log an error message using the Orthanc logging system. | |
963 * | |
964 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
965 * @param message The message to be logged. | |
966 **/ | |
900 | 967 ORTHANC_PLUGIN_INLINE void OrthancPluginLogError( |
968 OrthancPluginContext* context, | |
907 | 969 const char* message) |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
970 { |
907 | 971 context->InvokeService(context, _OrthancPluginService_LogError, message); |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
972 } |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
973 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
974 |
907 | 975 /** |
976 * @brief Log a warning. | |
977 * | |
978 * Log a warning message using the Orthanc logging system. | |
979 * | |
980 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
981 * @param message The message to be logged. | |
982 **/ | |
900 | 983 ORTHANC_PLUGIN_INLINE void OrthancPluginLogWarning( |
984 OrthancPluginContext* context, | |
907 | 985 const char* message) |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
986 { |
907 | 987 context->InvokeService(context, _OrthancPluginService_LogWarning, message); |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
988 } |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
989 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
990 |
907 | 991 /** |
992 * @brief Log an information. | |
993 * | |
994 * Log an information message using the Orthanc logging system. | |
995 * | |
996 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
997 * @param message The message to be logged. | |
998 **/ | |
900 | 999 ORTHANC_PLUGIN_INLINE void OrthancPluginLogInfo( |
1000 OrthancPluginContext* context, | |
907 | 1001 const char* message) |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
1002 { |
907 | 1003 context->InvokeService(context, _OrthancPluginService_LogInfo, message); |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
1004 } |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
1005 |
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
1006 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1007 |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1008 typedef struct |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1009 { |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1010 const char* pathRegularExpression; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1011 OrthancPluginRestCallback callback; |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1012 } _OrthancPluginRestCallback; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1013 |
907 | 1014 /** |
1015 * @brief Register a REST callback. | |
1016 * | |
1017 * This function registers a REST callback against a regular | |
1018 * expression for a URI. This function must be called during the | |
1019 * initialization of the plugin, i.e. inside the | |
1020 * OrthancPluginInitialize() public function. | |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1021 * |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1022 * Each REST callback is guaranteed to run in mutual exclusion. |
907 | 1023 * |
1024 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
1025 * @param pathRegularExpression Regular expression for the URI. May contain groups. | |
1026 * @param callback The callback function to handle the REST call. | |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1027 * @see OrthancPluginRegisterRestCallbackNoLock() |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1028 * @ingroup Callbacks |
907 | 1029 **/ |
900 | 1030 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallback( |
1031 OrthancPluginContext* context, | |
1032 const char* pathRegularExpression, | |
1033 OrthancPluginRestCallback callback) | |
899 | 1034 { |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1035 _OrthancPluginRestCallback params; |
899 | 1036 params.pathRegularExpression = pathRegularExpression; |
1037 params.callback = callback; | |
907 | 1038 context->InvokeService(context, _OrthancPluginService_RegisterRestCallback, ¶ms); |
899 | 1039 } |
1040 | |
1041 | |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1042 |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1043 /** |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1044 * @brief Register a REST callback, without locking. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1045 * |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1046 * This function registers a REST callback against a regular |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1047 * expression for a URI. This function must be called during the |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1048 * initialization of the plugin, i.e. inside the |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1049 * OrthancPluginInitialize() public function. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1050 * |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1051 * Contrarily to OrthancPluginRegisterRestCallback(), the callback |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1052 * will NOT be invoked in mutual exclusion. This can be useful for |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1053 * high-performance plugins that must handle concurrent requests |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1054 * (Orthanc uses a pool of threads, one thread being assigned to |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1055 * each incoming HTTP request). Of course, it is up to the plugin to |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1056 * implement the required locking mechanisms. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1057 * |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1058 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1059 * @param pathRegularExpression Regular expression for the URI. May contain groups. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1060 * @param callback The callback function to handle the REST call. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1061 * @see OrthancPluginRegisterRestCallback() |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1062 * @ingroup Callbacks |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1063 **/ |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1064 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallbackNoLock( |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1065 OrthancPluginContext* context, |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1066 const char* pathRegularExpression, |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1067 OrthancPluginRestCallback callback) |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1068 { |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1069 _OrthancPluginRestCallback params; |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1070 params.pathRegularExpression = pathRegularExpression; |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1071 params.callback = callback; |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1072 context->InvokeService(context, _OrthancPluginService_RegisterRestCallbackNoLock, ¶ms); |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1073 } |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1074 |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1075 |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
1076 |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1077 typedef struct |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1078 { |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1079 OrthancPluginOnStoredInstanceCallback callback; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1080 } _OrthancPluginOnStoredInstanceCallback; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1081 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1082 /** |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1083 * @brief Register a callback for received instances. |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1084 * |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1085 * This function registers a callback function that is called |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1086 * whenever a new DICOM instance is stored into the Orthanc core. |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1087 * |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1088 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1089 * @param callback The callback function. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1090 * @ingroup Callbacks |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1091 **/ |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1092 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnStoredInstanceCallback( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1093 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1094 OrthancPluginOnStoredInstanceCallback callback) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1095 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1096 _OrthancPluginOnStoredInstanceCallback params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1097 params.callback = callback; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1098 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1099 context->InvokeService(context, _OrthancPluginService_RegisterOnStoredInstanceCallback, ¶ms); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1100 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1101 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1102 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1103 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1104 typedef struct |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1105 { |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1106 OrthancPluginRestOutput* output; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1107 const char* answer; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1108 uint32_t answerSize; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1109 const char* mimeType; |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1110 } _OrthancPluginAnswerBuffer; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1111 |
907 | 1112 /** |
1113 * @brief Answer to a REST request. | |
1114 * | |
1115 * This function answers to a REST request with the content of a memory buffer. | |
1116 * | |
1117 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
1118 * @param output The HTTP connection to the client application. | |
1119 * @param answer Pointer to the memory buffer containing the answer. | |
1120 * @param answerSize Number of bytes of the answer. | |
1121 * @param mimeType The MIME type of the answer. | |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1122 * @ingroup REST |
907 | 1123 **/ |
900 | 1124 ORTHANC_PLUGIN_INLINE void OrthancPluginAnswerBuffer( |
1125 OrthancPluginContext* context, | |
1126 OrthancPluginRestOutput* output, | |
1127 const char* answer, | |
1128 uint32_t answerSize, | |
1129 const char* mimeType) | |
899 | 1130 { |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1131 _OrthancPluginAnswerBuffer params; |
899 | 1132 params.output = output; |
1133 params.answer = answer; | |
1134 params.answerSize = answerSize; | |
1135 params.mimeType = mimeType; | |
907 | 1136 context->InvokeService(context, _OrthancPluginService_AnswerBuffer, ¶ms); |
899 | 1137 } |
1138 | |
1139 | |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1140 typedef struct |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1141 { |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1142 OrthancPluginRestOutput* output; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1143 OrthancPluginPixelFormat format; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1144 uint32_t width; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1145 uint32_t height; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1146 uint32_t pitch; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1147 const void* buffer; |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1148 } _OrthancPluginCompressAndAnswerPngImage; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1149 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1150 typedef struct |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1151 { |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1152 OrthancPluginRestOutput* output; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1153 OrthancPluginImageFormat imageFormat; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1154 OrthancPluginPixelFormat pixelFormat; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1155 uint32_t width; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1156 uint32_t height; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1157 uint32_t pitch; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1158 const void* buffer; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1159 uint8_t quality; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1160 } _OrthancPluginCompressAndAnswerImage; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1161 |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1162 |
907 | 1163 /** |
1164 * @brief Answer to a REST request with a PNG image. | |
1165 * | |
1166 * This function answers to a REST request with a PNG image. The | |
1167 * parameters of this function describe a memory buffer that | |
1168 * contains an uncompressed image. The image will be automatically compressed | |
1169 * as a PNG image by the core system of Orthanc. | |
1170 * | |
1171 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
1172 * @param output The HTTP connection to the client application. | |
1173 * @param format The memory layout of the uncompressed image. | |
1174 * @param width The width of the image. | |
1175 * @param height The height of the image. | |
1176 * @param pitch The pitch of the image (i.e. the number of bytes | |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1177 * between 2 successive lines of the image in the memory buffer). |
907 | 1178 * @param buffer The memory buffer containing the uncompressed image. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1179 * @ingroup REST |
907 | 1180 **/ |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1181 ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerPngImage( |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1182 OrthancPluginContext* context, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1183 OrthancPluginRestOutput* output, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1184 OrthancPluginPixelFormat format, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1185 uint32_t width, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1186 uint32_t height, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1187 uint32_t pitch, |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1188 const void* buffer) |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1189 { |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1190 _OrthancPluginCompressAndAnswerImage params; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1191 params.output = output; |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1192 params.imageFormat = OrthancPluginImageFormat_Png; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1193 params.pixelFormat = format; |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1194 params.width = width; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1195 params.height = height; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1196 params.pitch = pitch; |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1197 params.buffer = buffer; |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1198 params.quality = 0; /* No quality for PNG */ |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
1199 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, ¶ms); |
901
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1200 } |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1201 |
7d88f3f4a3b3
refactoring IsServedUri, answer PNG images, regular expression groups
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
900
diff
changeset
|
1202 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1203 |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1204 typedef struct |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1205 { |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1206 OrthancPluginMemoryBuffer* target; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1207 const char* instanceId; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1208 } _OrthancPluginGetDicomForInstance; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1209 |
907 | 1210 /** |
1211 * @brief Retrieve a DICOM instance using its Orthanc identifier. | |
1212 * | |
1213 * Retrieve a DICOM instance using its Orthanc identifier. The DICOM | |
1214 * file is stored into a newly allocated memory buffer. | |
1215 * | |
1216 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
1217 * @param target The target memory buffer. | |
1218 * @param instanceId The Orthanc identifier of the DICOM instance of interest. | |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1219 * @return 0 if success, or the error code if failure. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1220 * @ingroup Orthanc |
907 | 1221 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1222 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetDicomForInstance( |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1223 OrthancPluginContext* context, |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1224 OrthancPluginMemoryBuffer* target, |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1225 const char* instanceId) |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1226 { |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1227 _OrthancPluginGetDicomForInstance params; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1228 params.target = target; |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1229 params.instanceId = instanceId; |
907 | 1230 return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, ¶ms); |
904
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1231 } |
2732b5f57d9c
sample to forward dicom data
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
901
diff
changeset
|
1232 |
898
7000fc86fe62
improved plugin api
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
897
diff
changeset
|
1233 |
912
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1234 |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1235 typedef struct |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1236 { |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1237 OrthancPluginMemoryBuffer* target; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1238 const char* uri; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1239 } _OrthancPluginRestApiGet; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1240 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1241 /** |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1242 * @brief Make a GET call to the built-in Orthanc REST API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1243 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1244 * Make a GET call to the built-in Orthanc REST API. The result to |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1245 * the query is stored into a newly allocated memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1246 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1247 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1248 * @param target The target memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1249 * @param uri The URI in the built-in Orthanc API. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1250 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1251 * @see OrthancPluginRestApiGetAfterPlugins |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1252 * @ingroup Orthanc |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1253 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1254 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGet( |
912
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1255 OrthancPluginContext* context, |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1256 OrthancPluginMemoryBuffer* target, |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1257 const char* uri) |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1258 { |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1259 _OrthancPluginRestApiGet params; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1260 params.target = target; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1261 params.uri = uri; |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1262 return context->InvokeService(context, _OrthancPluginService_RestApiGet, ¶ms); |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1263 } |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1264 |
dcb2469f00f4
PluginsHttpHandler::RestApiGet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
908
diff
changeset
|
1265 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1266 |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1267 /** |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1268 * @brief Make a GET call to the REST API, as tainted by the plugins. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1269 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1270 * Make a GET call to the Orthanc REST API, after all the plugins |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1271 * are applied. In other words, if some plugin overrides or adds the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1272 * called URI to the built-in Orthanc REST API, this call will |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1273 * return the result provided by this plugin. The result to the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1274 * query is stored into a newly allocated memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1275 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1276 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1277 * @param target The target memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1278 * @param uri The URI in the built-in Orthanc API. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1279 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1280 * @see OrthancPluginRestApiGet |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1281 * @ingroup Orthanc |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1282 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1283 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGetAfterPlugins( |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1284 OrthancPluginContext* context, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1285 OrthancPluginMemoryBuffer* target, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1286 const char* uri) |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1287 { |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1288 _OrthancPluginRestApiGet params; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1289 params.target = target; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1290 params.uri = uri; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1291 return context->InvokeService(context, _OrthancPluginService_RestApiGetAfterPlugins, ¶ms); |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1292 } |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1293 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1294 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1295 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1296 typedef struct |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1297 { |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1298 OrthancPluginMemoryBuffer* target; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1299 const char* uri; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1300 const char* body; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1301 uint32_t bodySize; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1302 } _OrthancPluginRestApiPostPut; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1303 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1304 /** |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1305 * @brief Make a POST call to the built-in Orthanc REST API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1306 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1307 * Make a POST call to the built-in Orthanc REST API. The result to |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1308 * the query is stored into a newly allocated memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1309 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1310 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1311 * @param target The target memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1312 * @param uri The URI in the built-in Orthanc API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1313 * @param body The body of the POST request. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1314 * @param bodySize The size of the body. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1315 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1316 * @see OrthancPluginRestApiPostAfterPlugins |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1317 * @ingroup Orthanc |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1318 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1319 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPost( |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1320 OrthancPluginContext* context, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1321 OrthancPluginMemoryBuffer* target, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1322 const char* uri, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1323 const char* body, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1324 uint32_t bodySize) |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1325 { |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1326 _OrthancPluginRestApiPostPut params; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1327 params.target = target; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1328 params.uri = uri; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1329 params.body = body; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1330 params.bodySize = bodySize; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1331 return context->InvokeService(context, _OrthancPluginService_RestApiPost, ¶ms); |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1332 } |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1333 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1334 |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1335 /** |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1336 * @brief Make a POST call to the REST API, as tainted by the plugins. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1337 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1338 * Make a POST call to the Orthanc REST API, after all the plugins |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1339 * are applied. In other words, if some plugin overrides or adds the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1340 * called URI to the built-in Orthanc REST API, this call will |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1341 * return the result provided by this plugin. The result to the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1342 * query is stored into a newly allocated memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1343 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1344 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1345 * @param target The target memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1346 * @param uri The URI in the built-in Orthanc API. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1347 * @param body The body of the POST request. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1348 * @param bodySize The size of the body. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1349 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1350 * @see OrthancPluginRestApiPost |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1351 * @ingroup Orthanc |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1352 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1353 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPostAfterPlugins( |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1354 OrthancPluginContext* context, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1355 OrthancPluginMemoryBuffer* target, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1356 const char* uri, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1357 const char* body, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1358 uint32_t bodySize) |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1359 { |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1360 _OrthancPluginRestApiPostPut params; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1361 params.target = target; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1362 params.uri = uri; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1363 params.body = body; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1364 params.bodySize = bodySize; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1365 return context->InvokeService(context, _OrthancPluginService_RestApiPostAfterPlugins, ¶ms); |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1366 } |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1367 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1368 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1369 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1370 /** |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1371 * @brief Make a DELETE call to the built-in Orthanc REST API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1372 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1373 * Make a DELETE call to the built-in Orthanc REST API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1374 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1375 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1376 * @param uri The URI to delete in the built-in Orthanc API. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1377 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1378 * @see OrthancPluginRestApiDeleteAfterPlugins |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1379 * @ingroup Orthanc |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1380 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1381 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDelete( |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1382 OrthancPluginContext* context, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1383 const char* uri) |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1384 { |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1385 return context->InvokeService(context, _OrthancPluginService_RestApiDelete, uri); |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1386 } |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1387 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1388 |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1389 /** |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1390 * @brief Make a DELETE call to the REST API, as tainted by the plugins. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1391 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1392 * Make a DELETE call to the Orthanc REST API, after all the plugins |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1393 * are applied. In other words, if some plugin overrides or adds the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1394 * called URI to the built-in Orthanc REST API, this call will |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1395 * return the result provided by this plugin. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1396 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1397 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1398 * @param uri The URI to delete in the built-in Orthanc API. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1399 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1400 * @see OrthancPluginRestApiDelete |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1401 * @ingroup Orthanc |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1402 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1403 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins( |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1404 OrthancPluginContext* context, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1405 const char* uri) |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1406 { |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1407 return context->InvokeService(context, _OrthancPluginService_RestApiDeleteAfterPlugins, uri); |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1408 } |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1409 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1410 |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1411 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1412 /** |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1413 * @brief Make a PUT call to the built-in Orthanc REST API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1414 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1415 * Make a PUT call to the built-in Orthanc REST API. The result to |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1416 * the query is stored into a newly allocated memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1417 * |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1418 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1419 * @param target The target memory buffer. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1420 * @param uri The URI in the built-in Orthanc API. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1421 * @param body The body of the PUT request. |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1422 * @param bodySize The size of the body. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1423 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1424 * @see OrthancPluginRestApiPutAfterPlugins |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1425 * @ingroup Orthanc |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1426 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1427 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPut( |
913
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1428 OrthancPluginContext* context, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1429 OrthancPluginMemoryBuffer* target, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1430 const char* uri, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1431 const char* body, |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1432 uint32_t bodySize) |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1433 { |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1434 _OrthancPluginRestApiPostPut params; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1435 params.target = target; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1436 params.uri = uri; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1437 params.body = body; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1438 params.bodySize = bodySize; |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1439 return context->InvokeService(context, _OrthancPluginService_RestApiPut, ¶ms); |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1440 } |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1441 |
3e43de893d88
POST, DELETE, PUT from Orthanc plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
912
diff
changeset
|
1442 |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1443 |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1444 /** |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1445 * @brief Make a PUT call to the REST API, as tainted by the plugins. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1446 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1447 * Make a PUT call to the Orthanc REST API, after all the plugins |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1448 * are applied. In other words, if some plugin overrides or adds the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1449 * called URI to the built-in Orthanc REST API, this call will |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1450 * return the result provided by this plugin. The result to the |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1451 * query is stored into a newly allocated memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1452 * |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1453 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1454 * @param target The target memory buffer. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1455 * @param uri The URI in the built-in Orthanc API. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1456 * @param body The body of the PUT request. |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1457 * @param bodySize The size of the body. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1458 * @return 0 if success, or the error code if failure. |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
1459 * @see OrthancPluginRestApiPut |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1460 * @ingroup Orthanc |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1461 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
1462 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPutAfterPlugins( |
1282
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1463 OrthancPluginContext* context, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1464 OrthancPluginMemoryBuffer* target, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1465 const char* uri, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1466 const char* body, |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1467 uint32_t bodySize) |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1468 { |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1469 _OrthancPluginRestApiPostPut params; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1470 params.target = target; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1471 params.uri = uri; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1472 params.body = body; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1473 params.bodySize = bodySize; |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1474 return context->InvokeService(context, _OrthancPluginService_RestApiPutAfterPlugins, ¶ms); |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1475 } |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1476 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1477 |
7bccdd221e2b
Plugins can do REST calls to other plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1280
diff
changeset
|
1478 |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1479 typedef struct |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1480 { |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1481 OrthancPluginRestOutput* output; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1482 const char* argument; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1483 } _OrthancPluginOutputPlusArgument; |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1484 |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1485 /** |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1486 * @brief Redirect a REST request. |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1487 * |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1488 * This function answers to a REST request by redirecting the user |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1489 * to another URI using HTTP status 301. |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1490 * |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1491 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1492 * @param output The HTTP connection to the client application. |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1493 * @param redirection Where to redirect. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1494 * @ingroup REST |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1495 **/ |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1496 ORTHANC_PLUGIN_INLINE void OrthancPluginRedirect( |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1497 OrthancPluginContext* context, |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1498 OrthancPluginRestOutput* output, |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1499 const char* redirection) |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1500 { |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1501 _OrthancPluginOutputPlusArgument params; |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1502 params.output = output; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1503 params.argument = redirection; |
993
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1504 context->InvokeService(context, _OrthancPluginService_Redirect, ¶ms); |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1505 } |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1506 |
501880d76474
improvements to GDCM plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
913
diff
changeset
|
1507 |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1508 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1509 typedef struct |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1510 { |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1511 char** result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1512 const char* argument; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1513 } _OrthancPluginRetrieveDynamicString; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1514 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1515 /** |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1516 * @brief Look for a patient. |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1517 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1518 * Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020). |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1519 * This function uses the database index to run as fast as possible (it does not loop |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1520 * over all the stored patients). |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1521 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1522 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1523 * @param patientID The Patient ID of interest. |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1524 * @return The NULL value if the patient is non-existent, or a string containing the |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1525 * Orthanc ID of the patient. This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1526 * @ingroup Orthanc |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1527 **/ |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1528 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupPatient( |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1529 OrthancPluginContext* context, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1530 const char* patientID) |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1531 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1532 char* result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1533 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1534 _OrthancPluginRetrieveDynamicString params; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1535 params.result = &result; |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1536 params.argument = patientID; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1537 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1538 if (context->InvokeService(context, _OrthancPluginService_LookupPatient, ¶ms) != OrthancPluginErrorCode_Success) |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1539 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1540 /* Error */ |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1541 return NULL; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1542 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1543 else |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1544 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1545 return result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1546 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1547 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1548 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1549 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1550 /** |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1551 * @brief Look for a study. |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1552 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1553 * Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d). |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1554 * This function uses the database index to run as fast as possible (it does not loop |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1555 * over all the stored studies). |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1556 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1557 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1558 * @param studyUID The Study Instance UID of interest. |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1559 * @return The NULL value if the study is non-existent, or a string containing the |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1560 * Orthanc ID of the study. This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1561 * @ingroup Orthanc |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1562 **/ |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1563 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudy( |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1564 OrthancPluginContext* context, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1565 const char* studyUID) |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1566 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1567 char* result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1568 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1569 _OrthancPluginRetrieveDynamicString params; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1570 params.result = &result; |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1571 params.argument = studyUID; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1572 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1573 if (context->InvokeService(context, _OrthancPluginService_LookupStudy, ¶ms) != OrthancPluginErrorCode_Success) |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1574 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1575 /* Error */ |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1576 return NULL; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1577 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1578 else |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1579 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1580 return result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1581 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1582 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1583 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1584 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1585 /** |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1586 * @brief Look for a study, using the accession number. |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1587 * |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1588 * Look for a study stored in Orthanc, using its Accession Number tag (0x0008, 0x0050). |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1589 * This function uses the database index to run as fast as possible (it does not loop |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1590 * over all the stored studies). |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1591 * |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1592 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1593 * @param accessionNumber The Accession Number of interest. |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1594 * @return The NULL value if the study is non-existent, or a string containing the |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1595 * Orthanc ID of the study. This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1596 * @ingroup Orthanc |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1597 **/ |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1598 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudyWithAccessionNumber( |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1599 OrthancPluginContext* context, |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1600 const char* accessionNumber) |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1601 { |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1602 char* result; |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1603 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1604 _OrthancPluginRetrieveDynamicString params; |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1605 params.result = &result; |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1606 params.argument = accessionNumber; |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1607 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1608 if (context->InvokeService(context, _OrthancPluginService_LookupStudyWithAccessionNumber, ¶ms) != OrthancPluginErrorCode_Success) |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1609 { |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1610 /* Error */ |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1611 return NULL; |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1612 } |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1613 else |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1614 { |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1615 return result; |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1616 } |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1617 } |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1618 |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1619 |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1620 /** |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1621 * @brief Look for a series. |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1622 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1623 * Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e). |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1624 * This function uses the database index to run as fast as possible (it does not loop |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1625 * over all the stored series). |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1626 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1627 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1628 * @param seriesUID The Series Instance UID of interest. |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1629 * @return The NULL value if the series is non-existent, or a string containing the |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1630 * Orthanc ID of the series. This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1631 * @ingroup Orthanc |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1632 **/ |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1633 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupSeries( |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1634 OrthancPluginContext* context, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1635 const char* seriesUID) |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1636 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1637 char* result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1638 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1639 _OrthancPluginRetrieveDynamicString params; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1640 params.result = &result; |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1641 params.argument = seriesUID; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1642 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1643 if (context->InvokeService(context, _OrthancPluginService_LookupSeries, ¶ms) != OrthancPluginErrorCode_Success) |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1644 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1645 /* Error */ |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1646 return NULL; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1647 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1648 else |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1649 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1650 return result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1651 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1652 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1653 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1654 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1655 /** |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1656 * @brief Look for an instance. |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1657 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1658 * Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018). |
1069
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1659 * This function uses the database index to run as fast as possible (it does not loop |
a91b4900f06a
plugin lookup using accession number
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1068
diff
changeset
|
1660 * over all the stored instances). |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1661 * |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1662 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1663 * @param sopInstanceUID The SOP Instance UID of interest. |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1664 * @return The NULL value if the instance is non-existent, or a string containing the |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1665 * Orthanc ID of the instance. This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1666 * @ingroup Orthanc |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1667 **/ |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1668 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupInstance( |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1669 OrthancPluginContext* context, |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1670 const char* sopInstanceUID) |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1671 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1672 char* result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1673 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1674 _OrthancPluginRetrieveDynamicString params; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1675 params.result = &result; |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
1676 params.argument = sopInstanceUID; |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1677 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1678 if (context->InvokeService(context, _OrthancPluginService_LookupInstance, ¶ms) != OrthancPluginErrorCode_Success) |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1679 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1680 /* Error */ |
1037
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1681 return NULL; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1682 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1683 else |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1684 { |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1685 return result; |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1686 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1687 } |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1688 |
6208ab500ffd
LookupResource service in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1027
diff
changeset
|
1689 |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1690 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1691 typedef struct |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1692 { |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1693 OrthancPluginRestOutput* output; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1694 uint16_t status; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1695 } _OrthancPluginSendHttpStatusCode; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1696 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1697 /** |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1698 * @brief Send a HTTP status code. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1699 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1700 * This function answers to a REST request by sending a HTTP status |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1701 * code (such as "400 - Bad Request"). Note that: |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1702 * - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1703 * - Redirections (status 301) must use ::OrthancPluginRedirect(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1704 * - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1705 * - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1706 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1707 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1708 * @param output The HTTP connection to the client application. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1709 * @param status The HTTP status code to be sent. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1710 * @ingroup REST |
1594
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
1711 * @see OrthancPluginSendHttpStatus() |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1712 **/ |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1713 ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatusCode( |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1714 OrthancPluginContext* context, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1715 OrthancPluginRestOutput* output, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1716 uint16_t status) |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1717 { |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1718 _OrthancPluginSendHttpStatusCode params; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1719 params.output = output; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1720 params.status = status; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1721 context->InvokeService(context, _OrthancPluginService_SendHttpStatusCode, ¶ms); |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1722 } |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1723 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1724 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1725 /** |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1726 * @brief Signal that a REST request is not authorized. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1727 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1728 * This function answers to a REST request by signaling that it is |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1729 * not authorized. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1730 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1731 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1732 * @param output The HTTP connection to the client application. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1733 * @param realm The realm for the authorization process. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1734 * @ingroup REST |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1735 **/ |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1736 ORTHANC_PLUGIN_INLINE void OrthancPluginSendUnauthorized( |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1737 OrthancPluginContext* context, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1738 OrthancPluginRestOutput* output, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1739 const char* realm) |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1740 { |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1741 _OrthancPluginOutputPlusArgument params; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1742 params.output = output; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1743 params.argument = realm; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1744 context->InvokeService(context, _OrthancPluginService_SendUnauthorized, ¶ms); |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1745 } |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1746 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1747 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1748 /** |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1749 * @brief Signal that this URI does not support this HTTP method. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1750 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1751 * This function answers to a REST request by signaling that the |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1752 * queried URI does not support this method. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1753 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1754 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1755 * @param output The HTTP connection to the client application. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1756 * @param allowedMethods The allowed methods for this URI (e.g. "GET,POST" after a PUT or a POST request). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1757 * @ingroup REST |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1758 **/ |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1759 ORTHANC_PLUGIN_INLINE void OrthancPluginSendMethodNotAllowed( |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1760 OrthancPluginContext* context, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1761 OrthancPluginRestOutput* output, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1762 const char* allowedMethods) |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1763 { |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1764 _OrthancPluginOutputPlusArgument params; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1765 params.output = output; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1766 params.argument = allowedMethods; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1767 context->InvokeService(context, _OrthancPluginService_SendMethodNotAllowed, ¶ms); |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1768 } |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1769 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1770 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1771 typedef struct |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1772 { |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1773 OrthancPluginRestOutput* output; |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1774 const char* key; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1775 const char* value; |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1776 } _OrthancPluginSetHttpHeader; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1777 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1778 /** |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1779 * @brief Set a cookie. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1780 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1781 * This function sets a cookie in the HTTP client. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1782 * |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1783 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1784 * @param output The HTTP connection to the client application. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1785 * @param cookie The cookie to be set. |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1786 * @param value The value of the cookie. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1787 * @ingroup REST |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1788 **/ |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1789 ORTHANC_PLUGIN_INLINE void OrthancPluginSetCookie( |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1790 OrthancPluginContext* context, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1791 OrthancPluginRestOutput* output, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1792 const char* cookie, |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1793 const char* value) |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1794 { |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1795 _OrthancPluginSetHttpHeader params; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1796 params.output = output; |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1797 params.key = cookie; |
1042
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1798 params.value = value; |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1799 context->InvokeService(context, _OrthancPluginService_SetCookie, ¶ms); |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1800 } |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1801 |
8d1845feb277
set cookies, not allowed methods, unauthorized in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1041
diff
changeset
|
1802 |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1803 /** |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1804 * @brief Set some HTTP header. |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1805 * |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1806 * This function sets a HTTP header in the HTTP answer. |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1807 * |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1808 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1809 * @param output The HTTP connection to the client application. |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1810 * @param key The HTTP header to be set. |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1811 * @param value The value of the HTTP header. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1812 * @ingroup REST |
1137
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1813 **/ |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1814 ORTHANC_PLUGIN_INLINE void OrthancPluginSetHttpHeader( |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1815 OrthancPluginContext* context, |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1816 OrthancPluginRestOutput* output, |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1817 const char* key, |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1818 const char* value) |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1819 { |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1820 _OrthancPluginSetHttpHeader params; |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1821 params.output = output; |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1822 params.key = key; |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1823 params.value = value; |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1824 context->InvokeService(context, _OrthancPluginService_SetHttpHeader, ¶ms); |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1825 } |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1826 |
d9c27f9f1a51
OrthancPluginSetHttpHeader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1136
diff
changeset
|
1827 |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1828 typedef struct |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1829 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1830 char** resultStringToFree; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1831 const char** resultString; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1832 int64_t* resultInt64; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1833 const char* key; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1834 OrthancPluginDicomInstance* instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1835 } _OrthancPluginAccessDicomInstance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1836 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1837 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1838 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1839 * @brief Get the AET of a DICOM instance. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1840 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1841 * This function returns the Application Entity Title (AET) of the |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1842 * DICOM modality from which a DICOM instance originates. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1843 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1844 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1845 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1846 * @return The AET if success, NULL if error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1847 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1848 **/ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1849 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceRemoteAet( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1850 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1851 OrthancPluginDicomInstance* instance) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1852 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1853 const char* result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1854 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1855 _OrthancPluginAccessDicomInstance params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1856 memset(¶ms, 0, sizeof(params)); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1857 params.resultString = &result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1858 params.instance = instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1859 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1860 if (context->InvokeService(context, _OrthancPluginService_GetInstanceRemoteAet, ¶ms) != OrthancPluginErrorCode_Success) |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1861 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1862 /* Error */ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1863 return NULL; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1864 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1865 else |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1866 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1867 return result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1868 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1869 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1870 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1871 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1872 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1873 * @brief Get the size of a DICOM file. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1874 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1875 * This function returns the number of bytes of the given DICOM instance. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1876 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1877 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1878 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1879 * @return The size of the file, -1 in case of error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1880 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1881 **/ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1882 ORTHANC_PLUGIN_INLINE int64_t OrthancPluginGetInstanceSize( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1883 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1884 OrthancPluginDicomInstance* instance) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1885 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1886 int64_t size; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1887 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1888 _OrthancPluginAccessDicomInstance params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1889 memset(¶ms, 0, sizeof(params)); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1890 params.resultInt64 = &size; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1891 params.instance = instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1892 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1893 if (context->InvokeService(context, _OrthancPluginService_GetInstanceSize, ¶ms) != OrthancPluginErrorCode_Success) |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1894 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1895 /* Error */ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1896 return -1; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1897 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1898 else |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1899 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1900 return size; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1901 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1902 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1903 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1904 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1905 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1906 * @brief Get the data of a DICOM file. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1907 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1908 * This function returns a pointer to the content of the given DICOM instance. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1909 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1910 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1911 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1912 * @return The pointer to the DICOM data, NULL in case of error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1913 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1914 **/ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1915 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceData( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1916 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1917 OrthancPluginDicomInstance* instance) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1918 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1919 const char* result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1920 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1921 _OrthancPluginAccessDicomInstance params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1922 memset(¶ms, 0, sizeof(params)); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1923 params.resultString = &result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1924 params.instance = instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1925 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1926 if (context->InvokeService(context, _OrthancPluginService_GetInstanceData, ¶ms) != OrthancPluginErrorCode_Success) |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1927 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1928 /* Error */ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1929 return NULL; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1930 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1931 else |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1932 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1933 return result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1934 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1935 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1936 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1937 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1938 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1939 * @brief Get the DICOM tag hierarchy as a JSON file. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1940 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1941 * This function returns a pointer to a newly created string |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1942 * containing a JSON file. This JSON file encodes the tag hierarchy |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1943 * of the given DICOM instance. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1944 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1945 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1946 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1947 * @return The NULL value in case of error, or a string containing the JSON file. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1948 * This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1949 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1950 **/ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1951 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceJson( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1952 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1953 OrthancPluginDicomInstance* instance) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1954 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1955 char* result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1956 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1957 _OrthancPluginAccessDicomInstance params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1958 memset(¶ms, 0, sizeof(params)); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1959 params.resultStringToFree = &result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1960 params.instance = instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1961 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
1962 if (context->InvokeService(context, _OrthancPluginService_GetInstanceJson, ¶ms) != OrthancPluginErrorCode_Success) |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1963 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
1964 /* Error */ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1965 return NULL; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1966 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1967 else |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1968 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1969 return result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1970 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1971 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1972 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1973 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1974 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1975 * @brief Get the DICOM tag hierarchy as a JSON file (with simplification). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1976 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1977 * This function returns a pointer to a newly created string |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1978 * containing a JSON file. This JSON file encodes the tag hierarchy |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1979 * of the given DICOM instance. In contrast with |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1980 * ::OrthancPluginGetInstanceJson(), the returned JSON file is in |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1981 * its simplified version. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1982 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1983 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1984 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1985 * @return The NULL value in case of error, or a string containing the JSON file. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1986 * This string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
1987 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
1988 **/ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1989 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceSimplifiedJson( |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1990 OrthancPluginContext* context, |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1991 OrthancPluginDicomInstance* instance) |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1992 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1993 char* result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1994 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1995 _OrthancPluginAccessDicomInstance params; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1996 memset(¶ms, 0, sizeof(params)); |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1997 params.resultStringToFree = &result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1998 params.instance = instance; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
1999 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2000 if (context->InvokeService(context, _OrthancPluginService_GetInstanceSimplifiedJson, ¶ms) != OrthancPluginErrorCode_Success) |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2001 { |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2002 /* Error */ |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2003 return NULL; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2004 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2005 else |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2006 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2007 return result; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2008 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2009 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2010 |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2011 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2012 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2013 * @brief Check whether a DICOM instance is associated with some metadata. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2014 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2015 * This function checks whether the DICOM instance of interest is |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2016 * associated with some metadata. As of Orthanc 0.8.1, in the |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2017 * callbacks registered by |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2018 * ::OrthancPluginRegisterOnStoredInstanceCallback(), the only |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2019 * possibly available metadata are "ReceptionDate", "RemoteAET" and |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2020 * "IndexInSeries". |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2021 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2022 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2023 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2024 * @param metadata The metadata of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2025 * @return 1 if the metadata is present, 0 if it is absent, -1 in case of error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2026 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2027 **/ |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2028 ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata( |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2029 OrthancPluginContext* context, |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2030 OrthancPluginDicomInstance* instance, |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2031 const char* metadata) |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2032 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2033 int64_t result; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2034 |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2035 _OrthancPluginAccessDicomInstance params; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2036 memset(¶ms, 0, sizeof(params)); |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2037 params.resultInt64 = &result; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2038 params.instance = instance; |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2039 params.key = metadata; |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2040 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2041 if (context->InvokeService(context, _OrthancPluginService_HasInstanceMetadata, ¶ms) != OrthancPluginErrorCode_Success) |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2042 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2043 /* Error */ |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2044 return -1; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2045 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2046 else |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2047 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2048 return (result != 0); |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2049 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2050 } |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2051 |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2052 |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2053 /** |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2054 * @brief Get the value of some metadata associated with a given DICOM instance. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2055 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2056 * This functions returns the value of some metadata that is associated with the DICOM instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2057 * Before calling this function, the existence of the metadata must have been checked with |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2058 * ::OrthancPluginHasInstanceMetadata(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2059 * |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2060 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2061 * @param instance The instance of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2062 * @param metadata The metadata of interest. |
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2063 * @return The metadata value if success, NULL if error. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2064 * @ingroup Callbacks |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2065 **/ |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2066 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceMetadata( |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2067 OrthancPluginContext* context, |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2068 OrthancPluginDicomInstance* instance, |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2069 const char* metadata) |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2070 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2071 const char* result; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2072 |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2073 _OrthancPluginAccessDicomInstance params; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2074 memset(¶ms, 0, sizeof(params)); |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2075 params.resultString = &result; |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2076 params.instance = instance; |
1068
f54a9c6fea5d
documentation of plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1067
diff
changeset
|
2077 params.key = metadata; |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2078 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2079 if (context->InvokeService(context, _OrthancPluginService_GetInstanceMetadata, ¶ms) != OrthancPluginErrorCode_Success) |
1067
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2080 { |
ace99e272203
access metadata in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1066
diff
changeset
|
2081 /* Error */ |
1066
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2082 return NULL; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2083 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2084 else |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2085 { |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2086 return result; |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2087 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2088 } |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2089 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2090 |
bb82e5e818e9
OnStoredInstance callback in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1042
diff
changeset
|
2091 |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2092 typedef struct |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2093 { |
1295 | 2094 OrthancPluginStorageCreate create; |
2095 OrthancPluginStorageRead read; | |
2096 OrthancPluginStorageRemove remove; | |
2097 OrthancPluginFree free; | |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2098 } _OrthancPluginRegisterStorageArea; |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2099 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2100 /** |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2101 * @brief Register a custom storage area. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2102 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2103 * This function registers a custom storage area, to replace the |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2104 * built-in way Orthanc stores its files on the filesystem. This |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2105 * function must be called during the initialization of the plugin, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2106 * i.e. inside the OrthancPluginInitialize() public function. |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2107 * |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2108 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1141 | 2109 * @param create The callback function to store a file on the custom storage area. |
2110 * @param read The callback function to read a file from the custom storage area. | |
2111 * @param remove The callback function to remove a file from the custom storage area. | |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2112 * @ingroup Callbacks |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2113 **/ |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2114 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterStorageArea( |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2115 OrthancPluginContext* context, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2116 OrthancPluginStorageCreate create, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2117 OrthancPluginStorageRead read, |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2118 OrthancPluginStorageRemove remove) |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2119 { |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2120 _OrthancPluginRegisterStorageArea params; |
1295 | 2121 params.create = create; |
2122 params.read = read; | |
2123 params.remove = remove; | |
1136
208dc67b9bab
sample custom storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1135
diff
changeset
|
2124 |
208dc67b9bab
sample custom storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1135
diff
changeset
|
2125 #ifdef __cplusplus |
1295 | 2126 params.free = ::free; |
1136
208dc67b9bab
sample custom storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1135
diff
changeset
|
2127 #else |
1295 | 2128 params.free = free; |
1136
208dc67b9bab
sample custom storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1135
diff
changeset
|
2129 #endif |
208dc67b9bab
sample custom storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1135
diff
changeset
|
2130 |
1135
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2131 context->InvokeService(context, _OrthancPluginService_RegisterStorageArea, ¶ms); |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2132 } |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2133 |
67c3c1e4a6e0
index-only mode, and custom storage area with plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1069
diff
changeset
|
2134 |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2135 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2136 /** |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2137 * @brief Return the path to the Orthanc executable. |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2138 * |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2139 * This function returns the path to the Orthanc executable. |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2140 * |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2141 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2142 * @return NULL in the case of an error, or a newly allocated string |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2143 * containing the path. This string must be freed by |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2144 * OrthancPluginFreeString(). |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2145 **/ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2146 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancPath(OrthancPluginContext* context) |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2147 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2148 char* result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2149 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2150 _OrthancPluginRetrieveDynamicString params; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2151 params.result = &result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2152 params.argument = NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2153 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2154 if (context->InvokeService(context, _OrthancPluginService_GetOrthancPath, ¶ms) != OrthancPluginErrorCode_Success) |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2155 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2156 /* Error */ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2157 return NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2158 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2159 else |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2160 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2161 return result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2162 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2163 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2164 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2165 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2166 /** |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2167 * @brief Return the directory containing the Orthanc. |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2168 * |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2169 * This function returns the path to the directory containing the Orthanc executable. |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2170 * |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2171 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2172 * @return NULL in the case of an error, or a newly allocated string |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2173 * containing the path. This string must be freed by |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2174 * OrthancPluginFreeString(). |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2175 **/ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2176 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancDirectory(OrthancPluginContext* context) |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2177 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2178 char* result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2179 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2180 _OrthancPluginRetrieveDynamicString params; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2181 params.result = &result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2182 params.argument = NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2183 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2184 if (context->InvokeService(context, _OrthancPluginService_GetOrthancDirectory, ¶ms) != OrthancPluginErrorCode_Success) |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2185 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2186 /* Error */ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2187 return NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2188 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2189 else |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2190 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2191 return result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2192 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2193 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2194 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2195 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2196 /** |
1423
7b7d597a190c
The configuration can be splitted into several files stored inside the same folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1407
diff
changeset
|
2197 * @brief Return the path to the configuration file(s). |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2198 * |
1423
7b7d597a190c
The configuration can be splitted into several files stored inside the same folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1407
diff
changeset
|
2199 * This function returns the path to the configuration file(s) that |
7b7d597a190c
The configuration can be splitted into several files stored inside the same folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1407
diff
changeset
|
2200 * was specified when starting Orthanc. Since version 0.9.1, this |
7b7d597a190c
The configuration can be splitted into several files stored inside the same folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1407
diff
changeset
|
2201 * path can refer to a folder that stores a set of configuration |
1424
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2202 * files. This function is deprecated in favor of |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2203 * OrthancPluginGetConfiguration(). |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2204 * |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2205 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2206 * @return NULL in the case of an error, or a newly allocated string |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2207 * containing the path. This string must be freed by |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2208 * OrthancPluginFreeString(). |
1424
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2209 * @see OrthancPluginGetConfiguration() |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2210 **/ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2211 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfigurationPath(OrthancPluginContext* context) |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2212 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2213 char* result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2214 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2215 _OrthancPluginRetrieveDynamicString params; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2216 params.result = &result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2217 params.argument = NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2218 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2219 if (context->InvokeService(context, _OrthancPluginService_GetConfigurationPath, ¶ms) != OrthancPluginErrorCode_Success) |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2220 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2221 /* Error */ |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2222 return NULL; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2223 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2224 else |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2225 { |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2226 return result; |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2227 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2228 } |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2229 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2230 |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1141
diff
changeset
|
2231 |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2232 typedef struct |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2233 { |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2234 OrthancPluginOnChangeCallback callback; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2235 } _OrthancPluginOnChangeCallback; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2236 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2237 /** |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2238 * @brief Register a callback to monitor changes. |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2239 * |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2240 * This function registers a callback function that is called |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2241 * whenever a change happens to some DICOM resource. |
1642
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2242 * |
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2243 * @warning If your change callback has to call the REST API of |
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2244 * Orthanc, you should make these calls in a separate thread (with |
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2245 * the events passing through a message queue). Otherwise, this |
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2246 * could result in deadlocks in the presence of other plugins or Lua |
0669d05b6de1
warning about OrthancPluginRegisterOnChangeCallback
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
2247 * script. |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2248 * |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2249 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2250 * @param callback The callback function. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2251 * @ingroup Callbacks |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2252 **/ |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2253 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnChangeCallback( |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2254 OrthancPluginContext* context, |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2255 OrthancPluginOnChangeCallback callback) |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2256 { |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2257 _OrthancPluginOnChangeCallback params; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2258 params.callback = callback; |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2259 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2260 context->InvokeService(context, _OrthancPluginService_RegisterOnChangeCallback, ¶ms); |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2261 } |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2262 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2263 |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2264 |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2265 typedef struct |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2266 { |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2267 const char* plugin; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2268 _OrthancPluginProperty property; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2269 const char* value; |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2270 } _OrthancPluginSetPluginProperty; |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2271 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2272 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2273 /** |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2274 * @brief Set the URI where the plugin provides its Web interface. |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2275 * |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2276 * For plugins that come with a Web interface, this function |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2277 * declares the entry path where to find this interface. This |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2278 * information is notably used in the "Plugins" page of Orthanc |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2279 * Explorer. |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2280 * |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2281 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2282 * @param uri The root URI for this plugin. |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2283 **/ |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2284 ORTHANC_PLUGIN_INLINE void OrthancPluginSetRootUri( |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2285 OrthancPluginContext* context, |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2286 const char* uri) |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2287 { |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2288 _OrthancPluginSetPluginProperty params; |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2289 params.plugin = OrthancPluginGetName(); |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2290 params.property = _OrthancPluginProperty_RootUri; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2291 params.value = uri; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2292 |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2293 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms); |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2294 } |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2295 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2296 |
1233 | 2297 /** |
2298 * @brief Set a description for this plugin. | |
2299 * | |
2300 * Set a description for this plugin. It is displayed in the | |
2301 * "Plugins" page of Orthanc Explorer. | |
2302 * | |
2303 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
2304 * @param description The description. | |
2305 **/ | |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2306 ORTHANC_PLUGIN_INLINE void OrthancPluginSetDescription( |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2307 OrthancPluginContext* context, |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2308 const char* description) |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2309 { |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2310 _OrthancPluginSetPluginProperty params; |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2311 params.plugin = OrthancPluginGetName(); |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2312 params.property = _OrthancPluginProperty_Description; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2313 params.value = description; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2314 |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2315 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms); |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2316 } |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2317 |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2318 |
1233 | 2319 /** |
2320 * @brief Extend the JavaScript code of Orthanc Explorer. | |
2321 * | |
2322 * Add JavaScript code to customize the default behavior of Orthanc | |
2323 * Explorer. This can for instance be used to add new buttons. | |
2324 * | |
2325 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). | |
2326 * @param javascript The custom JavaScript code. | |
2327 **/ | |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2328 ORTHANC_PLUGIN_INLINE void OrthancPluginExtendOrthancExplorer( |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2329 OrthancPluginContext* context, |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2330 const char* javascript) |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2331 { |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2332 _OrthancPluginSetPluginProperty params; |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2333 params.plugin = OrthancPluginGetName(); |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2334 params.property = _OrthancPluginProperty_OrthancExplorer; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2335 params.value = javascript; |
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2336 |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2337 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms); |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1198
diff
changeset
|
2338 } |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
2339 |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2340 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2341 typedef struct |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2342 { |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2343 char** result; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2344 int32_t property; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2345 const char* value; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2346 } _OrthancPluginGlobalProperty; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2347 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2348 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2349 /** |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2350 * @brief Get the value of a global property. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2351 * |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2352 * Get the value of a global property that is stored in the Orthanc database. Global |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2353 * properties whose index is below 1024 are reserved by Orthanc. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2354 * |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2355 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2356 * @param property The global property of interest. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2357 * @param defaultValue The value to return, if the global property is unset. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2358 * @return The value of the global property, or NULL in the case of an error. This |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2359 * string must be freed by OrthancPluginFreeString(). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2360 * @ingroup Orthanc |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2361 **/ |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2362 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetGlobalProperty( |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2363 OrthancPluginContext* context, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2364 int32_t property, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2365 const char* defaultValue) |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2366 { |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2367 char* result; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2368 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2369 _OrthancPluginGlobalProperty params; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2370 params.result = &result; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2371 params.property = property; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2372 params.value = defaultValue; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2373 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2374 if (context->InvokeService(context, _OrthancPluginService_GetGlobalProperty, ¶ms) != OrthancPluginErrorCode_Success) |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2375 { |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2376 /* Error */ |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2377 return NULL; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2378 } |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2379 else |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2380 { |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2381 return result; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2382 } |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2383 } |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2384 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2385 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2386 /** |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2387 * @brief Set the value of a global property. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2388 * |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2389 * Set the value of a global property into the Orthanc |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2390 * database. Setting a global property can be used by plugins to |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2391 * save their internal parameters. Plugins are only allowed to set |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2392 * properties whose index are above or equal to 1024 (properties |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2393 * below 1024 are read-only and reserved by Orthanc). |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2394 * |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2395 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2396 * @param property The global property of interest. |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2397 * @param value The value to be set in the global property. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2398 * @return 0 if success, or the error code if failure. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2399 * @ingroup Orthanc |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2400 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2401 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSetGlobalProperty( |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2402 OrthancPluginContext* context, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2403 int32_t property, |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2404 const char* value) |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2405 { |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2406 _OrthancPluginGlobalProperty params; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2407 params.result = NULL; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2408 params.property = property; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2409 params.value = value; |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2410 |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2411 return context->InvokeService(context, _OrthancPluginService_SetGlobalProperty, ¶ms); |
1249
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2412 } |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2413 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2414 |
40725595aaf0
Plugins can get/set global properties to save their configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1233
diff
changeset
|
2415 |
1280
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2416 typedef struct |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2417 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2418 int32_t *resultInt32; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2419 uint32_t *resultUint32; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2420 int64_t *resultInt64; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2421 uint64_t *resultUint64; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2422 } _OrthancPluginReturnSingleValue; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2423 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2424 /** |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2425 * @brief Get the number of command-line arguments. |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2426 * |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2427 * Retrieve the number of command-line arguments that were used to launch Orthanc. |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2428 * |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2429 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2430 * @return The number of arguments. |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2431 **/ |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2432 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetCommandLineArgumentsCount( |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2433 OrthancPluginContext* context) |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2434 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2435 uint32_t count = 0; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2436 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2437 _OrthancPluginReturnSingleValue params; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2438 memset(¶ms, 0, sizeof(params)); |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2439 params.resultUint32 = &count; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2440 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2441 if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgumentsCount, ¶ms) != OrthancPluginErrorCode_Success) |
1280
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2442 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2443 /* Error */ |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2444 return 0; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2445 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2446 else |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2447 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2448 return count; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2449 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2450 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2451 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2452 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2453 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2454 /** |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2455 * @brief Get the value of a command-line argument. |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2456 * |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2457 * Get the value of one of the command-line arguments that were used |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2458 * to launch Orthanc. The number of available arguments can be |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2459 * retrieved by OrthancPluginGetCommandLineArgumentsCount(). |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2460 * |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2461 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2462 * @param argument The index of the argument. |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2463 * @return The value of the argument, or NULL in the case of an error. This |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2464 * string must be freed by OrthancPluginFreeString(). |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2465 **/ |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2466 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetCommandLineArgument( |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2467 OrthancPluginContext* context, |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2468 uint32_t argument) |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2469 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2470 char* result; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2471 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2472 _OrthancPluginGlobalProperty params; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2473 params.result = &result; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2474 params.property = (int32_t) argument; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2475 params.value = NULL; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2476 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2477 if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgument, ¶ms) != OrthancPluginErrorCode_Success) |
1280
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2478 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2479 /* Error */ |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2480 return NULL; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2481 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2482 else |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2483 { |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2484 return result; |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2485 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2486 } |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2487 |
d6a65dc6d0ac
Plugins can access the command-line arguments used to launch Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1249
diff
changeset
|
2488 |
1407
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2489 /** |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2490 * @brief Get the expected version of the database schema. |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2491 * |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2492 * Retrieve the expected version of the database schema. |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2493 * |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2494 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2495 * @return The version. |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2496 * @ingroup Callbacks |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
2497 * @deprecated Please instead use IDatabaseBackend::UpgradeDatabase() |
1407
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2498 **/ |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2499 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetExpectedDatabaseVersion( |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2500 OrthancPluginContext* context) |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2501 { |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2502 uint32_t count = 0; |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2503 |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2504 _OrthancPluginReturnSingleValue params; |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2505 memset(¶ms, 0, sizeof(params)); |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2506 params.resultUint32 = &count; |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2507 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2508 if (context->InvokeService(context, _OrthancPluginService_GetExpectedDatabaseVersion, ¶ms) != OrthancPluginErrorCode_Success) |
1407
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2509 { |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2510 /* Error */ |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2511 return 0; |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2512 } |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2513 else |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2514 { |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2515 return count; |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2516 } |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2517 } |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2518 |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2519 |
d371a66972a4
OrthancPluginGetExpectedDatabaseVersion
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
2520 |
1424
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2521 /** |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2522 * @brief Return the content of the configuration file(s). |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2523 * |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2524 * This function returns the content of the configuration that is |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2525 * used by Orthanc, formatted as a JSON string. |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2526 * |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2527 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2528 * @return NULL in the case of an error, or a newly allocated string |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2529 * containing the configuration. This string must be freed by |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2530 * OrthancPluginFreeString(). |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2531 **/ |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2532 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfiguration(OrthancPluginContext* context) |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2533 { |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2534 char* result; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2535 |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2536 _OrthancPluginRetrieveDynamicString params; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2537 params.result = &result; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2538 params.argument = NULL; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2539 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2540 if (context->InvokeService(context, _OrthancPluginService_GetConfiguration, ¶ms) != OrthancPluginErrorCode_Success) |
1424
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2541 { |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2542 /* Error */ |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2543 return NULL; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2544 } |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2545 else |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2546 { |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2547 return result; |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2548 } |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2549 } |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2550 |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2551 |
fe384a9d3b51
OrthancPluginGetConfiguration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1423
diff
changeset
|
2552 |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2553 typedef struct |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2554 { |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2555 OrthancPluginRestOutput* output; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2556 const char* subType; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2557 const char* contentType; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2558 } _OrthancPluginStartMultipartAnswer; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2559 |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2560 /** |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2561 * @brief Start an HTTP multipart answer. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2562 * |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2563 * Initiates a HTTP multipart answer, as the result of a REST request. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2564 * |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2565 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2566 * @param output The HTTP connection to the client application. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2567 * @param subType The sub-type of the multipart answer ("mixed" or "related"). |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2568 * @param contentType The MIME type of the items in the multipart answer. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2569 * @return 0 if success, or the error code if failure. |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2570 * @see OrthancPluginSendMultipartItem() |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2571 * @ingroup REST |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2572 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2573 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStartMultipartAnswer( |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2574 OrthancPluginContext* context, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2575 OrthancPluginRestOutput* output, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2576 const char* subType, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2577 const char* contentType) |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2578 { |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2579 _OrthancPluginStartMultipartAnswer params; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2580 params.output = output; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2581 params.subType = subType; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2582 params.contentType = contentType; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2583 return context->InvokeService(context, _OrthancPluginService_StartMultipartAnswer, ¶ms); |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2584 } |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2585 |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2586 |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2587 /** |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2588 * @brief Send an item as a part of some HTTP multipart answer. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2589 * |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2590 * This function sends an item as a part of some HTTP multipart |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2591 * answer that was initiated by OrthancPluginStartMultipartAnswer(). |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2592 * |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2593 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2594 * @param output The HTTP connection to the client application. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2595 * @param answer Pointer to the memory buffer containing the item. |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2596 * @param answerSize Number of bytes of the item. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2597 * @return 0 if success, or the error code if failure (this notably happens |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2598 * if the connection is closed by the client). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2599 * @ingroup REST |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2600 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2601 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSendMultipartItem( |
1430
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2602 OrthancPluginContext* context, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2603 OrthancPluginRestOutput* output, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2604 const char* answer, |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2605 uint32_t answerSize) |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2606 { |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2607 _OrthancPluginAnswerBuffer params; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2608 params.output = output; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2609 params.answer = answer; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2610 params.answerSize = answerSize; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2611 params.mimeType = NULL; |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2612 return context->InvokeService(context, _OrthancPluginService_SendMultipartItem, ¶ms); |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2613 } |
ad94a3583b07
Plugins can send answers as multipart messages
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1426
diff
changeset
|
2614 |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2615 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2616 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2617 typedef struct |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2618 { |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2619 OrthancPluginMemoryBuffer* target; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2620 const void* source; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2621 uint32_t size; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2622 OrthancPluginCompressionType compression; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2623 uint8_t uncompress; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2624 } _OrthancPluginBufferCompression; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2625 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2626 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2627 /** |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2628 * @brief Compress or decompress a buffer. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2629 * |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2630 * This function compresses or decompresses a buffer, using the |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2631 * version of the zlib library that is used by the Orthanc core. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2632 * |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2633 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2634 * @param target The target memory buffer. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2635 * @param source The source buffer. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2636 * @param size The size in bytes of the source buffer. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2637 * @param compression The compression algorithm. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2638 * @param uncompress If set to "0", the buffer must be compressed. |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2639 * If set to "1", the buffer must be uncompressed. |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2640 * @return 0 if success, or the error code if failure. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2641 * @ingroup Images |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2642 **/ |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1580
diff
changeset
|
2643 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginBufferCompression( |
1554
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2644 OrthancPluginContext* context, |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2645 OrthancPluginMemoryBuffer* target, |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2646 const void* source, |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2647 uint32_t size, |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2648 OrthancPluginCompressionType compression, |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2649 uint8_t uncompress) |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2650 { |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2651 _OrthancPluginBufferCompression params; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2652 params.target = target; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2653 params.source = source; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2654 params.size = size; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2655 params.compression = compression; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2656 params.uncompress = uncompress; |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2657 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2658 return context->InvokeService(context, _OrthancPluginService_BufferCompression, ¶ms); |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2659 } |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2660 |
89ab71a68fcf
New function OrthancPluginBufferCompression() to (un)compress memory buffers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1466
diff
changeset
|
2661 |
1588
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2662 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2663 typedef struct |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2664 { |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2665 OrthancPluginMemoryBuffer* target; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2666 const char* path; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2667 } _OrthancPluginReadFile; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2668 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2669 /** |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2670 * @brief Read a file. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2671 * |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2672 * Read the content of a file on the filesystem, and returns it into |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2673 * a newly allocated memory buffer. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2674 * |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2675 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2676 * @param target The target memory buffer. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2677 * @param path The path of the file to be read. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2678 * @return 0 if success, or the error code if failure. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2679 **/ |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2680 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReadFile( |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2681 OrthancPluginContext* context, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2682 OrthancPluginMemoryBuffer* target, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2683 const char* path) |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2684 { |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2685 _OrthancPluginReadFile params; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2686 params.target = target; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2687 params.path = path; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2688 return context->InvokeService(context, _OrthancPluginService_ReadFile, ¶ms); |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2689 } |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2690 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2691 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2692 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2693 typedef struct |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2694 { |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2695 const char* path; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2696 const void* data; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2697 uint32_t size; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2698 } _OrthancPluginWriteFile; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2699 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2700 /** |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2701 * @brief Write a file. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2702 * |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2703 * Write the content of a memory buffer to the filesystem. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2704 * |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2705 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2706 * @param path The path of the file to be written. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2707 * @param data The content of the memory buffer. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2708 * @param size The size of the memory buffer. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2709 * @return 0 if success, or the error code if failure. |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2710 **/ |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2711 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWriteFile( |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2712 OrthancPluginContext* context, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2713 const char* path, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2714 const void* data, |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2715 uint32_t size) |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2716 { |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2717 _OrthancPluginWriteFile params; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2718 params.path = path; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2719 params.data = data; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2720 params.size = size; |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2721 return context->InvokeService(context, _OrthancPluginService_WriteFile, ¶ms); |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2722 } |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2723 |
b5bc87a7212d
OrthancPluginReadFile, OrthancPluginWriteFile
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2724 |
1593
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2725 |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2726 typedef struct |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2727 { |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2728 const char** target; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2729 OrthancPluginErrorCode error; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2730 } _OrthancPluginGetErrorDescription; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2731 |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2732 /** |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2733 * @brief Get the description of a given error code. |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2734 * |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2735 * This function returns the description of a given error code. |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2736 * |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2737 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
2738 * @param error The error code of interest. |
1593
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2739 * @return The error description. This is a statically-allocated |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2740 * string, do not free it. |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2741 **/ |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2742 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetErrorDescription( |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2743 OrthancPluginContext* context, |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2744 OrthancPluginErrorCode error) |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2745 { |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2746 const char* result = NULL; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2747 |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2748 _OrthancPluginGetErrorDescription params; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2749 params.target = &result; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2750 params.error = error; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2751 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2752 if (context->InvokeService(context, _OrthancPluginService_GetErrorDescription, ¶ms) != OrthancPluginErrorCode_Success || |
1593
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2753 result == NULL) |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2754 { |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2755 return "Unknown error code"; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2756 } |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2757 else |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2758 { |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2759 return result; |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2760 } |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2761 } |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2762 |
235d89817b89
OrthancPluginGetErrorDescription
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1588
diff
changeset
|
2763 |
1594
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2764 |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2765 typedef struct |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2766 { |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2767 OrthancPluginRestOutput* output; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2768 uint16_t status; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2769 const char* body; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2770 uint32_t bodySize; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2771 } _OrthancPluginSendHttpStatus; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2772 |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2773 /** |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2774 * @brief Send a HTTP status, with a custom body. |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2775 * |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2776 * This function answers to a HTTP request by sending a HTTP status |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2777 * code (such as "400 - Bad Request"), together with a body |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2778 * describing the error. The body will only be returned if the |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2779 * configuration option "HttpDescribeErrors" of Orthanc is set to "true". |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2780 * |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2781 * Note that: |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2782 * - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2783 * - Redirections (status 301) must use ::OrthancPluginRedirect(). |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2784 * - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2785 * - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed(). |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2786 * |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2787 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2788 * @param output The HTTP connection to the client application. |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2789 * @param status The HTTP status code to be sent. |
1595
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
2790 * @param body The body of the answer. |
e1e54a73ba8b
OrthancPluginRegisterRestCallbackNoLock, documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1594
diff
changeset
|
2791 * @param bodySize The size of the body. |
1594
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2792 * @see OrthancPluginSendHttpStatusCode() |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
2793 * @ingroup REST |
1594
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2794 **/ |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2795 ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatus( |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2796 OrthancPluginContext* context, |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2797 OrthancPluginRestOutput* output, |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2798 uint16_t status, |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2799 const char* body, |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2800 uint32_t bodySize) |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2801 { |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2802 _OrthancPluginSendHttpStatus params; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2803 params.output = output; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2804 params.status = status; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2805 params.body = body; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2806 params.bodySize = bodySize; |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2807 context->InvokeService(context, _OrthancPluginService_SendHttpStatus, ¶ms); |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2808 } |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2809 |
2bac60a4f584
OrthancPluginSendHttpStatus
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1593
diff
changeset
|
2810 |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2811 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2812 typedef struct |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2813 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2814 const OrthancPluginImage* image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2815 uint32_t* resultUint32; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2816 OrthancPluginPixelFormat* resultPixelFormat; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2817 const void** resultBuffer; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2818 } _OrthancPluginGetImageInfo; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2819 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2820 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2821 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2822 * @brief Return the pixel format of an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2823 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2824 * This function returns the type of memory layout for the pixels of the given image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2825 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2826 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2827 * @param image The image of interest. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2828 * @return The pixel format. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2829 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2830 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2831 ORTHANC_PLUGIN_INLINE OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2832 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2833 const OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2834 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2835 OrthancPluginPixelFormat target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2836 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2837 _OrthancPluginGetImageInfo params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2838 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2839 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2840 params.resultPixelFormat = ⌖ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2841 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2842 if (context->InvokeService(context, _OrthancPluginService_GetImagePixelFormat, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2843 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2844 return OrthancPluginPixelFormat_Unknown; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2845 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2846 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2847 { |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2848 return (OrthancPluginPixelFormat) target; |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2849 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2850 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2851 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2852 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2853 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2854 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2855 * @brief Return the width of an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2856 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2857 * This function returns the width of the given image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2858 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2859 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2860 * @param image The image of interest. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2861 * @return The width. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2862 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2863 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2864 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageWidth( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2865 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2866 const OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2867 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2868 uint32_t width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2869 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2870 _OrthancPluginGetImageInfo params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2871 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2872 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2873 params.resultUint32 = &width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2874 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2875 if (context->InvokeService(context, _OrthancPluginService_GetImageWidth, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2876 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2877 return 0; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2878 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2879 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2880 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2881 return width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2882 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2883 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2884 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2885 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2886 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2887 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2888 * @brief Return the height of an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2889 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2890 * This function returns the height of the given image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2891 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2892 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2893 * @param image The image of interest. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2894 * @return The height. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2895 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2896 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2897 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageHeight( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2898 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2899 const OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2900 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2901 uint32_t height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2902 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2903 _OrthancPluginGetImageInfo params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2904 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2905 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2906 params.resultUint32 = &height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2907 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2908 if (context->InvokeService(context, _OrthancPluginService_GetImageHeight, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2909 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2910 return 0; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2911 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2912 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2913 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2914 return height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2915 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2916 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2917 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2918 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2919 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2920 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2921 * @brief Return the pitch of an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2922 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2923 * This function returns the pitch of the given image. The pitch is |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2924 * defined as the number of bytes between 2 successive lines of the |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2925 * image in the memory buffer. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2926 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2927 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2928 * @param image The image of interest. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2929 * @return The pitch. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2930 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2931 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2932 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImagePitch( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2933 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2934 const OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2935 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2936 uint32_t pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2937 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2938 _OrthancPluginGetImageInfo params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2939 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2940 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2941 params.resultUint32 = &pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2942 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2943 if (context->InvokeService(context, _OrthancPluginService_GetImagePitch, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2944 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2945 return 0; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2946 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2947 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2948 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2949 return pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2950 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2951 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2952 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2953 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2954 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2955 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2956 * @brief Return a pointer to the content of an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2957 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2958 * This function returns a pointer to the memory buffer that |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2959 * contains the pixels of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2960 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2961 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2962 * @param image The image of interest. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2963 * @return The pointer. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
2964 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2965 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2966 ORTHANC_PLUGIN_INLINE const void* OrthancPluginGetImageBuffer( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2967 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2968 const OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2969 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2970 const void* target = NULL; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2971 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2972 _OrthancPluginGetImageInfo params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2973 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2974 params.resultBuffer = ⌖ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2975 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2976 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
2977 if (context->InvokeService(context, _OrthancPluginService_GetImageBuffer, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2978 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2979 return NULL; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2980 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2981 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2982 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2983 return target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2984 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2985 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2986 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2987 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2988 typedef struct |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2989 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2990 OrthancPluginImage** target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2991 const void* data; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2992 uint32_t size; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2993 OrthancPluginImageFormat format; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2994 } _OrthancPluginUncompressImage; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2995 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2996 |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2997 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2998 * @brief Decode a compressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
2999 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3000 * This function decodes a compressed image from a memory buffer. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3001 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3002 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3003 * @param data Pointer to a memory buffer containing the compressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3004 * @param size Size of the memory buffer containing the compressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3005 * @param format The file format of the compressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3006 * @return The uncompressed image. It must be freed with OrthancPluginFreeImage(). |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3007 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3008 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3009 ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginUncompressImage( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3010 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3011 const void* data, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3012 uint32_t size, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3013 OrthancPluginImageFormat format) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3014 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3015 OrthancPluginImage* target = NULL; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3016 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3017 _OrthancPluginUncompressImage params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3018 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3019 params.target = ⌖ |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3020 params.data = data; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3021 params.size = size; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3022 params.format = format; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3023 |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
3024 if (context->InvokeService(context, _OrthancPluginService_UncompressImage, ¶ms) != OrthancPluginErrorCode_Success) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3025 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3026 return NULL; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3027 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3028 else |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3029 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3030 return target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3031 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3032 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3033 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3034 |
1605 | 3035 |
3036 | |
3037 typedef struct | |
3038 { | |
3039 OrthancPluginImage* image; | |
3040 } _OrthancPluginFreeImage; | |
3041 | |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3042 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3043 * @brief Free an image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3044 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3045 * This function frees an image that was decoded with OrthancPluginUncompressImage(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3046 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3047 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3048 * @param image The image. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3049 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3050 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3051 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeImage( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3052 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3053 OrthancPluginImage* image) |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3054 { |
1605 | 3055 _OrthancPluginFreeImage params; |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3056 params.image = image; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3057 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3058 context->InvokeService(context, _OrthancPluginService_FreeImage, ¶ms); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3059 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3060 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3061 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3062 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3063 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3064 typedef struct |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3065 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3066 OrthancPluginMemoryBuffer* target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3067 OrthancPluginImageFormat imageFormat; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3068 OrthancPluginPixelFormat pixelFormat; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3069 uint32_t width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3070 uint32_t height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3071 uint32_t pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3072 const void* buffer; |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
3073 uint8_t quality; |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3074 } _OrthancPluginCompressImage; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3075 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3076 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3077 /** |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
3078 * @brief Encode a PNG image. |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3079 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3080 * This function compresses the given memory buffer containing an |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3081 * image using the PNG specification, and stores the result of the |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3082 * compression into a newly allocated memory buffer. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3083 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3084 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3085 * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3086 * @param format The memory layout of the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3087 * @param width The width of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3088 * @param height The height of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3089 * @param pitch The pitch of the image (i.e. the number of bytes |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3090 * between 2 successive lines of the image in the memory buffer). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3091 * @param buffer The memory buffer containing the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3092 * @return 0 if success, or the error code if failure. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3093 * @see OrthancPluginCompressAndAnswerPngImage() |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3094 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3095 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3096 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressPngImage( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3097 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3098 OrthancPluginMemoryBuffer* target, |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3099 OrthancPluginPixelFormat format, |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3100 uint32_t width, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3101 uint32_t height, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3102 uint32_t pitch, |
1599
dd1f9e81f891
fixes to image primitives
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
3103 const void* buffer) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3104 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3105 _OrthancPluginCompressImage params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3106 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3107 params.target = target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3108 params.imageFormat = OrthancPluginImageFormat_Png; |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3109 params.pixelFormat = format; |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3110 params.width = width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3111 params.height = height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3112 params.pitch = pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3113 params.buffer = buffer; |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3114 params.quality = 0; /* Unused for PNG */ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3115 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3116 return context->InvokeService(context, _OrthancPluginService_CompressImage, ¶ms); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3117 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3118 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3119 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3120 /** |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
3121 * @brief Encode a JPEG image. |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3122 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3123 * This function compresses the given memory buffer containing an |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3124 * image using the JPEG specification, and stores the result of the |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3125 * compression into a newly allocated memory buffer. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3126 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3127 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3128 * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3129 * @param format The memory layout of the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3130 * @param width The width of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3131 * @param height The height of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3132 * @param pitch The pitch of the image (i.e. the number of bytes |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3133 * between 2 successive lines of the image in the memory buffer). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3134 * @param buffer The memory buffer containing the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3135 * @param quality The quality of the JPEG encoding, between 1 (worst |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3136 * quality, best compression) and 100 (best quality, worst |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3137 * compression). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3138 * @return 0 if success, or the error code if failure. |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3139 * @ingroup Images |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3140 **/ |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3141 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressJpegImage( |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3142 OrthancPluginContext* context, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3143 OrthancPluginMemoryBuffer* target, |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3144 OrthancPluginPixelFormat format, |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3145 uint32_t width, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3146 uint32_t height, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3147 uint32_t pitch, |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3148 const void* buffer, |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3149 uint8_t quality) |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3150 { |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3151 _OrthancPluginCompressImage params; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3152 memset(¶ms, 0, sizeof(params)); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3153 params.target = target; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3154 params.imageFormat = OrthancPluginImageFormat_Jpeg; |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3155 params.pixelFormat = format; |
1598
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3156 params.width = width; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3157 params.height = height; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3158 params.pitch = pitch; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3159 params.buffer = buffer; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3160 params.quality = quality; |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3161 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3162 return context->InvokeService(context, _OrthancPluginService_CompressImage, ¶ms); |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3163 } |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3164 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3165 |
c6b50b803387
primitives for image encoding/decoding in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
3166 |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3167 /** |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3168 * @brief Answer to a REST request with a JPEG image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3169 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3170 * This function answers to a REST request with a JPEG image. The |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3171 * parameters of this function describe a memory buffer that |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3172 * contains an uncompressed image. The image will be automatically compressed |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3173 * as a JPEG image by the core system of Orthanc. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3174 * |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3175 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3176 * @param output The HTTP connection to the client application. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3177 * @param format The memory layout of the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3178 * @param width The width of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3179 * @param height The height of the image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3180 * @param pitch The pitch of the image (i.e. the number of bytes |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3181 * between 2 successive lines of the image in the memory buffer). |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3182 * @param buffer The memory buffer containing the uncompressed image. |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3183 * @param quality The quality of the JPEG encoding, between 1 (worst |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3184 * quality, best compression) and 100 (best quality, worst |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3185 * compression). |
1601
6cccf1da35c6
groups in the plugin documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1600
diff
changeset
|
3186 * @ingroup REST |
1600
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3187 **/ |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3188 ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerJpegImage( |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3189 OrthancPluginContext* context, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3190 OrthancPluginRestOutput* output, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3191 OrthancPluginPixelFormat format, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3192 uint32_t width, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3193 uint32_t height, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3194 uint32_t pitch, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3195 const void* buffer, |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3196 uint8_t quality) |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3197 { |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3198 _OrthancPluginCompressAndAnswerImage params; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3199 params.output = output; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3200 params.imageFormat = OrthancPluginImageFormat_Jpeg; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3201 params.pixelFormat = format; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3202 params.width = width; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3203 params.height = height; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3204 params.pitch = pitch; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3205 params.buffer = buffer; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3206 params.quality = quality; |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3207 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, ¶ms); |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3208 } |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3209 |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3210 |
7151d63e6d81
documentation, primitives for jpeg
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1599
diff
changeset
|
3211 |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3212 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3213 typedef struct |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3214 { |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3215 OrthancPluginMemoryBuffer* target; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3216 OrthancPluginHttpMethod method; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3217 const char* url; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3218 const char* username; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3219 const char* password; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3220 const char* body; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3221 uint32_t bodySize; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3222 } _OrthancPluginCallHttpClient; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3223 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3224 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3225 /** |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3226 * @brief Issue a HTTP GET call. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3227 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3228 * Make a HTTP GET call to the given URL. The result to the query is |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3229 * stored into a newly allocated memory buffer. Favor |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3230 * OrthancPluginRestApiGet() if calling the built-in REST API of the |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3231 * Orthanc instance that hosts this plugin. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3232 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3233 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3234 * @param target The target memory buffer. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3235 * @param url The URL of interest. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3236 * @param username The username (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3237 * @param password The password (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3238 * @return 0 if success, or the error code if failure. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3239 **/ |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3240 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpGet( |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3241 OrthancPluginContext* context, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3242 OrthancPluginMemoryBuffer* target, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3243 const char* url, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3244 const char* username, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3245 const char* password) |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3246 { |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3247 _OrthancPluginCallHttpClient params; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3248 memset(¶ms, 0, sizeof(params)); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3249 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3250 params.target = target; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3251 params.method = OrthancPluginHttpMethod_Get; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3252 params.url = url; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3253 params.username = username; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3254 params.password = password; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3255 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3256 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3257 } |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3258 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3259 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3260 /** |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3261 * @brief Issue a HTTP POST call. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3262 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3263 * Make a HTTP POST call to the given URL. The result to the query |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3264 * is stored into a newly allocated memory buffer. Favor |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3265 * OrthancPluginRestApiPost() if calling the built-in REST API of |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3266 * the Orthanc instance that hosts this plugin. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3267 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3268 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3269 * @param target The target memory buffer. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3270 * @param url The URL of interest. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3271 * @param body The content of the body of the request. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3272 * @param bodySize The size of the body of the request. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3273 * @param username The username (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3274 * @param password The password (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3275 * @return 0 if success, or the error code if failure. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3276 **/ |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3277 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPost( |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3278 OrthancPluginContext* context, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3279 OrthancPluginMemoryBuffer* target, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3280 const char* url, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3281 const char* body, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3282 uint32_t bodySize, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3283 const char* username, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3284 const char* password) |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3285 { |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3286 _OrthancPluginCallHttpClient params; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3287 memset(¶ms, 0, sizeof(params)); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3288 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3289 params.target = target; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3290 params.method = OrthancPluginHttpMethod_Post; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3291 params.url = url; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3292 params.body = body; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3293 params.bodySize = bodySize; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3294 params.username = username; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3295 params.password = password; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3296 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3297 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3298 } |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3299 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3300 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3301 /** |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3302 * @brief Issue a HTTP PUT call. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3303 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3304 * Make a HTTP PUT call to the given URL. The result to the query is |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3305 * stored into a newly allocated memory buffer. Favor |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3306 * OrthancPluginRestApiPut() if calling the built-in REST API of the |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3307 * Orthanc instance that hosts this plugin. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3308 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3309 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3310 * @param target The target memory buffer. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3311 * @param url The URL of interest. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3312 * @param body The content of the body of the request. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3313 * @param bodySize The size of the body of the request. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3314 * @param username The username (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3315 * @param password The password (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3316 * @return 0 if success, or the error code if failure. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3317 **/ |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3318 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPut( |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3319 OrthancPluginContext* context, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3320 OrthancPluginMemoryBuffer* target, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3321 const char* url, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3322 const char* body, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3323 uint32_t bodySize, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3324 const char* username, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3325 const char* password) |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3326 { |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3327 _OrthancPluginCallHttpClient params; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3328 memset(¶ms, 0, sizeof(params)); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3329 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3330 params.target = target; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3331 params.method = OrthancPluginHttpMethod_Put; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3332 params.url = url; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3333 params.body = body; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3334 params.bodySize = bodySize; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3335 params.username = username; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3336 params.password = password; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3337 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3338 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3339 } |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3340 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3341 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3342 /** |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3343 * @brief Issue a HTTP DELETE call. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3344 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3345 * Make a HTTP DELETE call to the given URL. Favor |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3346 * OrthancPluginRestApiDelete() if calling the built-in REST API of |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3347 * the Orthanc instance that hosts this plugin. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3348 * |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3349 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3350 * @param url The URL of interest. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3351 * @param username The username (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3352 * @param password The password (can be <tt>NULL</tt> if no password protection). |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3353 * @return 0 if success, or the error code if failure. |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3354 **/ |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3355 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpDelete( |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3356 OrthancPluginContext* context, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3357 const char* url, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3358 const char* username, |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3359 const char* password) |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3360 { |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3361 _OrthancPluginCallHttpClient params; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3362 memset(¶ms, 0, sizeof(params)); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3363 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3364 params.method = OrthancPluginHttpMethod_Delete; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3365 params.url = url; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3366 params.username = username; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3367 params.password = password; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3368 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3369 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms); |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3370 } |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3371 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3372 |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1605
diff
changeset
|
3373 |
1608
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3374 typedef struct |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3375 { |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3376 OrthancPluginImage** target; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3377 const OrthancPluginImage* source; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3378 OrthancPluginPixelFormat targetFormat; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3379 } _OrthancPluginConvertPixelFormat; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3380 |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3381 |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3382 /** |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3383 * @brief Change the pixel format of an image. |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3384 * |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3385 * This function creates a new image, changing the memory layout of the pixels. |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3386 * |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3387 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3388 * @param source The source image. |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3389 * @param targetFormat The target pixel format. |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3390 * @return The resulting image. It must be freed with OrthancPluginFreeImage(). |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3391 * @ingroup Images |
1608
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3392 **/ |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3393 ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginConvertPixelFormat( |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3394 OrthancPluginContext* context, |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3395 const OrthancPluginImage* source, |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3396 OrthancPluginPixelFormat targetFormat) |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3397 { |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3398 OrthancPluginImage* target = NULL; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3399 |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3400 _OrthancPluginConvertPixelFormat params; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3401 params.target = ⌖ |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3402 params.source = source; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3403 params.targetFormat = targetFormat; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3404 |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3405 if (context->InvokeService(context, _OrthancPluginService_ConvertPixelFormat, ¶ms) != OrthancPluginErrorCode_Success) |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3406 { |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3407 return NULL; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3408 } |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3409 else |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3410 { |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3411 return target; |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3412 } |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3413 } |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3414 |
adc6a5704cdb
OrthancPluginConvertPixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
3415 |
1613
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3416 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3417 /** |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3418 * @brief Return the number of available fonts. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3419 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3420 * This function returns the number of fonts that are built in the |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3421 * Orthanc core. These fonts can be used to draw texts on images |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3422 * through OrthancPluginDrawText(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3423 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3424 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3425 * @return The number of fonts. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3426 * @ingroup Images |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3427 **/ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3428 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontsCount( |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3429 OrthancPluginContext* context) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3430 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3431 uint32_t count = 0; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3432 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3433 _OrthancPluginReturnSingleValue params; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3434 memset(¶ms, 0, sizeof(params)); |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3435 params.resultUint32 = &count; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3436 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3437 if (context->InvokeService(context, _OrthancPluginService_GetFontsCount, ¶ms) != OrthancPluginErrorCode_Success) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3438 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3439 /* Error */ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3440 return 0; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3441 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3442 else |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3443 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3444 return count; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3445 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3446 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3447 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3448 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3449 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3450 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3451 typedef struct |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3452 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3453 uint32_t fontIndex; /* in */ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3454 const char** name; /* out */ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3455 uint32_t* size; /* out */ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3456 } _OrthancPluginGetFontInfo; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3457 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3458 /** |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3459 * @brief Return the name of a font. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3460 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3461 * This function returns the name of a font that is built in the Orthanc core. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3462 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3463 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3464 * @param fontIndex The index of the font. This value must be less than OrthancPluginGetFontsCount(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3465 * @return The font name. This is a statically-allocated string, do not free it. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3466 * @ingroup Images |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3467 **/ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3468 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetFontName( |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3469 OrthancPluginContext* context, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3470 uint32_t fontIndex) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3471 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3472 const char* result = NULL; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3473 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3474 _OrthancPluginGetFontInfo params; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3475 memset(¶ms, 0, sizeof(params)); |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3476 params.name = &result; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3477 params.fontIndex = fontIndex; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3478 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3479 if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, ¶ms) != OrthancPluginErrorCode_Success) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3480 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3481 return NULL; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3482 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3483 else |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3484 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3485 return result; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3486 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3487 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3488 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3489 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3490 /** |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3491 * @brief Return the size of a font. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3492 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3493 * This function returns the size of a font that is built in the Orthanc core. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3494 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3495 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3496 * @param fontIndex The index of the font. This value must be less than OrthancPluginGetFontsCount(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3497 * @return The font size. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3498 * @ingroup Images |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3499 **/ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3500 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontSize( |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3501 OrthancPluginContext* context, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3502 uint32_t fontIndex) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3503 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3504 uint32_t result; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3505 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3506 _OrthancPluginGetFontInfo params; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3507 memset(¶ms, 0, sizeof(params)); |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3508 params.size = &result; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3509 params.fontIndex = fontIndex; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3510 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3511 if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, ¶ms) != OrthancPluginErrorCode_Success) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3512 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3513 return 0; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3514 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3515 else |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3516 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3517 return result; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3518 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3519 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3520 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3521 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3522 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3523 typedef struct |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3524 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3525 OrthancPluginImage* image; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3526 uint32_t fontIndex; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3527 const char* utf8Text; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3528 int32_t x; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3529 int32_t y; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3530 uint8_t r; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3531 uint8_t g; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3532 uint8_t b; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3533 } _OrthancPluginDrawText; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3534 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3535 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3536 /** |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3537 * @brief Draw text on an image. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3538 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3539 * This function draws some text on some image. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3540 * |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3541 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3542 * @param image The image upon which to draw the text. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3543 * @param fontIndex The index of the font. This value must be less than OrthancPluginGetFontsCount(). |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3544 * @param utf8Text The text to be drawn, encoded as an UTF-8 zero-terminated string. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3545 * @param x The X position of the text over the image. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3546 * @param y The Y position of the text over the image. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3547 * @param r The value of the red color channel of the text. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3548 * @param g The value of the green color channel of the text. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3549 * @param b The value of the blue color channel of the text. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3550 * @return 0 if success, other value if error. |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3551 * @ingroup Images |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3552 **/ |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3553 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginDrawText( |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3554 OrthancPluginContext* context, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3555 OrthancPluginImage* image, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3556 uint32_t fontIndex, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3557 const char* utf8Text, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3558 int32_t x, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3559 int32_t y, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3560 uint8_t r, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3561 uint8_t g, |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3562 uint8_t b) |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3563 { |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3564 _OrthancPluginDrawText params; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3565 memset(¶ms, 0, sizeof(params)); |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3566 params.image = image; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3567 params.fontIndex = fontIndex; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3568 params.utf8Text = utf8Text; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3569 params.x = x; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3570 params.y = y; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3571 params.r = r; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3572 params.g = g; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3573 params.b = b; |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3574 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3575 return context->InvokeService(context, _OrthancPluginService_DrawText, ¶ms); |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3576 } |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3577 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3578 |
1ec254a7c645
drawing texts on image from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
3579 |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3580 typedef struct |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3581 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3582 OrthancPluginStorageArea* storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3583 const char* uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3584 const void* content; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3585 uint64_t size; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3586 OrthancPluginContentType type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3587 } _OrthancPluginStorageAreaCreate; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3588 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3589 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3590 /** |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3591 * @brief Create a file inside the storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3592 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3593 * This function creates a new file inside the storage area that is |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3594 * currently used by Orthanc. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3595 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3596 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3597 * @param storageArea The storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3598 * @param uuid The identifier of the file to be created. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3599 * @param content The content to store in the newly created file. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3600 * @param size The size of the content. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3601 * @param type The type of the file content. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3602 * @return 0 if success, other value if error. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3603 * @ingroup Callbacks |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3604 **/ |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3605 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaCreate( |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3606 OrthancPluginContext* context, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3607 OrthancPluginStorageArea* storageArea, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3608 const char* uuid, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3609 const void* content, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3610 uint64_t size, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3611 OrthancPluginContentType type) |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3612 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3613 _OrthancPluginStorageAreaCreate params; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3614 params.storageArea = storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3615 params.uuid = uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3616 params.content = content; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3617 params.size = size; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3618 params.type = type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3619 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3620 return context->InvokeService(context, _OrthancPluginService_StorageAreaCreate, ¶ms); |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3621 } |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3622 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3623 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3624 typedef struct |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3625 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3626 OrthancPluginMemoryBuffer* target; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3627 OrthancPluginStorageArea* storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3628 const char* uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3629 OrthancPluginContentType type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3630 } _OrthancPluginStorageAreaRead; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3631 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3632 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3633 /** |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3634 * @brief Read a file from the storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3635 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3636 * This function reads the content of a given file from the storage |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3637 * area that is currently used by Orthanc. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3638 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3639 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3640 * @param target The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3641 * @param storageArea The storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3642 * @param uuid The identifier of the file to be read. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3643 * @param type The type of the file content. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3644 * @return 0 if success, other value if error. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3645 * @ingroup Callbacks |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3646 **/ |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3647 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRead( |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3648 OrthancPluginContext* context, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3649 OrthancPluginMemoryBuffer* target, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3650 OrthancPluginStorageArea* storageArea, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3651 const char* uuid, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3652 OrthancPluginContentType type) |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3653 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3654 _OrthancPluginStorageAreaRead params; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3655 params.target = target; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3656 params.storageArea = storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3657 params.uuid = uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3658 params.type = type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3659 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3660 return context->InvokeService(context, _OrthancPluginService_StorageAreaRead, ¶ms); |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3661 } |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3662 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3663 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3664 typedef struct |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3665 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3666 OrthancPluginStorageArea* storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3667 const char* uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3668 OrthancPluginContentType type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3669 } _OrthancPluginStorageAreaRemove; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3670 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3671 /** |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3672 * @brief Remove a file from the storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3673 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3674 * This function removes a given file from the storage area that is |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3675 * currently used by Orthanc. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3676 * |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3677 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3678 * @param storageArea The storage area. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3679 * @param uuid The identifier of the file to be removed. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3680 * @param type The type of the file content. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3681 * @return 0 if success, other value if error. |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3682 * @ingroup Callbacks |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3683 **/ |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3684 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRemove( |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3685 OrthancPluginContext* context, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3686 OrthancPluginStorageArea* storageArea, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3687 const char* uuid, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3688 OrthancPluginContentType type) |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3689 { |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3690 _OrthancPluginStorageAreaRemove params; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3691 params.storageArea = storageArea; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3692 params.uuid = uuid; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3693 params.type = type; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3694 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3695 return context->InvokeService(context, _OrthancPluginService_StorageAreaRemove, ¶ms); |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3696 } |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3697 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3698 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1613
diff
changeset
|
3699 |
1649
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3700 typedef struct |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3701 { |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3702 OrthancPluginErrorCode* target; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3703 int32_t code; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3704 uint16_t httpStatus; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3705 const char* message; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3706 } _OrthancPluginRegisterErrorCode; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3707 |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3708 /** |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3709 * @brief Declare a custom error code for this plugin. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3710 * |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3711 * This function declares a custom error code that can be generated |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3712 * by this plugin. This declaration is used to enrich the body of |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3713 * the HTTP answer in the case of an error, and to set the proper |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3714 * HTTP status code. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3715 * |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3716 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3717 * @param code The error code that is internal to this plugin. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3718 * @param httpStatus The HTTP status corresponding to this error. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3719 * @param message The description of the error. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3720 * @return The error code that has been assigned inside the Orthanc core. |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3721 * @ingroup Toolbox |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3722 **/ |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3723 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterErrorCode( |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3724 OrthancPluginContext* context, |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3725 int32_t code, |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3726 uint16_t httpStatus, |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3727 const char* message) |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3728 { |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3729 OrthancPluginErrorCode target; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3730 |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3731 _OrthancPluginRegisterErrorCode params; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3732 params.target = ⌖ |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3733 params.code = code; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3734 params.httpStatus = httpStatus; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3735 params.message = message; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3736 |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3737 if (context->InvokeService(context, _OrthancPluginService_RegisterErrorCode, ¶ms) == OrthancPluginErrorCode_Success) |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3738 { |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3739 return target; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3740 } |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3741 else |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3742 { |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3743 /* There was an error while assigned the error. Use a generic code. */ |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3744 return OrthancPluginErrorCode_Plugin; |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3745 } |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3746 } |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3747 |
8040d56cb0b3
New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1643
diff
changeset
|
3748 |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3749 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3750 typedef struct |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3751 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3752 uint16_t group; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3753 uint16_t element; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3754 OrthancPluginValueRepresentation vr; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3755 const char* name; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3756 uint32_t minMultiplicity; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3757 uint32_t maxMultiplicity; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3758 } _OrthancPluginRegisterDictionaryTag; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3759 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3760 /** |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3761 * @brief Register a new tag into the DICOM dictionary. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3762 * |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3763 * This function declares a new tag in the dictionary of DICOM tags |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3764 * that is known to Orthanc. This function should be used in the |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3765 * OrthancPluginInitialize() callback. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3766 * |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3767 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3768 * @param group The group of the tag. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3769 * @param element The element of the tag. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3770 * @param vr The value representation of the tag. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3771 * @param name The nickname of the tag. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3772 * @param minMultiplicity The minimum multiplicity of the tag (must be above 0). |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3773 * @param maxMultiplicity The maximum multiplicity of the tag. A value of 0 means |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3774 * an arbitrary multiplicity ("<tt>n</tt>"). |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3775 * @return 0 if success, other value if error. |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3776 * @ingroup Toolbox |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3777 **/ |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3778 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterDictionaryTag( |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3779 OrthancPluginContext* context, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3780 uint16_t group, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3781 uint16_t element, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3782 OrthancPluginValueRepresentation vr, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3783 const char* name, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3784 uint32_t minMultiplicity, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3785 uint32_t maxMultiplicity) |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3786 { |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3787 _OrthancPluginRegisterDictionaryTag params; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3788 params.group = group; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3789 params.element = element; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3790 params.vr = vr; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3791 params.name = name; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3792 params.minMultiplicity = minMultiplicity; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3793 params.maxMultiplicity = maxMultiplicity; |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3794 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3795 return context->InvokeService(context, _OrthancPluginService_RegisterDictionaryTag, ¶ms); |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3796 } |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3797 |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1649
diff
changeset
|
3798 |
1669
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3799 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3800 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3801 typedef struct |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3802 { |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3803 OrthancPluginStorageArea* storageArea; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3804 OrthancPluginResourceType level; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3805 } _OrthancPluginReconstructMainDicomTags; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3806 |
1673
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3807 /** |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3808 * @brief Reconstruct the main DICOM tags. |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3809 * |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3810 * This function requests the Orthanc core to reconstruct the main |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3811 * DICOM tags of all the resources of the given type. This function |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3812 * can only be used as a part of the upgrade of a custom database |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3813 * back-end |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3814 * (cf. OrthancPlugins::IDatabaseBackend::UpgradeDatabase). A |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3815 * database transaction will be automatically setup. |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3816 * |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3817 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3818 * @param storageArea The storage area. |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3819 * @param level The type of the resources of interest. |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3820 * @return 0 if success, other value if error. |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3821 * @ingroup Callbacks |
0bbcfd9695e5
UpgradeDatabase in the sample plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1669
diff
changeset
|
3822 **/ |
1669
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3823 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags( |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3824 OrthancPluginContext* context, |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3825 OrthancPluginStorageArea* storageArea, |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3826 OrthancPluginResourceType level) |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3827 { |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3828 _OrthancPluginReconstructMainDicomTags params; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3829 params.level = level; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3830 params.storageArea = storageArea; |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3831 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3832 return context->InvokeService(context, _OrthancPluginService_ReconstructMainDicomTags, ¶ms); |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3833 } |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3834 |
a412ad57f0f9
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1657
diff
changeset
|
3835 |
1740
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3836 typedef struct |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3837 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3838 char** result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3839 const char* instanceId; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3840 const char* buffer; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3841 uint32_t size; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3842 OrthancPluginDicomToJsonFormat format; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3843 OrthancPluginDicomToJsonFlags flags; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3844 uint32_t maxStringLength; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3845 } _OrthancPluginDicomToJson; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3846 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3847 ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomBufferToJson( |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3848 OrthancPluginContext* context, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3849 const char* buffer, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3850 uint32_t size, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3851 OrthancPluginDicomToJsonFormat format, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3852 OrthancPluginDicomToJsonFlags flags, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3853 uint32_t maxStringLength) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3854 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3855 char* result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3856 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3857 _OrthancPluginDicomToJson params; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3858 memset(¶ms, 0, sizeof(params)); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3859 params.result = &result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3860 params.buffer = buffer; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3861 params.size = size; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3862 params.format = format; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3863 params.flags = flags; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3864 params.maxStringLength = maxStringLength; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3865 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3866 if (context->InvokeService(context, _OrthancPluginService_DicomBufferToJson, ¶ms) != OrthancPluginErrorCode_Success) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3867 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3868 /* Error */ |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3869 return NULL; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3870 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3871 else |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3872 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3873 return result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3874 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3875 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3876 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3877 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3878 ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomInstanceToJson( |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3879 OrthancPluginContext* context, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3880 const char* instanceId, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3881 OrthancPluginDicomToJsonFormat format, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3882 OrthancPluginDicomToJsonFlags flags, |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3883 uint32_t maxStringLength) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3884 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3885 char* result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3886 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3887 _OrthancPluginDicomToJson params; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3888 memset(¶ms, 0, sizeof(params)); |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3889 params.result = &result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3890 params.instanceId = instanceId; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3891 params.format = format; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3892 params.flags = flags; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3893 params.maxStringLength = maxStringLength; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3894 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3895 if (context->InvokeService(context, _OrthancPluginService_DicomBufferToJson, ¶ms) != OrthancPluginErrorCode_Success) |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3896 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3897 /* Error */ |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3898 return NULL; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3899 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3900 else |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3901 { |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3902 return result; |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3903 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3904 } |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3905 |
5e99a70b0635
DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1703
diff
changeset
|
3906 |
886 | 3907 #ifdef __cplusplus |
3908 } | |
3909 #endif | |
900 | 3910 |
3911 | |
3912 /** @} */ | |
3913 |