Orthanc Plugin SDK: OrthancCPlugin.h Source File

| Orthanc Plugin SDK 1.11.1 Documentation of the plugin interface of Orthanc

OrthancCPlugin.h
1
52
53
54
74
75
76
81
82
83
104
105
106
107#pragma once
108
109
110#include <stdio.h>
111#include <string.h>
112
113#ifdef WIN32
114# define ORTHANC_PLUGINS_API __declspec(dllexport)
115#elif __GNUC__ >= 4
116# define ORTHANC_PLUGINS_API __attribute__ ((visibility ("default")))
117#else
118# define ORTHANC_PLUGINS_API
119#endif
120
121#define ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER 1
122#define ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER 11
123#define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 1
124
125
126#if !defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
127#define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \
128 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major || \
129 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major && \
130 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor || \
131 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor && \
132 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision))))
133#endif
134
135
136
137/********************************************************************
138 ** Check that function inlining is properly supported. The use of
139 ** inlining is required, to avoid the duplication of object code
140 ** between two compilation modules that would use the Orthanc Plugin
141 ** API.
142 ********************************************************************/
143
144/* If the auto-detection of the "inline" keyword below does not work
145 automatically and that your compiler is known to properly support
146 inlining, uncomment the following #define and adapt the definition
147 of "static inline". */
148
149/* #define ORTHANC_PLUGIN_INLINE static inline */
150
151#ifndef ORTHANC_PLUGIN_INLINE
152# if __STDC_VERSION__ >= 199901L
153/* This is C99 or above: http://predef.sourceforge.net/prestd.html */
154# define ORTHANC_PLUGIN_INLINE static inline
155# elif defined(__cplusplus)
156/* This is C++ */
157# define ORTHANC_PLUGIN_INLINE static inline
158# elif defined(__GNUC__)
159/* This is GCC running in C89 mode */
160# define ORTHANC_PLUGIN_INLINE static __inline
161# elif defined(_MSC_VER)
162/* This is Visual Studio running in C89 mode */
163# define ORTHANC_PLUGIN_INLINE static __inline
164# else
165# error Your compiler is not known to support the "inline" keyword
166# endif
167#endif
168
169
170
171/********************************************************************
172 ** Inclusion of standard libraries.
173 ********************************************************************/
174
180#include <stdint.h>
181
182#include <stdlib.h>
183
184
185
186/********************************************************************
187 ** Definition of the Orthanc Plugin API.
188 ********************************************************************/
189
191
192#ifdef __cplusplus
193extern "C"
194{
195#endif
196
200 typedef enum
201 {
202 OrthancPluginErrorCode_InternalError = -1 ,
203 OrthancPluginErrorCode_Success = 0 ,
204 OrthancPluginErrorCode_Plugin = 1 ,
205 OrthancPluginErrorCode_NotImplemented = 2 ,
206 OrthancPluginErrorCode_ParameterOutOfRange = 3 ,
207 OrthancPluginErrorCode_NotEnoughMemory = 4 ,
208 OrthancPluginErrorCode_BadParameterType = 5 ,
209 OrthancPluginErrorCode_BadSequenceOfCalls = 6 ,
210 OrthancPluginErrorCode_InexistentItem = 7 ,
211 OrthancPluginErrorCode_BadRequest = 8 ,
212 OrthancPluginErrorCode_NetworkProtocol = 9 ,
213 OrthancPluginErrorCode_SystemCommand = 10 ,
214 OrthancPluginErrorCode_Database = 11 ,
215 OrthancPluginErrorCode_UriSyntax = 12 ,
216 OrthancPluginErrorCode_InexistentFile = 13 ,
217 OrthancPluginErrorCode_CannotWriteFile = 14 ,
218 OrthancPluginErrorCode_BadFileFormat = 15 ,
219 OrthancPluginErrorCode_Timeout = 16 ,
220 OrthancPluginErrorCode_UnknownResource = 17 ,
221 OrthancPluginErrorCode_IncompatibleDatabaseVersion = 18 ,
222 OrthancPluginErrorCode_FullStorage = 19 ,
223 OrthancPluginErrorCode_CorruptedFile = 20 ,
224 OrthancPluginErrorCode_InexistentTag = 21 ,
225 OrthancPluginErrorCode_ReadOnly = 22 ,
226 OrthancPluginErrorCode_IncompatibleImageFormat = 23 ,
227 OrthancPluginErrorCode_IncompatibleImageSize = 24 ,
228 OrthancPluginErrorCode_SharedLibrary = 25 ,
229 OrthancPluginErrorCode_UnknownPluginService = 26 ,
230 OrthancPluginErrorCode_UnknownDicomTag = 27 ,
231 OrthancPluginErrorCode_BadJson = 28 ,
232 OrthancPluginErrorCode_Unauthorized = 29 ,
233 OrthancPluginErrorCode_BadFont = 30 ,
234 OrthancPluginErrorCode_DatabasePlugin = 31 ,
235 OrthancPluginErrorCode_StorageAreaPlugin = 32 ,
236 OrthancPluginErrorCode_EmptyRequest = 33 ,
237 OrthancPluginErrorCode_NotAcceptable = 34 ,
238 OrthancPluginErrorCode_NullPointer = 35 ,
239 OrthancPluginErrorCode_DatabaseUnavailable = 36 ,
240 OrthancPluginErrorCode_CanceledJob = 37 ,
241 OrthancPluginErrorCode_BadGeometry = 38 ,
242 OrthancPluginErrorCode_SslInitialization = 39 ,
243 OrthancPluginErrorCode_DiscontinuedAbi = 40 ,
244 OrthancPluginErrorCode_BadRange = 41 ,
245 OrthancPluginErrorCode_DatabaseCannotSerialize = 42 ,
246 OrthancPluginErrorCode_Revision = 43 ,
247 OrthancPluginErrorCode_MainDicomTagsMultiplyDefined = 44 ,
248 OrthancPluginErrorCode_SQLiteNotOpened = 1000 ,
249 OrthancPluginErrorCode_SQLiteAlreadyOpened = 1001 ,
250 OrthancPluginErrorCode_SQLiteCannotOpen = 1002 ,
251 OrthancPluginErrorCode_SQLiteStatementAlreadyUsed = 1003 ,
252 OrthancPluginErrorCode_SQLiteExecute = 1004 ,
253 OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction = 1005 ,
254 OrthancPluginErrorCode_SQLiteCommitWithoutTransaction = 1006 ,
255 OrthancPluginErrorCode_SQLiteRegisterFunction = 1007 ,
256 OrthancPluginErrorCode_SQLiteFlush = 1008 ,
257 OrthancPluginErrorCode_SQLiteCannotRun = 1009 ,
258 OrthancPluginErrorCode_SQLiteCannotStep = 1010 ,
259 OrthancPluginErrorCode_SQLiteBindOutOfRange = 1011 ,
260 OrthancPluginErrorCode_SQLitePrepareStatement = 1012 ,
261 OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted = 1013 ,
262 OrthancPluginErrorCode_SQLiteTransactionCommit = 1014 ,
263 OrthancPluginErrorCode_SQLiteTransactionBegin = 1015 ,
264 OrthancPluginErrorCode_DirectoryOverFile = 2000 ,
265 OrthancPluginErrorCode_FileStorageCannotWrite = 2001 ,
266 OrthancPluginErrorCode_DirectoryExpected = 2002 ,
267 OrthancPluginErrorCode_HttpPortInUse = 2003 ,
268 OrthancPluginErrorCode_DicomPortInUse = 2004 ,
269 OrthancPluginErrorCode_BadHttpStatusInRest = 2005 ,
270 OrthancPluginErrorCode_RegularFileExpected = 2006 ,
271 OrthancPluginErrorCode_PathToExecutable = 2007 ,
272 OrthancPluginErrorCode_MakeDirectory = 2008 ,
273 OrthancPluginErrorCode_BadApplicationEntityTitle = 2009 ,
274 OrthancPluginErrorCode_NoCFindHandler = 2010 ,
275 OrthancPluginErrorCode_NoCMoveHandler = 2011 ,
276 OrthancPluginErrorCode_NoCStoreHandler = 2012 ,
277 OrthancPluginErrorCode_NoApplicationEntityFilter = 2013 ,
278 OrthancPluginErrorCode_NoSopClassOrInstance = 2014 ,
279 OrthancPluginErrorCode_NoPresentationContext = 2015 ,
280 OrthancPluginErrorCode_DicomFindUnavailable = 2016 ,
281 OrthancPluginErrorCode_DicomMoveUnavailable = 2017 ,
282 OrthancPluginErrorCode_CannotStoreInstance = 2018 ,
283 OrthancPluginErrorCode_CreateDicomNotString = 2019 ,
284 OrthancPluginErrorCode_CreateDicomOverrideTag = 2020 ,
285 OrthancPluginErrorCode_CreateDicomUseContent = 2021 ,
286 OrthancPluginErrorCode_CreateDicomNoPayload = 2022 ,
287 OrthancPluginErrorCode_CreateDicomUseDataUriScheme = 2023 ,
288 OrthancPluginErrorCode_CreateDicomBadParent = 2024 ,
289 OrthancPluginErrorCode_CreateDicomParentIsInstance = 2025 ,
290 OrthancPluginErrorCode_CreateDicomParentEncoding = 2026 ,
291 OrthancPluginErrorCode_UnknownModality = 2027 ,
292 OrthancPluginErrorCode_BadJobOrdering = 2028 ,
293 OrthancPluginErrorCode_JsonToLuaTable = 2029 ,
294 OrthancPluginErrorCode_CannotCreateLua = 2030 ,
295 OrthancPluginErrorCode_CannotExecuteLua = 2031 ,
296 OrthancPluginErrorCode_LuaAlreadyExecuted = 2032 ,
297 OrthancPluginErrorCode_LuaBadOutput = 2033 ,
298 OrthancPluginErrorCode_NotLuaPredicate = 2034 ,
299 OrthancPluginErrorCode_LuaReturnsNoString = 2035 ,
300 OrthancPluginErrorCode_StorageAreaAlreadyRegistered = 2036 ,
301 OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered = 2037 ,
302 OrthancPluginErrorCode_DatabaseNotInitialized = 2038 ,
303 OrthancPluginErrorCode_SslDisabled = 2039 ,
304 OrthancPluginErrorCode_CannotOrderSlices = 2040 ,
305 OrthancPluginErrorCode_NoWorklistHandler = 2041 ,
306 OrthancPluginErrorCode_AlreadyExistingTag = 2042 ,
307 OrthancPluginErrorCode_NoStorageCommitmentHandler = 2043 ,
308 OrthancPluginErrorCode_NoCGetHandler = 2044 ,
309 OrthancPluginErrorCode_UnsupportedMediaType = 3000 ,
310
311 _OrthancPluginErrorCode_INTERNAL = 0x7fffffff
312 } OrthancPluginErrorCode;
313
314
319 ORTHANC_PLUGINS_API const char* OrthancPluginGetName();
320
321
325 typedef enum
326 {
327 OrthancPluginHttpMethod_Get = 1,
328 OrthancPluginHttpMethod_Post = 2,
329 OrthancPluginHttpMethod_Put = 3,
330 OrthancPluginHttpMethod_Delete = 4,
331
332 _OrthancPluginHttpMethod_INTERNAL = 0x7fffffff
333 } OrthancPluginHttpMethod;
334
335
340 typedef struct
341 {
345 OrthancPluginHttpMethod method;
346
350 uint32_t groupsCount;
351
355 const char* const* groups;
356
360 uint32_t getCount;
361
365 const char* const* getKeys;
366
370 const char* const* getValues;
371
375 const void* body;
376
380 uint32_t bodySize;
381
382
383 /* --------------------------------------------------
384 New in version 0.8.1
385 -------------------------------------------------- */
386
390 uint32_t headersCount;
391
395 const char* const* headersKeys;
396
400 const char* const* headersValues;
401
402 } OrthancPluginHttpRequest;
403
404
405 typedef enum
406 {
407 /* Generic services */
408 _OrthancPluginService_LogInfo = 1,
409 _OrthancPluginService_LogWarning = 2,
410 _OrthancPluginService_LogError = 3,
411 _OrthancPluginService_GetOrthancPath = 4,
412 _OrthancPluginService_GetOrthancDirectory = 5,
413 _OrthancPluginService_GetConfigurationPath = 6,
414 _OrthancPluginService_SetPluginProperty = 7,
415 _OrthancPluginService_GetGlobalProperty = 8,
416 _OrthancPluginService_SetGlobalProperty = 9,
417 _OrthancPluginService_GetCommandLineArgumentsCount = 10,
418 _OrthancPluginService_GetCommandLineArgument = 11,
419 _OrthancPluginService_GetExpectedDatabaseVersion = 12,
420 _OrthancPluginService_GetConfiguration = 13,
421 _OrthancPluginService_BufferCompression = 14,
422 _OrthancPluginService_ReadFile = 15,
423 _OrthancPluginService_WriteFile = 16,
424 _OrthancPluginService_GetErrorDescription = 17,
425 _OrthancPluginService_CallHttpClient = 18,
426 _OrthancPluginService_RegisterErrorCode = 19,
427 _OrthancPluginService_RegisterDictionaryTag = 20,
428 _OrthancPluginService_DicomBufferToJson = 21,
429 _OrthancPluginService_DicomInstanceToJson = 22,
430 _OrthancPluginService_CreateDicom = 23,
431 _OrthancPluginService_ComputeMd5 = 24,
432 _OrthancPluginService_ComputeSha1 = 25,
433 _OrthancPluginService_LookupDictionary = 26,
434 _OrthancPluginService_CallHttpClient2 = 27,
435 _OrthancPluginService_GenerateUuid = 28,
436 _OrthancPluginService_RegisterPrivateDictionaryTag = 29,
437 _OrthancPluginService_AutodetectMimeType = 30,
438 _OrthancPluginService_SetMetricsValue = 31,
439 _OrthancPluginService_EncodeDicomWebJson = 32,
440 _OrthancPluginService_EncodeDicomWebXml = 33,
441 _OrthancPluginService_ChunkedHttpClient = 34, /* New in Orthanc 1.5.7 */
442 _OrthancPluginService_GetTagName = 35, /* New in Orthanc 1.5.7 */
443 _OrthancPluginService_EncodeDicomWebJson2 = 36, /* New in Orthanc 1.7.0 */
444 _OrthancPluginService_EncodeDicomWebXml2 = 37, /* New in Orthanc 1.7.0 */
445 _OrthancPluginService_CreateMemoryBuffer = 38, /* New in Orthanc 1.7.0 */
446 _OrthancPluginService_GenerateRestApiAuthorizationToken = 39, /* New in Orthanc 1.8.1 */
447 _OrthancPluginService_CreateMemoryBuffer64 = 40, /* New in Orthanc 1.9.0 */
448 _OrthancPluginService_CreateDicom2 = 41, /* New in Orthanc 1.9.0 */
449 _OrthancPluginService_GetDatabaseServerIdentifier = 42, /* New in Orthanc 1.11.1 */
450
451 /* Registration of callbacks */
452 _OrthancPluginService_RegisterRestCallback = 1000,
453 _OrthancPluginService_RegisterOnStoredInstanceCallback = 1001,
454 _OrthancPluginService_RegisterStorageArea = 1002,
455 _OrthancPluginService_RegisterOnChangeCallback = 1003,
456 _OrthancPluginService_RegisterRestCallbackNoLock = 1004,
457 _OrthancPluginService_RegisterWorklistCallback = 1005,
458 _OrthancPluginService_RegisterDecodeImageCallback = 1006,
459 _OrthancPluginService_RegisterIncomingHttpRequestFilter = 1007,
460 _OrthancPluginService_RegisterFindCallback = 1008,
461 _OrthancPluginService_RegisterMoveCallback = 1009,
462 _OrthancPluginService_RegisterIncomingHttpRequestFilter2 = 1010,
463 _OrthancPluginService_RegisterRefreshMetricsCallback = 1011,
464 _OrthancPluginService_RegisterChunkedRestCallback = 1012, /* New in Orthanc 1.5.7 */
465 _OrthancPluginService_RegisterStorageCommitmentScpCallback = 1013,
466 _OrthancPluginService_RegisterIncomingDicomInstanceFilter = 1014,
467 _OrthancPluginService_RegisterTranscoderCallback = 1015, /* New in Orthanc 1.7.0 */
468 _OrthancPluginService_RegisterStorageArea2 = 1016, /* New in Orthanc 1.9.0 */
469 _OrthancPluginService_RegisterIncomingCStoreInstanceFilter = 1017, /* New in Orthanc 1.10.0 */
470 _OrthancPluginService_RegisterReceivedInstanceCallback = 1018, /* New in Orthanc 1.10.0 */
471 _OrthancPluginService_RegisterWebDavCollection = 1019, /* New in Orthanc 1.10.1 */
472
473 /* Sending answers to REST calls */
474 _OrthancPluginService_AnswerBuffer = 2000,
475 _OrthancPluginService_CompressAndAnswerPngImage = 2001, /* Unused as of Orthanc 0.9.4 */
476 _OrthancPluginService_Redirect = 2002,
477 _OrthancPluginService_SendHttpStatusCode = 2003,
478 _OrthancPluginService_SendUnauthorized = 2004,
479 _OrthancPluginService_SendMethodNotAllowed = 2005,
480 _OrthancPluginService_SetCookie = 2006,
481 _OrthancPluginService_SetHttpHeader = 2007,
482 _OrthancPluginService_StartMultipartAnswer = 2008,
483 _OrthancPluginService_SendMultipartItem = 2009,
484 _OrthancPluginService_SendHttpStatus = 2010,
485 _OrthancPluginService_CompressAndAnswerImage = 2011,
486 _OrthancPluginService_SendMultipartItem2 = 2012,
487 _OrthancPluginService_SetHttpErrorDetails = 2013,
488
489 /* Access to the Orthanc database and API */
490 _OrthancPluginService_GetDicomForInstance = 3000,
491 _OrthancPluginService_RestApiGet = 3001,
492 _OrthancPluginService_RestApiPost = 3002,
493 _OrthancPluginService_RestApiDelete = 3003,
494 _OrthancPluginService_RestApiPut = 3004,
495 _OrthancPluginService_LookupPatient = 3005,
496 _OrthancPluginService_LookupStudy = 3006,
497 _OrthancPluginService_LookupSeries = 3007,
498 _OrthancPluginService_LookupInstance = 3008,
499 _OrthancPluginService_LookupStudyWithAccessionNumber = 3009,
500 _OrthancPluginService_RestApiGetAfterPlugins = 3010,
501 _OrthancPluginService_RestApiPostAfterPlugins = 3011,
502 _OrthancPluginService_RestApiDeleteAfterPlugins = 3012,
503 _OrthancPluginService_RestApiPutAfterPlugins = 3013,
504 _OrthancPluginService_ReconstructMainDicomTags = 3014,
505 _OrthancPluginService_RestApiGet2 = 3015,
506 _OrthancPluginService_CallRestApi = 3016, /* New in Orthanc 1.9.2 */
507
508 /* Access to DICOM instances */
509 _OrthancPluginService_GetInstanceRemoteAet = 4000,
510 _OrthancPluginService_GetInstanceSize = 4001,
511 _OrthancPluginService_GetInstanceData = 4002,
512 _OrthancPluginService_GetInstanceJson = 4003,
513 _OrthancPluginService_GetInstanceSimplifiedJson = 4004,
514 _OrthancPluginService_HasInstanceMetadata = 4005,
515 _OrthancPluginService_GetInstanceMetadata = 4006,
516 _OrthancPluginService_GetInstanceOrigin = 4007,
517 _OrthancPluginService_GetInstanceTransferSyntaxUid = 4008,
518 _OrthancPluginService_HasInstancePixelData = 4009,
519 _OrthancPluginService_CreateDicomInstance = 4010, /* New in Orthanc 1.7.0 */
520 _OrthancPluginService_FreeDicomInstance = 4011, /* New in Orthanc 1.7.0 */
521 _OrthancPluginService_GetInstanceFramesCount = 4012, /* New in Orthanc 1.7.0 */
522 _OrthancPluginService_GetInstanceRawFrame = 4013, /* New in Orthanc 1.7.0 */
523 _OrthancPluginService_GetInstanceDecodedFrame = 4014, /* New in Orthanc 1.7.0 */
524 _OrthancPluginService_TranscodeDicomInstance = 4015, /* New in Orthanc 1.7.0 */
525 _OrthancPluginService_SerializeDicomInstance = 4016, /* New in Orthanc 1.7.0 */
526 _OrthancPluginService_GetInstanceAdvancedJson = 4017, /* New in Orthanc 1.7.0 */
527 _OrthancPluginService_GetInstanceDicomWebJson = 4018, /* New in Orthanc 1.7.0 */
528 _OrthancPluginService_GetInstanceDicomWebXml = 4019, /* New in Orthanc 1.7.0 */
529
530 /* Services for plugins implementing a database back-end */
531 _OrthancPluginService_RegisterDatabaseBackend = 5000, /* New in Orthanc 0.8.6 */
532 _OrthancPluginService_DatabaseAnswer = 5001,
533 _OrthancPluginService_RegisterDatabaseBackendV2 = 5002, /* New in Orthanc 0.9.4 */
534 _OrthancPluginService_StorageAreaCreate = 5003,
535 _OrthancPluginService_StorageAreaRead = 5004,
536 _OrthancPluginService_StorageAreaRemove = 5005,
537 _OrthancPluginService_RegisterDatabaseBackendV3 = 5006, /* New in Orthanc 1.9.2 */
538
539 /* Primitives for handling images */
540 _OrthancPluginService_GetImagePixelFormat = 6000,
541 _OrthancPluginService_GetImageWidth = 6001,
542 _OrthancPluginService_GetImageHeight = 6002,
543 _OrthancPluginService_GetImagePitch = 6003,
544 _OrthancPluginService_GetImageBuffer = 6004,
545 _OrthancPluginService_UncompressImage = 6005,
546 _OrthancPluginService_FreeImage = 6006,
547 _OrthancPluginService_CompressImage = 6007,
548 _OrthancPluginService_ConvertPixelFormat = 6008,
549 _OrthancPluginService_GetFontsCount = 6009,
550 _OrthancPluginService_GetFontInfo = 6010,
551 _OrthancPluginService_DrawText = 6011,
552 _OrthancPluginService_CreateImage = 6012,
553 _OrthancPluginService_CreateImageAccessor = 6013,
554 _OrthancPluginService_DecodeDicomImage = 6014,
555
556 /* Primitives for handling C-Find, C-Move and worklists */
557 _OrthancPluginService_WorklistAddAnswer = 7000,
558 _OrthancPluginService_WorklistMarkIncomplete = 7001,
559 _OrthancPluginService_WorklistIsMatch = 7002,
560 _OrthancPluginService_WorklistGetDicomQuery = 7003,
561 _OrthancPluginService_FindAddAnswer = 7004,
562 _OrthancPluginService_FindMarkIncomplete = 7005,
563 _OrthancPluginService_GetFindQuerySize = 7006,
564 _OrthancPluginService_GetFindQueryTag = 7007,
565 _OrthancPluginService_GetFindQueryTagName = 7008,
566 _OrthancPluginService_GetFindQueryValue = 7009,
567 _OrthancPluginService_CreateFindMatcher = 7010,
568 _OrthancPluginService_FreeFindMatcher = 7011,
569 _OrthancPluginService_FindMatcherIsMatch = 7012,
570
571 /* Primitives for accessing Orthanc Peers (new in 1.4.2) */
572 _OrthancPluginService_GetPeers = 8000,
573 _OrthancPluginService_FreePeers = 8001,
574 _OrthancPluginService_GetPeersCount = 8003,
575 _OrthancPluginService_GetPeerName = 8004,
576 _OrthancPluginService_GetPeerUrl = 8005,
577 _OrthancPluginService_CallPeerApi = 8006,
578 _OrthancPluginService_GetPeerUserProperty = 8007,
579
580 /* Primitives for handling jobs (new in 1.4.2) */
581 _OrthancPluginService_CreateJob = 9000,
582 _OrthancPluginService_FreeJob = 9001,
583 _OrthancPluginService_SubmitJob = 9002,
584 _OrthancPluginService_RegisterJobsUnserializer = 9003,
585
586 _OrthancPluginService_INTERNAL = 0x7fffffff
587 } _OrthancPluginService;
588
589
590 typedef enum
591 {
592 _OrthancPluginProperty_Description = 1,
593 _OrthancPluginProperty_RootUri = 2,
594 _OrthancPluginProperty_OrthancExplorer = 3,
595
596 _OrthancPluginProperty_INTERNAL = 0x7fffffff
597 } _OrthancPluginProperty;
598
599
600
605 typedef enum
606 {
613 OrthancPluginPixelFormat_Grayscale8 = 1,
614
621 OrthancPluginPixelFormat_Grayscale16 = 2,
622
629 OrthancPluginPixelFormat_SignedGrayscale16 = 3,
630
637 OrthancPluginPixelFormat_RGB24 = 4,
638
645 OrthancPluginPixelFormat_RGBA32 = 5,
646
647 OrthancPluginPixelFormat_Unknown = 6,
648
655 OrthancPluginPixelFormat_RGB48 = 7,
656
663 OrthancPluginPixelFormat_Grayscale32 = 8,
664
671 OrthancPluginPixelFormat_Float32 = 9,
672
679 OrthancPluginPixelFormat_BGRA32 = 10,
680
687 OrthancPluginPixelFormat_Grayscale64 = 11,
688
689 _OrthancPluginPixelFormat_INTERNAL = 0x7fffffff
690 } OrthancPluginPixelFormat;
691
692
693
697 typedef enum
698 {
699 OrthancPluginContentType_Unknown = 0,
700 OrthancPluginContentType_Dicom = 1,
701 OrthancPluginContentType_DicomAsJson = 2,
702 OrthancPluginContentType_DicomUntilPixelData = 3,
703
704 _OrthancPluginContentType_INTERNAL = 0x7fffffff
705 } OrthancPluginContentType;
706
707
708
712 typedef enum
713 {
714 OrthancPluginResourceType_Patient = 0,
715 OrthancPluginResourceType_Study = 1,
716 OrthancPluginResourceType_Series = 2,
717 OrthancPluginResourceType_Instance = 3,
718 OrthancPluginResourceType_None = 4,
719
720 _OrthancPluginResourceType_INTERNAL = 0x7fffffff
721 } OrthancPluginResourceType;
722
723
724
729 typedef enum
730 {
731 OrthancPluginChangeType_CompletedSeries = 0,
732 OrthancPluginChangeType_Deleted = 1,
733 OrthancPluginChangeType_NewChildInstance = 2,
734 OrthancPluginChangeType_NewInstance = 3,
735 OrthancPluginChangeType_NewPatient = 4,
736 OrthancPluginChangeType_NewSeries = 5,
737 OrthancPluginChangeType_NewStudy = 6,
738 OrthancPluginChangeType_StablePatient = 7,
739 OrthancPluginChangeType_StableSeries = 8,
740 OrthancPluginChangeType_StableStudy = 9,
741 OrthancPluginChangeType_OrthancStarted = 10,
742 OrthancPluginChangeType_OrthancStopped = 11,
743 OrthancPluginChangeType_UpdatedAttachment = 12,
744 OrthancPluginChangeType_UpdatedMetadata = 13,
745 OrthancPluginChangeType_UpdatedPeers = 14,
746 OrthancPluginChangeType_UpdatedModalities = 15,
747 OrthancPluginChangeType_JobSubmitted = 16,
748 OrthancPluginChangeType_JobSuccess = 17,
749 OrthancPluginChangeType_JobFailure = 18,
750
751 _OrthancPluginChangeType_INTERNAL = 0x7fffffff
752 } OrthancPluginChangeType;
753
754
759 typedef enum
760 {
761 OrthancPluginCompressionType_Zlib = 0,
762 OrthancPluginCompressionType_ZlibWithSize = 1,
763 OrthancPluginCompressionType_Gzip = 2,
764 OrthancPluginCompressionType_GzipWithSize = 3,
765
766 _OrthancPluginCompressionType_INTERNAL = 0x7fffffff
767 } OrthancPluginCompressionType;
768
769
774 typedef enum
775 {
776 OrthancPluginImageFormat_Png = 0,
777 OrthancPluginImageFormat_Jpeg = 1,
778 OrthancPluginImageFormat_Dicom = 2,
779
780 _OrthancPluginImageFormat_INTERNAL = 0x7fffffff
781 } OrthancPluginImageFormat;
782
783
788 typedef enum
789 {
790 OrthancPluginValueRepresentation_AE = 1,
791 OrthancPluginValueRepresentation_AS = 2,
792 OrthancPluginValueRepresentation_AT = 3,
793 OrthancPluginValueRepresentation_CS = 4,
794 OrthancPluginValueRepresentation_DA = 5,
795 OrthancPluginValueRepresentation_DS = 6,
796 OrthancPluginValueRepresentation_DT = 7,
797 OrthancPluginValueRepresentation_FD = 8,
798 OrthancPluginValueRepresentation_FL = 9,
799 OrthancPluginValueRepresentation_IS = 10,
800 OrthancPluginValueRepresentation_LO = 11,
801 OrthancPluginValueRepresentation_LT = 12,
802 OrthancPluginValueRepresentation_OB = 13,
803 OrthancPluginValueRepresentation_OF = 14,
804 OrthancPluginValueRepresentation_OW = 15,
805 OrthancPluginValueRepresentation_PN = 16,
806 OrthancPluginValueRepresentation_SH = 17,
807 OrthancPluginValueRepresentation_SL = 18,
808 OrthancPluginValueRepresentation_SQ = 19,
809 OrthancPluginValueRepresentation_SS = 20,
810 OrthancPluginValueRepresentation_ST = 21,
811 OrthancPluginValueRepresentation_TM = 22,
812 OrthancPluginValueRepresentation_UI = 23,
813 OrthancPluginValueRepresentation_UL = 24,
814 OrthancPluginValueRepresentation_UN = 25,
815 OrthancPluginValueRepresentation_US = 26,
816 OrthancPluginValueRepresentation_UT = 27,
817
818 _OrthancPluginValueRepresentation_INTERNAL = 0x7fffffff
819 } OrthancPluginValueRepresentation;
820
821
827 typedef enum
828 {
829 OrthancPluginDicomToJsonFormat_Full = 1,
830 OrthancPluginDicomToJsonFormat_Short = 2,
831 OrthancPluginDicomToJsonFormat_Human = 3,
832
833 _OrthancPluginDicomToJsonFormat_INTERNAL = 0x7fffffff
834 } OrthancPluginDicomToJsonFormat;
835
836
842 typedef enum
843 {
844 OrthancPluginDicomToJsonFlags_None = 0,
845 OrthancPluginDicomToJsonFlags_IncludeBinary = (1 << 0),
846 OrthancPluginDicomToJsonFlags_IncludePrivateTags = (1 << 1),
847 OrthancPluginDicomToJsonFlags_IncludeUnknownTags = (1 << 2),
848 OrthancPluginDicomToJsonFlags_IncludePixelData = (1 << 3),
849 OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii = (1 << 4),
850 OrthancPluginDicomToJsonFlags_ConvertBinaryToNull = (1 << 5),
851 OrthancPluginDicomToJsonFlags_StopAfterPixelData = (1 << 6),
852 OrthancPluginDicomToJsonFlags_SkipGroupLengths = (1 << 7),
853
854 _OrthancPluginDicomToJsonFlags_INTERNAL = 0x7fffffff
855 } OrthancPluginDicomToJsonFlags;
856
857
863 typedef enum
864 {
865 OrthancPluginCreateDicomFlags_None = 0,
866 OrthancPluginCreateDicomFlags_DecodeDataUriScheme = (1 << 0),
867 OrthancPluginCreateDicomFlags_GenerateIdentifiers = (1 << 1),
868
869 _OrthancPluginCreateDicomFlags_INTERNAL = 0x7fffffff
870 } OrthancPluginCreateDicomFlags;
871
872
878 typedef enum
879 {
880 OrthancPluginIdentifierConstraint_Equal = 1,
881 OrthancPluginIdentifierConstraint_SmallerOrEqual = 2,
882 OrthancPluginIdentifierConstraint_GreaterOrEqual = 3,
883 OrthancPluginIdentifierConstraint_Wildcard = 4,
884
885 _OrthancPluginIdentifierConstraint_INTERNAL = 0x7fffffff
886 } OrthancPluginIdentifierConstraint;
887
888
893 typedef enum
894 {
895 OrthancPluginConstraintType_Equal = 1,
896 OrthancPluginConstraintType_SmallerOrEqual = 2,
897 OrthancPluginConstraintType_GreaterOrEqual = 3,
898 OrthancPluginConstraintType_Wildcard = 4,
899 OrthancPluginConstraintType_List = 5,
900
901 _OrthancPluginConstraintType_INTERNAL = 0x7fffffff
902 } OrthancPluginConstraintType;
903
904
908 typedef enum
909 {
910 OrthancPluginInstanceOrigin_Unknown = 1,
911 OrthancPluginInstanceOrigin_DicomProtocol = 2,
912 OrthancPluginInstanceOrigin_RestApi = 3,
913 OrthancPluginInstanceOrigin_Plugin = 4,
914 OrthancPluginInstanceOrigin_Lua = 5,
915 OrthancPluginInstanceOrigin_WebDav = 6,
916
917 _OrthancPluginInstanceOrigin_INTERNAL = 0x7fffffff
918 } OrthancPluginInstanceOrigin;
919
920
924 typedef enum
925 {
926 OrthancPluginJobStepStatus_Success = 1,
927 OrthancPluginJobStepStatus_Failure = 2,
928 OrthancPluginJobStepStatus_Continue = 3
929 } OrthancPluginJobStepStatus;
930
931
938 typedef enum
939 {
940 OrthancPluginJobStopReason_Success = 1,
941 OrthancPluginJobStopReason_Paused = 2,
942 OrthancPluginJobStopReason_Failure = 3,
943 OrthancPluginJobStopReason_Canceled = 4
944 } OrthancPluginJobStopReason;
945
946
950 typedef enum
951 {
952 OrthancPluginMetricsType_Default = 0,
953
959 OrthancPluginMetricsType_Timer = 1
960 } OrthancPluginMetricsType;
961
962
967 typedef enum
968 {
969 OrthancPluginDicomWebBinaryMode_Ignore = 0,
970 OrthancPluginDicomWebBinaryMode_InlineBinary = 1,
971 OrthancPluginDicomWebBinaryMode_BulkDataUri = 2
972 } OrthancPluginDicomWebBinaryMode;
973
974
980 typedef enum
981 {
982 OrthancPluginStorageCommitmentFailureReason_Success = 0,
984
985 OrthancPluginStorageCommitmentFailureReason_ProcessingFailure = 1,
987
988 OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance = 2,
991
992 OrthancPluginStorageCommitmentFailureReason_ResourceLimitation = 3,
995
996 OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported = 4,
999
1000 OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict = 5,
1004
1005 OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID = 6
1008 } OrthancPluginStorageCommitmentFailureReason;
1009
1010
1014 typedef enum
1015 {
1016 OrthancPluginReceivedInstanceAction_KeepAsIs = 1,
1017 OrthancPluginReceivedInstanceAction_Modify = 2,
1018 OrthancPluginReceivedInstanceAction_Discard = 3,
1019
1020 _OrthancPluginReceivedInstanceAction_INTERNAL = 0x7fffffff
1021 } OrthancPluginReceivedInstanceAction;
1022
1023
1031 typedef struct
1032 {
1036 void* data;
1037
1041 uint32_t size;
1042 } OrthancPluginMemoryBuffer;
1043
1044
1045
1053 typedef struct
1054 {
1058 void* data;
1059
1063 uint64_t size;
1064 } OrthancPluginMemoryBuffer64;
1065
1066
1067
1068
1073 typedef struct _OrthancPluginRestOutput_t OrthancPluginRestOutput;
1074
1075
1076
1081 typedef struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance;
1082
1083
1084
1089 typedef struct _OrthancPluginImage_t OrthancPluginImage;
1090
1091
1092
1097 typedef struct _OrthancPluginStorageArea_t OrthancPluginStorageArea;
1098
1099
1100
1105 typedef struct _OrthancPluginWorklistQuery_t OrthancPluginWorklistQuery;
1106
1107
1108
1113 typedef struct _OrthancPluginWorklistAnswers_t OrthancPluginWorklistAnswers;
1114
1115
1116
1121 typedef struct _OrthancPluginFindQuery_t OrthancPluginFindQuery;
1122
1123
1124
1129 typedef struct _OrthancPluginFindAnswers_t OrthancPluginFindAnswers;
1130
1131
1132
1137 typedef struct _OrthancPluginFindMatcher_t OrthancPluginFindMatcher;
1138
1139
1140
1145 typedef struct _OrthancPluginPeers_t OrthancPluginPeers;
1146
1147
1148
1153 typedef struct _OrthancPluginJob_t OrthancPluginJob;
1154
1155
1156
1162 typedef struct _OrthancPluginDicomWebNode_t OrthancPluginDicomWebNode;
1163
1164
1165
1170 typedef OrthancPluginErrorCode (*OrthancPluginRestCallback) (
1171 OrthancPluginRestOutput* output,
1172 const char* url,
1173 const OrthancPluginHttpRequest* request);
1174
1175
1176
1181 typedef OrthancPluginErrorCode (*OrthancPluginOnStoredInstanceCallback) (
1182 const OrthancPluginDicomInstance* instance,
1183 const char* instanceId);
1184
1185
1186
1191 typedef OrthancPluginErrorCode (*OrthancPluginOnChangeCallback) (
1192 OrthancPluginChangeType changeType,
1193 OrthancPluginResourceType resourceType,
1194 const char* resourceId);
1195
1196
1197
1202 typedef OrthancPluginErrorCode (*OrthancPluginDecodeImageCallback) (
1203 OrthancPluginImage** target,
1204 const void* dicom,
1205 const uint32_t size,
1206 uint32_t frameIndex);
1207
1208
1209
1214 typedef void (*OrthancPluginFree) (void* buffer);
1215
1216
1217
1224 typedef void (*OrthancPluginDicomWebSetBinaryNode) (
1225 OrthancPluginDicomWebNode* node,
1226 OrthancPluginDicomWebBinaryMode mode,
1227 const char* bulkDataUri);
1228
1229
1230
1243 typedef OrthancPluginErrorCode (*OrthancPluginStorageCreate) (
1244 const char* uuid,
1245 const void* content,
1246 int64_t size,
1247 OrthancPluginContentType type);
1248
1249
1250
1270 typedef OrthancPluginErrorCode (*OrthancPluginStorageRead) (
1271 void** content,
1272 int64_t* size,
1273 const char* uuid,
1274 OrthancPluginContentType type);
1275
1276
1277
1290 typedef OrthancPluginErrorCode (*OrthancPluginStorageReadWhole) (
1291 OrthancPluginMemoryBuffer64* target,
1292 const char* uuid,
1293 OrthancPluginContentType type);
1294
1295
1296
1313 typedef OrthancPluginErrorCode (*OrthancPluginStorageReadRange) (
1314 OrthancPluginMemoryBuffer64* target,
1315 const char* uuid,
1316 OrthancPluginContentType type,
1317 uint64_t rangeStart);
1318
1319
1320
1331 typedef OrthancPluginErrorCode (*OrthancPluginStorageRemove) (
1332 const char* uuid,
1333 OrthancPluginContentType type);
1334
1335
1336
1350 typedef OrthancPluginErrorCode (*OrthancPluginWorklistCallback) (
1351 OrthancPluginWorklistAnswers* answers,
1352 const OrthancPluginWorklistQuery* query,
1353 const char* issuerAet,
1354 const char* calledAet);
1355
1356
1357
1381 typedef int32_t (*OrthancPluginIncomingHttpRequestFilter) (
1382 OrthancPluginHttpMethod method,
1383 const char* uri,
1384 const char* ip,
1385 uint32_t headersCount,
1386 const char* const* headersKeys,
1387 const char* const* headersValues);
1388
1389
1390
1416 typedef int32_t (*OrthancPluginIncomingHttpRequestFilter2) (
1417 OrthancPluginHttpMethod method,
1418 const char* uri,
1419 const char* ip,
1420 uint32_t headersCount,
1421 const char* const* headersKeys,
1422 const char* const* headersValues,
1423 uint32_t getArgumentsCount,
1424 const char* const* getArgumentsKeys,
1425 const char* const* getArgumentsValues);
1426
1427
1428
1443 typedef OrthancPluginErrorCode (*OrthancPluginFindCallback) (
1444 OrthancPluginFindAnswers* answers,
1445 const OrthancPluginFindQuery* query,
1446 const char* issuerAet,
1447 const char* calledAet);
1448
1449
1450
1486 typedef void* (*OrthancPluginMoveCallback) (
1487 OrthancPluginResourceType resourceType,
1488 const char* patientId,
1489 const char* accessionNumber,
1490 const char* studyInstanceUid,
1491 const char* seriesInstanceUid,
1492 const char* sopInstanceUid,
1493 const char* originatorAet,
1494 const char* sourceAet,
1495 const char* targetAet,
1496 uint16_t originatorId);
1497
1498
1511 typedef uint32_t (*OrthancPluginGetMoveSize) (void* moveDriver);
1512
1513
1526 typedef OrthancPluginErrorCode (*OrthancPluginApplyMove) (void* moveDriver);
1527
1528
1540 typedef void (*OrthancPluginFreeMove) (void* moveDriver);
1541
1542
1553 typedef void (*OrthancPluginJobFinalize) (void* job);
1554
1555
1566 typedef float (*OrthancPluginJobGetProgress) (void* job);
1567
1568
1581 typedef const char* (*OrthancPluginJobGetContent) (void* job);
1582
1583
1599 typedef const char* (*OrthancPluginJobGetSerialized) (void* job);
1600
1601
1614 typedef OrthancPluginJobStepStatus (*OrthancPluginJobStep) (void* job);
1615
1616
1638 typedef OrthancPluginErrorCode (*OrthancPluginJobStop) (void* job,
1639 OrthancPluginJobStopReason reason);
1640
1641
1655 typedef OrthancPluginErrorCode (*OrthancPluginJobReset) (void* job);
1656
1657
1671 typedef OrthancPluginJob* (*OrthancPluginJobsUnserializer) (const char* jobType,
1672 const char* serialized);
1673
1674
1675
1689 typedef void (*OrthancPluginRefreshMetricsCallback) ();
1690
1691
1692
1717 typedef void (*OrthancPluginDicomWebBinaryCallback) (
1718 OrthancPluginDicomWebNode* node,
1719 OrthancPluginDicomWebSetBinaryNode setter,
1720 uint32_t levelDepth,
1721 const uint16_t* levelTagGroup,
1722 const uint16_t* levelTagElement,
1723 const uint32_t* levelIndex,
1724 uint16_t tagGroup,
1725 uint16_t tagElement,
1726 OrthancPluginValueRepresentation vr);
1727
1728
1729
1755 typedef void (*OrthancPluginDicomWebBinaryCallback2) (
1756 OrthancPluginDicomWebNode* node,
1757 OrthancPluginDicomWebSetBinaryNode setter,
1758 uint32_t levelDepth,
1759 const uint16_t* levelTagGroup,
1760 const uint16_t* levelTagElement,
1761 const uint32_t* levelIndex,
1762 uint16_t tagGroup,
1763 uint16_t tagElement,
1764 OrthancPluginValueRepresentation vr,
1765 void* payload);
1766
1767
1768
1772 typedef struct _OrthancPluginContext_t
1773 {
1774 void* pluginsManager;
1775 const char* orthancVersion;
1776 OrthancPluginFree Free;
1777 OrthancPluginErrorCode (*InvokeService) (struct _OrthancPluginContext_t* context,
1778 _OrthancPluginService service,
1779 const void* params);
1780 } OrthancPluginContext;
1781
1782
1783
1787 typedef struct
1788 {
1789 uint16_t group;
1790 uint16_t element;
1791 OrthancPluginValueRepresentation vr;
1792 uint32_t minMultiplicity;
1793 uint32_t maxMultiplicity;
1794 } OrthancPluginDictionaryEntry;
1795
1796
1797
1806 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeString(
1807 OrthancPluginContext* context,
1808 char* str)
1809 {
1810 if (str != NULL)
1811 {
1812 context->Free(str);
1813 }
1814 }
1815
1816
1836 ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersionAdvanced(
1837 OrthancPluginContext* context,
1838 int expectedMajor,
1839 int expectedMinor,
1840 int expectedRevision)
1841 {
1842 int major, minor, revision;
1843
1844 if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) ||
1845 sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) ||
1846 sizeof(int32_t) != sizeof(_OrthancPluginService) ||
1847 sizeof(int32_t) != sizeof(_OrthancPluginProperty) ||
1848 sizeof(int32_t) != sizeof(OrthancPluginPixelFormat) ||
1849 sizeof(int32_t) != sizeof(OrthancPluginContentType) ||
1850 sizeof(int32_t) != sizeof(OrthancPluginResourceType) ||
1851 sizeof(int32_t) != sizeof(OrthancPluginChangeType) ||
1852 sizeof(int32_t) != sizeof(OrthancPluginCompressionType) ||
1853 sizeof(int32_t) != sizeof(OrthancPluginImageFormat) ||
1854 sizeof(int32_t) != sizeof(OrthancPluginValueRepresentation) ||
1855 sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFormat) ||
1856 sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFlags) ||
1857 sizeof(int32_t) != sizeof(OrthancPluginCreateDicomFlags) ||
1858 sizeof(int32_t) != sizeof(OrthancPluginIdentifierConstraint) ||
1859 sizeof(int32_t) != sizeof(OrthancPluginInstanceOrigin) ||
1860 sizeof(int32_t) != sizeof(OrthancPluginJobStepStatus) ||
1861 sizeof(int32_t) != sizeof(OrthancPluginConstraintType) ||
1862 sizeof(int32_t) != sizeof(OrthancPluginMetricsType) ||
1863 sizeof(int32_t) != sizeof(OrthancPluginDicomWebBinaryMode) ||
1864 sizeof(int32_t) != sizeof(OrthancPluginStorageCommitmentFailureReason) ||
1865 sizeof(int32_t) != sizeof(OrthancPluginReceivedInstanceAction))
1866 {
1867 /* Mismatch in the size of the enumerations */
1868 return 0;
1869 }
1870
1871 /* Assume compatibility with the mainline */
1872 if (!strcmp(context->orthancVersion, "mainline"))
1873 {
1874 return 1;
1875 }
1876
1877 /* Parse the version of the Orthanc core */
1878 if (
1879#ifdef _MSC_VER
1880 sscanf_s
1881#else
1882 sscanf
1883#endif
1884 (context->orthancVersion, "%4d.%4d.%4d", &major, &minor, &revision) != 3)
1885 {
1886 return 0;
1887 }
1888
1889 /* Check the major number of the version */
1890
1891 if (major > expectedMajor)
1892 {
1893 return 1;
1894 }
1895
1896 if (major < expectedMajor)
1897 {
1898 return 0;
1899 }
1900
1901 /* Check the minor number of the version */
1902
1903 if (minor > expectedMinor)
1904 {
1905 return 1;
1906 }
1907
1908 if (minor < expectedMinor)
1909 {
1910 return 0;
1911 }
1912
1913 /* Check the revision number of the version */
1914
1915 if (revision >= expectedRevision)
1916 {
1917 return 1;
1918 }
1919 else
1920 {
1921 return 0;
1922 }
1923 }
1924
1925
1942 ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion(
1943 OrthancPluginContext* context)
1944 {
1945 return OrthancPluginCheckVersionAdvanced(
1946 context,
1947 ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
1948 ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER,
1949 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
1950 }
1951
1952
1961 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeMemoryBuffer(
1962 OrthancPluginContext* context,
1963 OrthancPluginMemoryBuffer* buffer)
1964 {
1965 context->Free(buffer->data);
1966 }
1967
1968
1977 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeMemoryBuffer64(
1978 OrthancPluginContext* context,
1979 OrthancPluginMemoryBuffer64* buffer)
1980 {
1981 context->Free(buffer->data);
1982 }
1983
1984
1993 ORTHANC_PLUGIN_INLINE void OrthancPluginLogError(
1994 OrthancPluginContext* context,
1995 const char* message)
1996 {
1997 context->InvokeService(context, _OrthancPluginService_LogError, message);
1998 }
1999
2000
2009 ORTHANC_PLUGIN_INLINE void OrthancPluginLogWarning(
2010 OrthancPluginContext* context,
2011 const char* message)
2012 {
2013 context->InvokeService(context, _OrthancPluginService_LogWarning, message);
2014 }
2015
2016
2025 ORTHANC_PLUGIN_INLINE void OrthancPluginLogInfo(
2026 OrthancPluginContext* context,
2027 const char* message)
2028 {
2029 context->InvokeService(context, _OrthancPluginService_LogInfo, message);
2030 }
2031
2032
2033
2034 typedef struct
2035 {
2036 const char* pathRegularExpression;
2037 OrthancPluginRestCallback callback;
2038 } _OrthancPluginRestCallback;
2039
2061 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallback(
2062 OrthancPluginContext* context,
2063 const char* pathRegularExpression,
2064 OrthancPluginRestCallback callback)
2065 {
2066 _OrthancPluginRestCallback params;
2067 params.pathRegularExpression = pathRegularExpression;
2068 params.callback = callback;
2069 context->InvokeService(context, _OrthancPluginService_RegisterRestCallback, &params);
2070 }
2071
2072
2073
2101 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallbackNoLock(
2102 OrthancPluginContext* context,
2103 const char* pathRegularExpression,
2104 OrthancPluginRestCallback callback)
2105 {
2106 _OrthancPluginRestCallback params;
2107 params.pathRegularExpression = pathRegularExpression;
2108 params.callback = callback;
2109 context->InvokeService(context, _OrthancPluginService_RegisterRestCallbackNoLock, &params);
2110 }
2111
2112
2113
2114 typedef struct
2115 {
2116 OrthancPluginOnStoredInstanceCallback callback;
2117 } _OrthancPluginOnStoredInstanceCallback;
2118
2139 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnStoredInstanceCallback(
2140 OrthancPluginContext* context,
2141 OrthancPluginOnStoredInstanceCallback callback)
2142 {
2143 _OrthancPluginOnStoredInstanceCallback params;
2144 params.callback = callback;
2145
2146 context->InvokeService(context, _OrthancPluginService_RegisterOnStoredInstanceCallback, &params);
2147 }
2148
2149
2150
2151 typedef struct
2152 {
2153 OrthancPluginRestOutput* output;
2154 const void* answer;
2155 uint32_t answerSize;
2156 const char* mimeType;
2157 } _OrthancPluginAnswerBuffer;
2158
2171 ORTHANC_PLUGIN_INLINE void OrthancPluginAnswerBuffer(
2172 OrthancPluginContext* context,
2173 OrthancPluginRestOutput* output,
2174 const void* answer,
2175 uint32_t answerSize,
2176 const char* mimeType)
2177 {
2178 _OrthancPluginAnswerBuffer params;
2179 params.output = output;
2180 params.answer = answer;
2181 params.answerSize = answerSize;
2182 params.mimeType = mimeType;
2183 context->InvokeService(context, _OrthancPluginService_AnswerBuffer, &params);
2184 }
2185
2186
2187 typedef struct
2188 {
2189 OrthancPluginRestOutput* output;
2190 OrthancPluginPixelFormat format;
2191 uint32_t width;
2192 uint32_t height;
2193 uint32_t pitch;
2194 const void* buffer;
2195 } _OrthancPluginCompressAndAnswerPngImage;
2196
2197 typedef struct
2198 {
2199 OrthancPluginRestOutput* output;
2200 OrthancPluginImageFormat imageFormat;
2201 OrthancPluginPixelFormat pixelFormat;
2202 uint32_t width;
2203 uint32_t height;
2204 uint32_t pitch;
2205 const void* buffer;
2206 uint8_t quality;
2207 } _OrthancPluginCompressAndAnswerImage;
2208
2209
2228 ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerPngImage(
2229 OrthancPluginContext* context,
2230 OrthancPluginRestOutput* output,
2231 OrthancPluginPixelFormat format,
2232 uint32_t width,
2233 uint32_t height,
2234 uint32_t pitch,
2235 const void* buffer)
2236 {
2237 _OrthancPluginCompressAndAnswerImage params;
2238 params.output = output;
2239 params.imageFormat = OrthancPluginImageFormat_Png;
2240 params.pixelFormat = format;
2241 params.width = width;
2242 params.height = height;
2243 params.pitch = pitch;
2244 params.buffer = buffer;
2245 params.quality = 0; /* No quality for PNG */
2246 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, &params);
2247 }
2248
2249
2250
2251 typedef struct
2252 {
2253 OrthancPluginMemoryBuffer* target;
2254 const char* instanceId;
2255 } _OrthancPluginGetDicomForInstance;
2256
2269 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetDicomForInstance(
2270 OrthancPluginContext* context,
2271 OrthancPluginMemoryBuffer* target,
2272 const char* instanceId)
2273 {
2274 _OrthancPluginGetDicomForInstance params;
2275 params.target = target;
2276 params.instanceId = instanceId;
2277 return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, &params);
2278 }
2279
2280
2281
2282 typedef struct
2283 {
2284 OrthancPluginMemoryBuffer* target;
2285 const char* uri;
2286 } _OrthancPluginRestApiGet;
2287
2302 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGet(
2303 OrthancPluginContext* context,
2304 OrthancPluginMemoryBuffer* target,
2305 const char* uri)
2306 {
2307 _OrthancPluginRestApiGet params;
2308 params.target = target;
2309 params.uri = uri;
2310 return context->InvokeService(context, _OrthancPluginService_RestApiGet, &params);
2311 }
2312
2313
2314
2332 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGetAfterPlugins(
2333 OrthancPluginContext* context,
2334 OrthancPluginMemoryBuffer* target,
2335 const char* uri)
2336 {
2337 _OrthancPluginRestApiGet params;
2338 params.target = target;
2339 params.uri = uri;
2340 return context->InvokeService(context, _OrthancPluginService_RestApiGetAfterPlugins, &params);
2341 }
2342
2343
2344
2345 typedef struct
2346 {
2347 OrthancPluginMemoryBuffer* target;
2348 const char* uri;
2349 const void* body;
2350 uint32_t bodySize;
2351 } _OrthancPluginRestApiPostPut;
2352
2369 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPost(
2370 OrthancPluginContext* context,
2371 OrthancPluginMemoryBuffer* target,
2372 const char* uri,
2373 const void* body,
2374 uint32_t bodySize)
2375 {
2376 _OrthancPluginRestApiPostPut params;
2377 params.target = target;
2378 params.uri = uri;
2379 params.body = body;
2380 params.bodySize = bodySize;
2381 return context->InvokeService(context, _OrthancPluginService_RestApiPost, &params);
2382 }
2383
2384
2404 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPostAfterPlugins(
2405 OrthancPluginContext* context,
2406 OrthancPluginMemoryBuffer* target,
2407 const char* uri,
2408 const void* body,
2409 uint32_t bodySize)
2410 {
2411 _OrthancPluginRestApiPostPut params;
2412 params.target = target;
2413 params.uri = uri;
2414 params.body = body;
2415 params.bodySize = bodySize;
2416 return context->InvokeService(context, _OrthancPluginService_RestApiPostAfterPlugins, &params);
2417 }
2418
2419
2420
2433 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDelete(
2434 OrthancPluginContext* context,
2435 const char* uri)
2436 {
2437 return context->InvokeService(context, _OrthancPluginService_RestApiDelete, uri);
2438 }
2439
2440
2456 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins(
2457 OrthancPluginContext* context,
2458 const char* uri)
2459 {
2460 return context->InvokeService(context, _OrthancPluginService_RestApiDeleteAfterPlugins, uri);
2461 }
2462
2463
2464
2481 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPut(
2482 OrthancPluginContext* context,
2483 OrthancPluginMemoryBuffer* target,
2484 const char* uri,
2485 const void* body,
2486 uint32_t bodySize)
2487 {
2488 _OrthancPluginRestApiPostPut params;
2489 params.target = target;
2490 params.uri = uri;
2491 params.body = body;
2492 params.bodySize = bodySize;
2493 return context->InvokeService(context, _OrthancPluginService_RestApiPut, &params);
2494 }
2495
2496
2497
2517 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPutAfterPlugins(
2518 OrthancPluginContext* context,
2519 OrthancPluginMemoryBuffer* target,
2520 const char* uri,
2521 const void* body,
2522 uint32_t bodySize)
2523 {
2524 _OrthancPluginRestApiPostPut params;
2525 params.target = target;
2526 params.uri = uri;
2527 params.body = body;
2528 params.bodySize = bodySize;
2529 return context->InvokeService(context, _OrthancPluginService_RestApiPutAfterPlugins, &params);
2530 }
2531
2532
2533
2534 typedef struct
2535 {
2536 OrthancPluginRestOutput* output;
2537 const char* argument;
2538 } _OrthancPluginOutputPlusArgument;
2539
2551 ORTHANC_PLUGIN_INLINE void OrthancPluginRedirect(
2552 OrthancPluginContext* context,
2553 OrthancPluginRestOutput* output,
2554 const char* redirection)
2555 {
2556 _OrthancPluginOutputPlusArgument params;
2557 params.output = output;
2558 params.argument = redirection;
2559 context->InvokeService(context, _OrthancPluginService_Redirect, &params);
2560 }
2561
2562
2563
2564 typedef struct
2565 {
2566 char** result;
2567 const char* argument;
2568 } _OrthancPluginRetrieveDynamicString;
2569
2583 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupPatient(
2584 OrthancPluginContext* context,
2585 const char* patientID)
2586 {
2587 char* result;
2588
2589 _OrthancPluginRetrieveDynamicString params;
2590 params.result = &result;
2591 params.argument = patientID;
2592
2593 if (context->InvokeService(context, _OrthancPluginService_LookupPatient, &params) != OrthancPluginErrorCode_Success)
2594 {
2595 /* Error */
2596 return NULL;
2597 }
2598 else
2599 {
2600 return result;
2601 }
2602 }
2603
2604
2618 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudy(
2619 OrthancPluginContext* context,
2620 const char* studyUID)
2621 {
2622 char* result;
2623
2624 _OrthancPluginRetrieveDynamicString params;
2625 params.result = &result;
2626 params.argument = studyUID;
2627
2628 if (context->InvokeService(context, _OrthancPluginService_LookupStudy, &params) != OrthancPluginErrorCode_Success)
2629 {
2630 /* Error */
2631 return NULL;
2632 }
2633 else
2634 {
2635 return result;
2636 }
2637 }
2638
2639
2653 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudyWithAccessionNumber(
2654 OrthancPluginContext* context,
2655 const char* accessionNumber)
2656 {
2657 char* result;
2658
2659 _OrthancPluginRetrieveDynamicString params;
2660 params.result = &result;
2661 params.argument = accessionNumber;
2662
2663 if (context->InvokeService(context, _OrthancPluginService_LookupStudyWithAccessionNumber, &params) != OrthancPluginErrorCode_Success)
2664 {
2665 /* Error */
2666 return NULL;
2667 }
2668 else
2669 {
2670 return result;
2671 }
2672 }
2673
2674
2688 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupSeries(
2689 OrthancPluginContext* context,
2690 const char* seriesUID)
2691 {
2692 char* result;
2693
2694 _OrthancPluginRetrieveDynamicString params;
2695 params.result = &result;
2696 params.argument = seriesUID;
2697
2698 if (context->InvokeService(context, _OrthancPluginService_LookupSeries, &params) != OrthancPluginErrorCode_Success)
2699 {
2700 /* Error */
2701 return NULL;
2702 }
2703 else
2704 {
2705 return result;
2706 }
2707 }
2708
2709
2723 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupInstance(
2724 OrthancPluginContext* context,
2725 const char* sopInstanceUID)
2726 {
2727 char* result;
2728
2729 _OrthancPluginRetrieveDynamicString params;
2730 params.result = &result;
2731 params.argument = sopInstanceUID;
2732
2733 if (context->InvokeService(context, _OrthancPluginService_LookupInstance, &params) != OrthancPluginErrorCode_Success)
2734 {
2735 /* Error */
2736 return NULL;
2737 }
2738 else
2739 {
2740 return result;
2741 }
2742 }
2743
2744
2745
2746 typedef struct
2747 {
2748 OrthancPluginRestOutput* output;
2749 uint16_t status;
2750 } _OrthancPluginSendHttpStatusCode;
2751
2768 ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatusCode(
2769 OrthancPluginContext* context,
2770 OrthancPluginRestOutput* output,
2771 uint16_t status)
2772 {
2773 _OrthancPluginSendHttpStatusCode params;
2774 params.output = output;
2775 params.status = status;
2776 context->InvokeService(context, _OrthancPluginService_SendHttpStatusCode, &params);
2777 }
2778
2779
2791 ORTHANC_PLUGIN_INLINE void OrthancPluginSendUnauthorized(
2792 OrthancPluginContext* context,
2793 OrthancPluginRestOutput* output,
2794 const char* realm)
2795 {
2796 _OrthancPluginOutputPlusArgument params;
2797 params.output = output;
2798 params.argument = realm;
2799 context->InvokeService(context, _OrthancPluginService_SendUnauthorized, &params);
2800 }
2801
2802
2814 ORTHANC_PLUGIN_INLINE void OrthancPluginSendMethodNotAllowed(
2815 OrthancPluginContext* context,
2816 OrthancPluginRestOutput* output,
2817 const char* allowedMethods)
2818 {
2819 _OrthancPluginOutputPlusArgument params;
2820 params.output = output;
2821 params.argument = allowedMethods;
2822 context->InvokeService(context, _OrthancPluginService_SendMethodNotAllowed, &params);
2823 }
2824
2825
2826 typedef struct
2827 {
2828 OrthancPluginRestOutput* output;
2829 const char* key;
2830 const char* value;
2831 } _OrthancPluginSetHttpHeader;
2832
2844 ORTHANC_PLUGIN_INLINE void OrthancPluginSetCookie(
2845 OrthancPluginContext* context,
2846 OrthancPluginRestOutput* output,
2847 const char* cookie,
2848 const char* value)
2849 {
2850 _OrthancPluginSetHttpHeader params;
2851 params.output = output;
2852 params.key = cookie;
2853 params.value = value;
2854 context->InvokeService(context, _OrthancPluginService_SetCookie, &params);
2855 }
2856
2857
2869 ORTHANC_PLUGIN_INLINE void OrthancPluginSetHttpHeader(
2870 OrthancPluginContext* context,
2871 OrthancPluginRestOutput* output,
2872 const char* key,
2873 const char* value)
2874 {
2875 _OrthancPluginSetHttpHeader params;
2876 params.output = output;
2877 params.key = key;
2878 params.value = value;
2879 context->InvokeService(context, _OrthancPluginService_SetHttpHeader, &params);
2880 }
2881
2882
2883 typedef struct
2884 {
2885 char** resultStringToFree;
2886 const char** resultString;
2887 int64_t* resultInt64;
2888 const char* key;
2889 const OrthancPluginDicomInstance* instance;
2890 OrthancPluginInstanceOrigin* resultOrigin; /* New in Orthanc 0.9.5 SDK */
2891 } _OrthancPluginAccessDicomInstance;
2892
2893
2905 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceRemoteAet(
2906 OrthancPluginContext* context,
2907 const OrthancPluginDicomInstance* instance)
2908 {
2909 const char* result;
2910
2911 _OrthancPluginAccessDicomInstance params;
2912 memset(&params, 0, sizeof(params));
2913 params.resultString = &result;
2914 params.instance = instance;
2915
2916 if (context->InvokeService(context, _OrthancPluginService_GetInstanceRemoteAet, &params) != OrthancPluginErrorCode_Success)
2917 {
2918 /* Error */
2919 return NULL;
2920 }
2921 else
2922 {
2923 return result;
2924 }
2925 }
2926
2927
2938 ORTHANC_PLUGIN_INLINE int64_t OrthancPluginGetInstanceSize(
2939 OrthancPluginContext* context,
2940 const OrthancPluginDicomInstance* instance)
2941 {
2942 int64_t size;
2943
2944 _OrthancPluginAccessDicomInstance params;
2945 memset(&params, 0, sizeof(params));
2946 params.resultInt64 = &size;
2947 params.instance = instance;
2948
2949 if (context->InvokeService(context, _OrthancPluginService_GetInstanceSize, &params) != OrthancPluginErrorCode_Success)
2950 {
2951 /* Error */
2952 return -1;
2953 }
2954 else
2955 {
2956 return size;
2957 }
2958 }
2959
2960
2971 ORTHANC_PLUGIN_INLINE const void* OrthancPluginGetInstanceData(
2972 OrthancPluginContext* context,
2973 const OrthancPluginDicomInstance* instance)
2974 {
2975 const char* result;
2976
2977 _OrthancPluginAccessDicomInstance params;
2978 memset(&params, 0, sizeof(params));
2979 params.resultString = &result;
2980 params.instance = instance;
2981
2982 if (context->InvokeService(context, _OrthancPluginService_GetInstanceData, &params) != OrthancPluginErrorCode_Success)
2983 {
2984 /* Error */
2985 return NULL;
2986 }
2987 else
2988 {
2989 return result;
2990 }
2991 }
2992
2993
3007 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceJson(
3008 OrthancPluginContext* context,
3009 const OrthancPluginDicomInstance* instance)
3010 {
3011 char* result;
3012
3013 _OrthancPluginAccessDicomInstance params;
3014 memset(&params, 0, sizeof(params));
3015 params.resultStringToFree = &result;
3016 params.instance = instance;
3017
3018 if (context->InvokeService(context, _OrthancPluginService_GetInstanceJson, &params) != OrthancPluginErrorCode_Success)
3019 {
3020 /* Error */
3021 return NULL;
3022 }
3023 else
3024 {
3025 return result;
3026 }
3027 }
3028
3029
3045 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceSimplifiedJson(
3046 OrthancPluginContext* context,
3047 const OrthancPluginDicomInstance* instance)
3048 {
3049 char* result;
3050
3051 _OrthancPluginAccessDicomInstance params;
3052 memset(&params, 0, sizeof(params));
3053 params.resultStringToFree = &result;
3054 params.instance = instance;
3055
3056 if (context->InvokeService(context, _OrthancPluginService_GetInstanceSimplifiedJson, &params) != OrthancPluginErrorCode_Success)
3057 {
3058 /* Error */
3059 return NULL;
3060 }
3061 else
3062 {
3063 return result;
3064 }
3065 }
3066
3067
3084 ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata(
3085 OrthancPluginContext* context,
3086 const OrthancPluginDicomInstance* instance,
3087 const char* metadata)
3088 {
3089 int64_t result;
3090
3091 _OrthancPluginAccessDicomInstance params;
3092 memset(&params, 0, sizeof(params));
3093 params.resultInt64 = &result;
3094 params.instance = instance;
3095 params.key = metadata;
3096
3097 if (context->InvokeService(context, _OrthancPluginService_HasInstanceMetadata, &params) != OrthancPluginErrorCode_Success)
3098 {
3099 /* Error */
3100 return -1;
3101 }
3102 else
3103 {
3104 return (result != 0);
3105 }
3106 }
3107
3108
3125 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceMetadata(
3126 OrthancPluginContext* context,
3127 const OrthancPluginDicomInstance* instance,
3128 const char* metadata)
3129 {
3130 const char* result;
3131
3132 _OrthancPluginAccessDicomInstance params;
3133 memset(&params, 0, sizeof(params));
3134 params.resultString = &result;
3135 params.instance = instance;
3136 params.key = metadata;
3137
3138 if (context->InvokeService(context, _OrthancPluginService_GetInstanceMetadata, &params) != OrthancPluginErrorCode_Success)
3139 {
3140 /* Error */
3141 return NULL;
3142 }
3143 else
3144 {
3145 return result;
3146 }
3147 }
3148
3149
3150
3151 typedef struct
3152 {
3153 OrthancPluginStorageCreate create;
3154 OrthancPluginStorageRead read;
3155 OrthancPluginStorageRemove remove;
3156 OrthancPluginFree free;
3157 } _OrthancPluginRegisterStorageArea;
3158
3174 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterStorageArea(
3175 OrthancPluginContext* context,
3176 OrthancPluginStorageCreate create,
3177 OrthancPluginStorageRead read,
3178 OrthancPluginStorageRemove remove)
3179 {
3180 _OrthancPluginRegisterStorageArea params;
3181 params.create = create;
3182 params.read = read;
3183 params.remove = remove;
3184
3185#ifdef __cplusplus
3186 params.free = ::free;
3187#else
3188 params.free = free;
3189#endif
3190
3191 context->InvokeService(context, _OrthancPluginService_RegisterStorageArea, &params);
3192 }
3193
3194
3195
3206 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancPath(OrthancPluginContext* context)
3207 {
3208 char* result;
3209
3210 _OrthancPluginRetrieveDynamicString params;
3211 params.result = &result;
3212 params.argument = NULL;
3213
3214 if (context->InvokeService(context, _OrthancPluginService_GetOrthancPath, &params) != OrthancPluginErrorCode_Success)
3215 {
3216 /* Error */
3217 return NULL;
3218 }
3219 else
3220 {
3221 return result;
3222 }
3223 }
3224
3225
3236 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancDirectory(OrthancPluginContext* context)
3237 {
3238 char* result;
3239
3240 _OrthancPluginRetrieveDynamicString params;
3241 params.result = &result;
3242 params.argument = NULL;
3243
3244 if (context->InvokeService(context, _OrthancPluginService_GetOrthancDirectory, &params) != OrthancPluginErrorCode_Success)
3245 {
3246 /* Error */
3247 return NULL;
3248 }
3249 else
3250 {
3251 return result;
3252 }
3253 }
3254
3255
3271 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfigurationPath(OrthancPluginContext* context)
3272 {
3273 char* result;
3274
3275 _OrthancPluginRetrieveDynamicString params;
3276 params.result = &result;
3277 params.argument = NULL;
3278
3279 if (context->InvokeService(context, _OrthancPluginService_GetConfigurationPath, &params) != OrthancPluginErrorCode_Success)
3280 {
3281 /* Error */
3282 return NULL;
3283 }
3284 else
3285 {
3286 return result;
3287 }
3288 }
3289
3290
3291
3292 typedef struct
3293 {
3294 OrthancPluginOnChangeCallback callback;
3295 } _OrthancPluginOnChangeCallback;
3296
3317 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnChangeCallback(
3318 OrthancPluginContext* context,
3319 OrthancPluginOnChangeCallback callback)
3320 {
3321 _OrthancPluginOnChangeCallback params;
3322 params.callback = callback;
3323
3324 context->InvokeService(context, _OrthancPluginService_RegisterOnChangeCallback, &params);
3325 }
3326
3327
3328
3329 typedef struct
3330 {
3331 const char* plugin;
3332 _OrthancPluginProperty property;
3333 const char* value;
3334 } _OrthancPluginSetPluginProperty;
3335
3336
3348 ORTHANC_PLUGIN_INLINE void OrthancPluginSetRootUri(
3349 OrthancPluginContext* context,
3350 const char* uri)
3351 {
3352 _OrthancPluginSetPluginProperty params;
3353 params.plugin = OrthancPluginGetName();
3354 params.property = _OrthancPluginProperty_RootUri;
3355 params.value = uri;
3356
3357 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
3358 }
3359
3360
3370 ORTHANC_PLUGIN_INLINE void OrthancPluginSetDescription(
3371 OrthancPluginContext* context,
3372 const char* description)
3373 {
3374 _OrthancPluginSetPluginProperty params;
3375 params.plugin = OrthancPluginGetName();
3376 params.property = _OrthancPluginProperty_Description;
3377 params.value = description;
3378
3379 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
3380 }
3381
3382
3392 ORTHANC_PLUGIN_INLINE void OrthancPluginExtendOrthancExplorer(
3393 OrthancPluginContext* context,
3394 const char* javascript)
3395 {
3396 _OrthancPluginSetPluginProperty params;
3397 params.plugin = OrthancPluginGetName();
3398 params.property = _OrthancPluginProperty_OrthancExplorer;
3399 params.value = javascript;
3400
3401 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
3402 }
3403
3404
3405 typedef struct
3406 {
3407 char** result;
3408 int32_t property;
3409 const char* value;
3410 } _OrthancPluginGlobalProperty;
3411
3412
3426 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetGlobalProperty(
3427 OrthancPluginContext* context,
3428 int32_t property,
3429 const char* defaultValue)
3430 {
3431 char* result;
3432
3433 _OrthancPluginGlobalProperty params;
3434 params.result = &result;
3435 params.property = property;
3436 params.value = defaultValue;
3437
3438 if (context->InvokeService(context, _OrthancPluginService_GetGlobalProperty, &params) != OrthancPluginErrorCode_Success)
3439 {
3440 /* Error */
3441 return NULL;
3442 }
3443 else
3444 {
3445 return result;
3446 }
3447 }
3448
3449
3465 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSetGlobalProperty(
3466 OrthancPluginContext* context,
3467 int32_t property,
3468 const char* value)
3469 {
3470 _OrthancPluginGlobalProperty params;
3471 params.result = NULL;
3472 params.property = property;
3473 params.value = value;
3474
3475 return context->InvokeService(context, _OrthancPluginService_SetGlobalProperty, &params);
3476 }
3477
3478
3479
3480 typedef struct
3481 {
3482 int32_t *resultInt32;
3483 uint32_t *resultUint32;
3484 int64_t *resultInt64;
3485 uint64_t *resultUint64;
3486 } _OrthancPluginReturnSingleValue;
3487
3496 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetCommandLineArgumentsCount(
3497 OrthancPluginContext* context)
3498 {
3499 uint32_t count = 0;
3500
3501 _OrthancPluginReturnSingleValue params;
3502 memset(&params, 0, sizeof(params));
3503 params.resultUint32 = &count;
3504
3505 if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgumentsCount, &params) != OrthancPluginErrorCode_Success)
3506 {
3507 /* Error */
3508 return 0;
3509 }
3510 else
3511 {
3512 return count;
3513 }
3514 }
3515
3516
3517
3530 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetCommandLineArgument(
3531 OrthancPluginContext* context,
3532 uint32_t argument)
3533 {
3534 char* result;
3535
3536 _OrthancPluginGlobalProperty params;
3537 params.result = &result;
3538 params.property = (int32_t) argument;
3539 params.value = NULL;
3540
3541 if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgument, &params) != OrthancPluginErrorCode_Success)
3542 {
3543 /* Error */
3544 return NULL;
3545 }
3546 else
3547 {
3548 return result;
3549 }
3550 }
3551
3552
3562 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetExpectedDatabaseVersion(
3563 OrthancPluginContext* context)
3564 {
3565 uint32_t count = 0;
3566
3567 _OrthancPluginReturnSingleValue params;
3568 memset(&params, 0, sizeof(params));
3569 params.resultUint32 = &count;
3570
3571 if (context->InvokeService(context, _OrthancPluginService_GetExpectedDatabaseVersion, &params) != OrthancPluginErrorCode_Success)
3572 {
3573 /* Error */
3574 return 0;
3575 }
3576 else
3577 {
3578 return count;
3579 }
3580 }
3581
3582
3583
3595 ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfiguration(OrthancPluginContext* context)
3596 {
3597 char* result;
3598
3599 _OrthancPluginRetrieveDynamicString params;
3600 params.result = &result;
3601 params.argument = NULL;
3602
3603 if (context->InvokeService(context, _OrthancPluginService_GetConfiguration, &params) != OrthancPluginErrorCode_Success)
3604 {
3605 /* Error */
3606 return NULL;
3607 }
3608 else
3609 {
3610 return result;
3611 }
3612 }
3613
3614
3615
3616 typedef struct
3617 {
3618 OrthancPluginRestOutput* output;
3619 const char* subType;
3620 const char* contentType;
3621 } _OrthancPluginStartMultipartAnswer;
3622
3636 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStartMultipartAnswer(
3637 OrthancPluginContext* context,
3638 OrthancPluginRestOutput* output,
3639 const char* subType,
3640 const char* contentType)
3641 {
3642 _OrthancPluginStartMultipartAnswer params;
3643 params.output = output;
3644 params.subType = subType;
3645 params.contentType = contentType;
3646 return context->InvokeService(context, _OrthancPluginService_StartMultipartAnswer, &params);
3647 }
3648
3649
3665 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSendMultipartItem(
3666 OrthancPluginContext* context,
3667 OrthancPluginRestOutput* output,
3668 const void* answer,
3669 uint32_t answerSize)
3670 {
3671 _OrthancPluginAnswerBuffer params;
3672 params.output = output;
3673 params.answer = answer;
3674 params.answerSize = answerSize;
3675 params.mimeType = NULL;
3676 return context->InvokeService(context, _OrthancPluginService_SendMultipartItem, &params);
3677 }
3678
3679
3680
3681 typedef struct
3682 {
3683 OrthancPluginMemoryBuffer* target;
3684 const void* source;
3685 uint32_t size;
3686 OrthancPluginCompressionType compression;
3687 uint8_t uncompress;
3688 } _OrthancPluginBufferCompression;
3689
3690
3707 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginBufferCompression(
3708 OrthancPluginContext* context,
3709 OrthancPluginMemoryBuffer* target,
3710 const void* source,
3711 uint32_t size,
3712 OrthancPluginCompressionType compression,
3713 uint8_t uncompress)
3714 {
3715 _OrthancPluginBufferCompression params;
3716 params.target = target;
3717 params.source = source;
3718 params.size = size;
3719 params.compression = compression;
3720 params.uncompress = uncompress;
3721
3722 return context->InvokeService(context, _OrthancPluginService_BufferCompression, &params);
3723 }
3724
3725
3726
3727 typedef struct
3728 {
3729 OrthancPluginMemoryBuffer* target;
3730 const char* path;
3731 } _OrthancPluginReadFile;
3732
3744 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReadFile(
3745 OrthancPluginContext* context,
3746 OrthancPluginMemoryBuffer* target,
3747 const char* path)
3748 {
3749 _OrthancPluginReadFile params;
3750 params.target = target;
3751 params.path = path;
3752 return context->InvokeService(context, _OrthancPluginService_ReadFile, &params);
3753 }
3754
3755
3756
3757 typedef struct
3758 {
3759 const char* path;
3760 const void* data;
3761 uint32_t size;
3762 } _OrthancPluginWriteFile;
3763
3775 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWriteFile(
3776 OrthancPluginContext* context,
3777 const char* path,
3778 const void* data,
3779 uint32_t size)
3780 {
3781 _OrthancPluginWriteFile params;
3782 params.path = path;
3783 params.data = data;
3784 params.size = size;
3785 return context->InvokeService(context, _OrthancPluginService_WriteFile, &params);
3786 }
3787
3788
3789
3790 typedef struct
3791 {
3792 const char** target;
3793 OrthancPluginErrorCode error;
3794 } _OrthancPluginGetErrorDescription;
3795
3806 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetErrorDescription(
3807 OrthancPluginContext* context,
3808 OrthancPluginErrorCode error)
3809 {
3810 const char* result = NULL;
3811
3812 _OrthancPluginGetErrorDescription params;
3813 params.target = &result;
3814 params.error = error;
3815
3816 if (context->InvokeService(context, _OrthancPluginService_GetErrorDescription, &params) != OrthancPluginErrorCode_Success ||
3817 result == NULL)
3818 {
3819 return "Unknown error code";
3820 }
3821 else
3822 {
3823 return result;
3824 }
3825 }
3826
3827
3828
3829 typedef struct
3830 {
3831 OrthancPluginRestOutput* output;
3832 uint16_t status;
3833 const char* body;
3834 uint32_t bodySize;
3835 } _OrthancPluginSendHttpStatus;
3836
3859 ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatus(
3860 OrthancPluginContext* context,
3861 OrthancPluginRestOutput* output,
3862 uint16_t status,
3863 const char* body,
3864 uint32_t bodySize)
3865 {
3866 _OrthancPluginSendHttpStatus params;
3867 params.output = output;
3868 params.status = status;
3869 params.body = body;
3870 params.bodySize = bodySize;
3871 context->InvokeService(context, _OrthancPluginService_SendHttpStatus, &params);
3872 }
3873
3874
3875
3876 typedef struct
3877 {
3878 const OrthancPluginImage* image;
3879 uint32_t* resultUint32;
3880 OrthancPluginPixelFormat* resultPixelFormat;
3881 void** resultBuffer;
3882 } _OrthancPluginGetImageInfo;
3883
3884
3895 ORTHANC_PLUGIN_INLINE OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat(
3896 OrthancPluginContext* context,
3897 const OrthancPluginImage* image)
3898 {
3899 OrthancPluginPixelFormat target;
3900
3901 _OrthancPluginGetImageInfo params;
3902 memset(&params, 0, sizeof(params));
3903 params.image = image;
3904 params.resultPixelFormat = &target;
3905
3906 if (context->InvokeService(context, _OrthancPluginService_GetImagePixelFormat, &params) != OrthancPluginErrorCode_Success)
3907 {
3908 return OrthancPluginPixelFormat_Unknown;
3909 }
3910 else
3911 {
3912 return (OrthancPluginPixelFormat) target;
3913 }
3914 }
3915
3916
3917
3928 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageWidth(
3929 OrthancPluginContext* context,
3930 const OrthancPluginImage* image)
3931 {
3932 uint32_t width;
3933
3934 _OrthancPluginGetImageInfo params;
3935 memset(&params, 0, sizeof(params));
3936 params.image = image;
3937 params.resultUint32 = &width;
3938
3939 if (context->InvokeService(context, _OrthancPluginService_GetImageWidth, &params) != OrthancPluginErrorCode_Success)
3940 {
3941 return 0;
3942 }
3943 else
3944 {
3945 return width;
3946 }
3947 }
3948
3949
3950
3961 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageHeight(
3962 OrthancPluginContext* context,
3963 const OrthancPluginImage* image)
3964 {
3965 uint32_t height;
3966
3967 _OrthancPluginGetImageInfo params;
3968 memset(&params, 0, sizeof(params));
3969 params.image = image;
3970 params.resultUint32 = &height;
3971
3972 if (context->InvokeService(context, _OrthancPluginService_GetImageHeight, &params) != OrthancPluginErrorCode_Success)
3973 {
3974 return 0;
3975 }
3976 else
3977 {
3978 return height;
3979 }
3980 }
3981
3982
3983
3996 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImagePitch(
3997 OrthancPluginContext* context,
3998 const OrthancPluginImage* image)
3999 {
4000 uint32_t pitch;
4001
4002 _OrthancPluginGetImageInfo params;
4003 memset(&params, 0, sizeof(params));
4004 params.image = image;
4005 params.resultUint32 = &pitch;
4006
4007 if (context->InvokeService(context, _OrthancPluginService_GetImagePitch, &params) != OrthancPluginErrorCode_Success)
4008 {
4009 return 0;
4010 }
4011 else
4012 {
4013 return pitch;
4014 }
4015 }
4016
4017
4018
4030 ORTHANC_PLUGIN_INLINE void* OrthancPluginGetImageBuffer(
4031 OrthancPluginContext* context,
4032 const OrthancPluginImage* image)
4033 {
4034 void* target = NULL;
4035
4036 _OrthancPluginGetImageInfo params;
4037 memset(&params, 0, sizeof(params));
4038 params.resultBuffer = &target;
4039 params.image = image;
4040
4041 if (context->InvokeService(context, _OrthancPluginService_GetImageBuffer, &params) != OrthancPluginErrorCode_Success)
4042 {
4043 return NULL;
4044 }
4045 else
4046 {
4047 return target;
4048 }
4049 }
4050
4051
4052 typedef struct
4053 {
4054 OrthancPluginImage** target;
4055 const void* data;
4056 uint32_t size;
4057 OrthancPluginImageFormat format;
4058 } _OrthancPluginUncompressImage;
4059
4060
4073 ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginUncompressImage(
4074 OrthancPluginContext* context,
4075 const void* data,
4076 uint32_t size,
4077 OrthancPluginImageFormat format)
4078 {
4079 OrthancPluginImage* target = NULL;
4080
4081 _OrthancPluginUncompressImage params;
4082 memset(&params, 0, sizeof(params));
4083 params.target = &target;
4084 params.data = data;
4085 params.size = size;
4086 params.format = format;
4087
4088 if (context->InvokeService(context, _OrthancPluginService_UncompressImage, &params) != OrthancPluginErrorCode_Success)
4089 {
4090 return NULL;
4091 }
4092 else
4093 {
4094 return target;
4095 }
4096 }
4097
4098
4099
4100
4101 typedef struct
4102 {
4103 OrthancPluginImage* image;
4104 } _OrthancPluginFreeImage;
4105
4115 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeImage(
4116 OrthancPluginContext* context,
4117 OrthancPluginImage* image)
4118 {
4119 _OrthancPluginFreeImage params;
4120 params.image = image;
4121
4122 context->InvokeService(context, _OrthancPluginService_FreeImage, &params);
4123 }
4124
4125
4126
4127
4128 typedef struct
4129 {
4130 OrthancPluginMemoryBuffer* target;
4131 OrthancPluginImageFormat imageFormat;
4132 OrthancPluginPixelFormat pixelFormat;
4133 uint32_t width;
4134 uint32_t height;
4135 uint32_t pitch;
4136 const void* buffer;
4137 uint8_t quality;
4138 } _OrthancPluginCompressImage;
4139
4140
4160 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressPngImage(
4161 OrthancPluginContext* context,
4162 OrthancPluginMemoryBuffer* target,
4163 OrthancPluginPixelFormat format,
4164 uint32_t width,
4165 uint32_t height,
4166 uint32_t pitch,
4167 const void* buffer)
4168 {
4169 _OrthancPluginCompressImage params;
4170 memset(&params, 0, sizeof(params));
4171 params.target = target;
4172 params.imageFormat = OrthancPluginImageFormat_Png;
4173 params.pixelFormat = format;
4174 params.width = width;
4175 params.height = height;
4176 params.pitch = pitch;
4177 params.buffer = buffer;
4178 params.quality = 0; /* Unused for PNG */
4179
4180 return context->InvokeService(context, _OrthancPluginService_CompressImage, &params);
4181 }
4182
4183
4205 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressJpegImage(
4206 OrthancPluginContext* context,
4207 OrthancPluginMemoryBuffer* target,
4208 OrthancPluginPixelFormat format,
4209 uint32_t width,
4210 uint32_t height,
4211 uint32_t pitch,
4212 const void* buffer,
4213 uint8_t quality)
4214 {
4215 _OrthancPluginCompressImage params;
4216 memset(&params, 0, sizeof(params));
4217 params.target = target;
4218 params.imageFormat = OrthancPluginImageFormat_Jpeg;
4219 params.pixelFormat = format;
4220 params.width = width;
4221 params.height = height;
4222 params.pitch = pitch;
4223 params.buffer = buffer;
4224 params.quality = quality;
4225
4226 return context->InvokeService(context, _OrthancPluginService_CompressImage, &params);
4227 }
4228
4229
4230
4252 ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerJpegImage(
4253 OrthancPluginContext* context,
4254 OrthancPluginRestOutput* output,
4255 OrthancPluginPixelFormat format,
4256 uint32_t width,
4257 uint32_t height,
4258 uint32_t pitch,
4259 const void* buffer,
4260 uint8_t quality)
4261 {
4262 _OrthancPluginCompressAndAnswerImage params;
4263 params.output = output;
4264 params.imageFormat = OrthancPluginImageFormat_Jpeg;
4265 params.pixelFormat = format;
4266 params.width = width;
4267 params.height = height;
4268 params.pitch = pitch;
4269 params.buffer = buffer;
4270 params.quality = quality;
4271 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, &params);
4272 }
4273
4274
4275
4276
4277 typedef struct
4278 {
4279 OrthancPluginMemoryBuffer* target;
4280 OrthancPluginHttpMethod method;
4281 const char* url;
4282 const char* username;
4283 const char* password;
4284 const void* body;
4285 uint32_t bodySize;
4286 } _OrthancPluginCallHttpClient;
4287
4288
4305 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpGet(
4306 OrthancPluginContext* context,
4307 OrthancPluginMemoryBuffer* target,
4308 const char* url,
4309 const char* username,
4310 const char* password)
4311 {
4312 _OrthancPluginCallHttpClient params;
4313 memset(&params, 0, sizeof(params));
4314
4315 params.target = target;
4316 params.method = OrthancPluginHttpMethod_Get;
4317 params.url = url;
4318 params.username = username;
4319 params.password = password;
4320
4321 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
4322 }
4323
4324
4343 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPost(
4344 OrthancPluginContext* context,
4345 OrthancPluginMemoryBuffer* target,
4346 const char* url,
4347 const void* body,
4348 uint32_t bodySize,
4349 const char* username,
4350 const char* password)
4351 {
4352 _OrthancPluginCallHttpClient params;
4353 memset(&params, 0, sizeof(params));
4354
4355 params.target = target;
4356 params.method = OrthancPluginHttpMethod_Post;
4357 params.url = url;
4358 params.body = body;
4359 params.bodySize = bodySize;
4360 params.username = username;
4361 params.password = password;
4362
4363 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
4364 }
4365
4366
4385 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPut(
4386 OrthancPluginContext* context,
4387 OrthancPluginMemoryBuffer* target,
4388 const char* url,
4389 const void* body,
4390 uint32_t bodySize,
4391 const char* username,
4392 const char* password)
4393 {
4394 _OrthancPluginCallHttpClient params;
4395 memset(&params, 0, sizeof(params));
4396
4397 params.target = target;
4398 params.method = OrthancPluginHttpMethod_Put;
4399 params.url = url;
4400 params.body = body;
4401 params.bodySize = bodySize;
4402 params.username = username;
4403 params.password = password;
4404
4405 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
4406 }
4407
4408
4423 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpDelete(
4424 OrthancPluginContext* context,
4425 const char* url,
4426 const char* username,
4427 const char* password)
4428 {
4429 _OrthancPluginCallHttpClient params;
4430 memset(&params, 0, sizeof(params));
4431
4432 params.method = OrthancPluginHttpMethod_Delete;
4433 params.url = url;
4434 params.username = username;
4435 params.password = password;
4436
4437 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
4438 }
4439
4440
4441
4442 typedef struct
4443 {
4444 OrthancPluginImage** target;
4445 const OrthancPluginImage* source;
4446 OrthancPluginPixelFormat targetFormat;
4447 } _OrthancPluginConvertPixelFormat;
4448
4449
4461 ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginConvertPixelFormat(
4462 OrthancPluginContext* context,
4463 const OrthancPluginImage* source,
4464 OrthancPluginPixelFormat targetFormat)
4465 {
4466 OrthancPluginImage* target = NULL;
4467
4468 _OrthancPluginConvertPixelFormat params;
4469 params.target = &target;
4470 params.source = source;
4471 params.targetFormat = targetFormat;
4472
4473 if (context->InvokeService(context, _OrthancPluginService_ConvertPixelFormat, &params) != OrthancPluginErrorCode_Success)
4474 {
4475 return NULL;
4476 }
4477 else
4478 {
4479 return target;
4480 }
4481 }
4482
4483
4484
4496 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontsCount(
4497 OrthancPluginContext* context)
4498 {
4499 uint32_t count = 0;
4500
4501 _OrthancPluginReturnSingleValue params;
4502 memset(&params, 0, sizeof(params));
4503 params.resultUint32 = &count;
4504
4505 if (context->InvokeService(context, _OrthancPluginService_GetFontsCount, &params) != OrthancPluginErrorCode_Success)
4506 {
4507 /* Error */
4508 return 0;
4509 }
4510 else
4511 {
4512 return count;
4513 }
4514 }
4515
4516
4517
4518
4519 typedef struct
4520 {
4521 uint32_t fontIndex; /* in */
4522 const char** name; /* out */
4523 uint32_t* size; /* out */
4524 } _OrthancPluginGetFontInfo;
4525
4536 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetFontName(
4537 OrthancPluginContext* context,
4538 uint32_t fontIndex)
4539 {
4540 const char* result = NULL;
4541
4542 _OrthancPluginGetFontInfo params;
4543 memset(&params, 0, sizeof(params));
4544 params.name = &result;
4545 params.fontIndex = fontIndex;
4546
4547 if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, &params) != OrthancPluginErrorCode_Success)
4548 {
4549 return NULL;
4550 }
4551 else
4552 {
4553 return result;
4554 }
4555 }
4556
4557
4568 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontSize(
4569 OrthancPluginContext* context,
4570 uint32_t fontIndex)
4571 {
4572 uint32_t result;
4573
4574 _OrthancPluginGetFontInfo params;
4575 memset(&params, 0, sizeof(params));
4576 params.size = &result;
4577 params.fontIndex = fontIndex;
4578
4579 if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, &params) != OrthancPluginErrorCode_Success)
4580 {
4581 return 0;
4582 }
4583 else
4584 {
4585 return result;
4586 }
4587 }
4588
4589
4590
4591 typedef struct
4592 {
4593 OrthancPluginImage* image;
4594 uint32_t fontIndex;
4595 const char* utf8Text;
4596 int32_t x;
4597 int32_t y;
4598 uint8_t r;
4599 uint8_t g;
4600 uint8_t b;
4601 } _OrthancPluginDrawText;
4602
4603
4621 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginDrawText(
4622 OrthancPluginContext* context,
4623 OrthancPluginImage* image,
4624 uint32_t fontIndex,
4625 const char* utf8Text,
4626 int32_t x,
4627 int32_t y,
4628 uint8_t r,
4629 uint8_t g,
4630 uint8_t b)
4631 {
4632 _OrthancPluginDrawText params;
4633 memset(&params, 0, sizeof(params));
4634 params.image = image;
4635 params.fontIndex = fontIndex;
4636 params.utf8Text = utf8Text;
4637 params.x = x;
4638 params.y = y;
4639 params.r = r;
4640 params.g = g;
4641 params.b = b;
4642
4643 return context->InvokeService(context, _OrthancPluginService_DrawText, &params);
4644 }
4645
4646
4647
4648 typedef struct
4649 {
4650 OrthancPluginStorageArea* storageArea;
4651 const char* uuid;
4652 const void* content;
4653 uint64_t size;
4654 OrthancPluginContentType type;
4655 } _OrthancPluginStorageAreaCreate;
4656
4657
4675 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaCreate(
4676 OrthancPluginContext* context,
4677 OrthancPluginStorageArea* storageArea,
4678 const char* uuid,
4679 const void* content,
4680 uint64_t size,
4681 OrthancPluginContentType type)
4682 {
4683 _OrthancPluginStorageAreaCreate params;
4684 params.storageArea = storageArea;
4685 params.uuid = uuid;
4686 params.content = content;
4687 params.size = size;
4688 params.type = type;
4689
4690 return context->InvokeService(context, _OrthancPluginService_StorageAreaCreate, &params);
4691 }
4692
4693
4694 typedef struct
4695 {
4696 OrthancPluginMemoryBuffer* target;
4697 OrthancPluginStorageArea* storageArea;
4698 const char* uuid;
4699 OrthancPluginContentType type;
4700 } _OrthancPluginStorageAreaRead;
4701
4702
4719 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRead(
4720 OrthancPluginContext* context,
4721 OrthancPluginMemoryBuffer* target,
4722 OrthancPluginStorageArea* storageArea,
4723 const char* uuid,
4724 OrthancPluginContentType type)
4725 {
4726 _OrthancPluginStorageAreaRead params;
4727 params.target = target;
4728 params.storageArea = storageArea;
4729 params.uuid = uuid;
4730 params.type = type;
4731
4732 return context->InvokeService(context, _OrthancPluginService_StorageAreaRead, &params);
4733 }
4734
4735
4736 typedef struct
4737 {
4738 OrthancPluginStorageArea* storageArea;
4739 const char* uuid;
4740 OrthancPluginContentType type;
4741 } _OrthancPluginStorageAreaRemove;
4742
4758 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRemove(
4759 OrthancPluginContext* context,
4760 OrthancPluginStorageArea* storageArea,
4761 const char* uuid,
4762 OrthancPluginContentType type)
4763 {
4764 _OrthancPluginStorageAreaRemove params;
4765 params.storageArea = storageArea;
4766 params.uuid = uuid;
4767 params.type = type;
4768
4769 return context->InvokeService(context, _OrthancPluginService_StorageAreaRemove, &params);
4770 }
4771
4772
4773
4774 typedef struct
4775 {
4776 OrthancPluginErrorCode* target;
4777 int32_t code;
4778 uint16_t httpStatus;
4779 const char* message;
4780 } _OrthancPluginRegisterErrorCode;
4781
4797 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterErrorCode(
4798 OrthancPluginContext* context,
4799 int32_t code,
4800 uint16_t httpStatus,
4801 const char* message)
4802 {
4803 OrthancPluginErrorCode target;
4804
4805 _OrthancPluginRegisterErrorCode params;
4806 params.target = &target;
4807 params.code = code;
4808 params.httpStatus = httpStatus;
4809 params.message = message;
4810
4811 if (context->InvokeService(context, _OrthancPluginService_RegisterErrorCode, &params) == OrthancPluginErrorCode_Success)
4812 {
4813 return target;
4814 }
4815 else
4816 {
4817 /* There was an error while assigned the error. Use a generic code. */
4818 return OrthancPluginErrorCode_Plugin;
4819 }
4820 }
4821
4822
4823
4824 typedef struct
4825 {
4826 uint16_t group;
4827 uint16_t element;
4828 OrthancPluginValueRepresentation vr;
4829 const char* name;
4830 uint32_t minMultiplicity;
4831 uint32_t maxMultiplicity;
4832 } _OrthancPluginRegisterDictionaryTag;
4833
4853 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterDictionaryTag(
4854 OrthancPluginContext* context,
4855 uint16_t group,
4856 uint16_t element,
4857 OrthancPluginValueRepresentation vr,
4858 const char* name,
4859 uint32_t minMultiplicity,
4860 uint32_t maxMultiplicity)
4861 {
4862 _OrthancPluginRegisterDictionaryTag params;
4863 params.group = group;
4864 params.element = element;
4865 params.vr = vr;
4866 params.name = name;
4867 params.minMultiplicity = minMultiplicity;
4868 params.maxMultiplicity = maxMultiplicity;
4869
4870 return context->InvokeService(context, _OrthancPluginService_RegisterDictionaryTag, &params);
4871 }
4872
4873
4874
4875 typedef struct
4876 {
4877 uint16_t group;
4878 uint16_t element;
4879 OrthancPluginValueRepresentation vr;
4880 const char* name;
4881 uint32_t minMultiplicity;
4882 uint32_t maxMultiplicity;
4883 const char* privateCreator;
4884 } _OrthancPluginRegisterPrivateDictionaryTag;
4885
4906 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterPrivateDictionaryTag(
4907 OrthancPluginContext* context,
4908 uint16_t group,
4909 uint16_t element,
4910 OrthancPluginValueRepresentation vr,
4911 const char* name,
4912 uint32_t minMultiplicity,
4913 uint32_t maxMultiplicity,
4914 const char* privateCreator)
4915 {
4916 _OrthancPluginRegisterPrivateDictionaryTag params;
4917 params.group = group;
4918 params.element = element;
4919 params.vr = vr;
4920 params.name = name;
4921 params.minMultiplicity = minMultiplicity;
4922 params.maxMultiplicity = maxMultiplicity;
4923 params.privateCreator = privateCreator;
4924
4925 return context->InvokeService(context, _OrthancPluginService_RegisterPrivateDictionaryTag, &params);
4926 }
4927
4928
4929
4930 typedef struct
4931 {
4932 OrthancPluginStorageArea* storageArea;
4933 OrthancPluginResourceType level;
4934 } _OrthancPluginReconstructMainDicomTags;
4935
4950 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags(
4951 OrthancPluginContext* context,
4952 OrthancPluginStorageArea* storageArea,
4953 OrthancPluginResourceType level)
4954 {
4955 _OrthancPluginReconstructMainDicomTags params;
4956 params.level = level;
4957 params.storageArea = storageArea;
4958
4959 return context->InvokeService(context, _OrthancPluginService_ReconstructMainDicomTags, &params);
4960 }
4961
4962
4963 typedef struct
4964 {
4965 char** result;
4966 const char* instanceId;
4967 const void* buffer;
4968 uint32_t size;
4969 OrthancPluginDicomToJsonFormat format;
4970 OrthancPluginDicomToJsonFlags flags;
4971 uint32_t maxStringLength;
4972 } _OrthancPluginDicomToJson;
4973
4974
4994 ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomBufferToJson(
4995 OrthancPluginContext* context,
4996 const void* buffer,
4997 uint32_t size,
4998 OrthancPluginDicomToJsonFormat format,
4999 OrthancPluginDicomToJsonFlags flags,
5000 uint32_t maxStringLength)
5001 {
5002 char* result;
5003
5004 _OrthancPluginDicomToJson params;
5005 memset(&params, 0, sizeof(params));
5006 params.result = &result;
5007 params.buffer = buffer;
5008 params.size = size;
5009 params.format = format;
5010 params.flags = flags;
5011 params.maxStringLength = maxStringLength;
5012
5013 if (context->InvokeService(context, _OrthancPluginService_DicomBufferToJson, &params) != OrthancPluginErrorCode_Success)
5014 {
5015 /* Error */
5016 return NULL;
5017 }
5018 else
5019 {
5020 return result;
5021 }
5022 }
5023
5024
5043 ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomInstanceToJson(
5044 OrthancPluginContext* context,
5045 const char* instanceId,
5046 OrthancPluginDicomToJsonFormat format,
5047 OrthancPluginDicomToJsonFlags flags,
5048 uint32_t maxStringLength)
5049 {
5050 char* result;
5051
5052 _OrthancPluginDicomToJson params;
5053 memset(&params, 0, sizeof(params));
5054 params.result = &result;
5055 params.instanceId = instanceId;
5056 params.format = format;
5057 params.flags = flags;
5058 params.maxStringLength = maxStringLength;
5059
5060 if (context->InvokeService(context, _OrthancPluginService_DicomInstanceToJson, &params) != OrthancPluginErrorCode_Success)
5061 {
5062 /* Error */
5063 return NULL;
5064 }
5065 else
5066 {
5067 return result;
5068 }
5069 }
5070
5071
5072 typedef struct
5073 {
5074 OrthancPluginMemoryBuffer* target;
5075 const char* uri;
5076 uint32_t headersCount;
5077 const char* const* headersKeys;
5078 const char* const* headersValues;
5079 int32_t afterPlugins;
5080 } _OrthancPluginRestApiGet2;
5081
5101 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGet2(
5102 OrthancPluginContext* context,
5103 OrthancPluginMemoryBuffer* target,
5104 const char* uri,
5105 uint32_t headersCount,
5106 const char* const* headersKeys,
5107 const char* const* headersValues,
5108 int32_t afterPlugins)
5109 {
5110 _OrthancPluginRestApiGet2 params;
5111 params.target = target;
5112 params.uri = uri;
5113 params.headersCount = headersCount;
5114 params.headersKeys = headersKeys;
5115 params.headersValues = headersValues;
5116 params.afterPlugins = afterPlugins;
5117
5118 return context->InvokeService(context, _OrthancPluginService_RestApiGet2, &params);
5119 }
5120
5121
5122
5123 typedef struct
5124 {
5125 OrthancPluginWorklistCallback callback;
5126 } _OrthancPluginWorklistCallback;
5127
5139 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterWorklistCallback(
5140 OrthancPluginContext* context,
5141 OrthancPluginWorklistCallback callback)
5142 {
5143 _OrthancPluginWorklistCallback params;
5144 params.callback = callback;
5145
5146 return context->InvokeService(context, _OrthancPluginService_RegisterWorklistCallback, &params);
5147 }
5148
5149
5150
5151 typedef struct
5152 {
5153 OrthancPluginWorklistAnswers* answers;
5154 const OrthancPluginWorklistQuery* query;
5155 const void* dicom;
5156 uint32_t size;
5157 } _OrthancPluginWorklistAnswersOperation;
5158
5175 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistAddAnswer(
5176 OrthancPluginContext* context,
5177 OrthancPluginWorklistAnswers* answers,
5178 const OrthancPluginWorklistQuery* query,
5179 const void* dicom,
5180 uint32_t size)
5181 {
5182 _OrthancPluginWorklistAnswersOperation params;
5183 params.answers = answers;
5184 params.query = query;
5185 params.dicom = dicom;
5186 params.size = size;
5187
5188 return context->InvokeService(context, _OrthancPluginService_WorklistAddAnswer, &params);
5189 }
5190
5191
5205 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistMarkIncomplete(
5206 OrthancPluginContext* context,
5207 OrthancPluginWorklistAnswers* answers)
5208 {
5209 _OrthancPluginWorklistAnswersOperation params;
5210 params.answers = answers;
5211 params.query = NULL;
5212 params.dicom = NULL;
5213 params.size = 0;
5214
5215 return context->InvokeService(context, _OrthancPluginService_WorklistMarkIncomplete, &params);
5216 }
5217
5218
5219 typedef struct
5220 {
5221 const OrthancPluginWorklistQuery* query;
5222 const void* dicom;
5223 uint32_t size;
5224 int32_t* isMatch;
5225 OrthancPluginMemoryBuffer* target;
5226 } _OrthancPluginWorklistQueryOperation;
5227
5243 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginWorklistIsMatch(
5244 OrthancPluginContext* context,
5245 const OrthancPluginWorklistQuery* query,
5246 const void* dicom,
5247 uint32_t size)
5248 {
5249 int32_t isMatch = 0;
5250
5251 _OrthancPluginWorklistQueryOperation params;
5252 params.query = query;
5253 params.dicom = dicom;
5254 params.size = size;
5255 params.isMatch = &isMatch;
5256 params.target = NULL;
5257
5258 if (context->InvokeService(context, _OrthancPluginService_WorklistIsMatch, &params) == OrthancPluginErrorCode_Success)
5259 {
5260 return isMatch;
5261 }
5262 else
5263 {
5264 /* Error: Assume non-match */
5265 return 0;
5266 }
5267 }
5268
5269
5282 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistGetDicomQuery(
5283 OrthancPluginContext* context,
5284 OrthancPluginMemoryBuffer* target,
5285 const OrthancPluginWorklistQuery* query)
5286 {
5287 _OrthancPluginWorklistQueryOperation params;
5288 params.query = query;
5289 params.dicom = NULL;
5290 params.size = 0;
5291 params.isMatch = NULL;
5292 params.target = target;
5293
5294 return context->InvokeService(context, _OrthancPluginService_WorklistGetDicomQuery, &params);
5295 }
5296
5297
5308 ORTHANC_PLUGIN_INLINE OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin(
5309 OrthancPluginContext* context,
5310 const OrthancPluginDicomInstance* instance)
5311 {
5312 OrthancPluginInstanceOrigin origin;
5313
5314 _OrthancPluginAccessDicomInstance params;
5315 memset(&params, 0, sizeof(params));
5316 params.resultOrigin = &origin;
5317 params.instance = instance;
5318
5319 if (context->InvokeService(context, _OrthancPluginService_GetInstanceOrigin, &params) != OrthancPluginErrorCode_Success)
5320 {
5321 /* Error */
5322 return OrthancPluginInstanceOrigin_Unknown;
5323 }
5324 else
5325 {
5326 return origin;
5327 }
5328 }
5329
5330
5331 typedef struct
5332 {
5333 OrthancPluginMemoryBuffer* target;
5334 const char* json;
5335 const OrthancPluginImage* pixelData;
5336 OrthancPluginCreateDicomFlags flags;
5337 } _OrthancPluginCreateDicom;
5338
5364 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateDicom(
5365 OrthancPluginContext* context,
5366 OrthancPluginMemoryBuffer* target,
5367 const char* json,
5368 const OrthancPluginImage* pixelData,
5369 OrthancPluginCreateDicomFlags flags)
5370 {
5371 _OrthancPluginCreateDicom params;
5372 params.target = target;
5373 params.json = json;
5374 params.pixelData = pixelData;
5375 params.flags = flags;
5376
5377 return context->InvokeService(context, _OrthancPluginService_CreateDicom, &params);
5378 }
5379
5380
5381 typedef struct
5382 {
5383 OrthancPluginDecodeImageCallback callback;
5384 } _OrthancPluginDecodeImageCallback;
5385
5400 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterDecodeImageCallback(
5401 OrthancPluginContext* context,
5402 OrthancPluginDecodeImageCallback callback)
5403 {
5404 _OrthancPluginDecodeImageCallback params;
5405 params.callback = callback;
5406
5407 return context->InvokeService(context, _OrthancPluginService_RegisterDecodeImageCallback, &params);
5408 }
5409
5410
5411
5412 typedef struct
5413 {
5414 OrthancPluginImage** target;
5415 OrthancPluginPixelFormat format;
5416 uint32_t width;
5417 uint32_t height;
5418 uint32_t pitch;
5419 void* buffer;
5420 const void* constBuffer;
5421 uint32_t bufferSize;
5422 uint32_t frameIndex;
5423 } _OrthancPluginCreateImage;
5424
5425
5438 ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginCreateImage(
5439 OrthancPluginContext* context,
5440 OrthancPluginPixelFormat format,
5441 uint32_t width,
5442 uint32_t height)
5443 {
5444 OrthancPluginImage* target = NULL;
5445
5446 _OrthancPluginCreateImage params;
5447 memset(&params, 0, sizeof(params));
5448 params.target = &target;
5449 params.format = format;
5450 params.width = width;
5451 params.height = height;
5452
5453 if (context->InvokeService(context, _OrthancPluginService_CreateImage, &params) != OrthancPluginErrorCode_Success)
5454 {
5455 return NULL;
5456 }
5457 else
5458 {
5459 return target;
5460 }
5461 }
5462
5463
5481 ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginCreateImageAccessor(
5482 OrthancPluginContext* context,
5483 OrthancPluginPixelFormat format,
5484 uint32_t width,
5485 uint32_t height,
5486 uint32_t pitch,
5487 void* buffer)
5488 {
5489 OrthancPluginImage* target = NULL;
5490
5491 _OrthancPluginCreateImage params;
5492 memset(&params, 0, sizeof(params));
5493 params.target = &target;
5494 params.format = format;
5495 params.width = width;
5496 params.height = height;
5497 params.pitch = pitch;
5498 params.buffer = buffer;
5499
5500 if (context->InvokeService(context, _OrthancPluginService_CreateImageAccessor, &params) != OrthancPluginErrorCode_Success)
5501 {
5502 return NULL;
5503 }
5504 else
5505 {
5506 return target;
5507 }
5508 }
5509
5510
5511
5527 ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginDecodeDicomImage(
5528 OrthancPluginContext* context,
5529 const void* buffer,
5530 uint32_t bufferSize,
5531 uint32_t frameIndex)
5532 {
5533 OrthancPluginImage* target = NULL;
5534
5535 _OrthancPluginCreateImage params;
5536 memset(&params, 0, sizeof(params));
5537 params.target = &target;
5538 params.constBuffer = buffer;
5539 params.bufferSize = bufferSize;
5540 params.frameIndex = frameIndex;
5541
5542 if (context->InvokeService(context, _OrthancPluginService_DecodeDicomImage, &params) != OrthancPluginErrorCode_Success)
5543 {
5544 return NULL;
5545 }
5546 else
5547 {
5548 return target;
5549 }
5550 }
5551
5552
5553
5554 typedef struct
5555 {
5556 char** result;
5557 const void* buffer;
5558 uint32_t size;
5559 } _OrthancPluginComputeHash;
5560
5573 ORTHANC_PLUGIN_INLINE char* OrthancPluginComputeMd5(
5574 OrthancPluginContext* context,
5575 const void* buffer,
5576 uint32_t size)
5577 {
5578 char* result;
5579
5580 _OrthancPluginComputeHash params;
5581 params.result = &result;
5582 params.buffer = buffer;
5583 params.size = size;
5584
5585 if (context->InvokeService(context, _OrthancPluginService_ComputeMd5, &params) != OrthancPluginErrorCode_Success)
5586 {
5587 /* Error */
5588 return NULL;
5589 }
5590 else
5591 {
5592 return result;
5593 }
5594 }
5595
5596
5609 ORTHANC_PLUGIN_INLINE char* OrthancPluginComputeSha1(
5610 OrthancPluginContext* context,
5611 const void* buffer,
5612 uint32_t size)
5613 {
5614 char* result;
5615
5616 _OrthancPluginComputeHash params;
5617 params.result = &result;
5618 params.buffer = buffer;
5619 params.size = size;
5620
5621 if (context->InvokeService(context, _OrthancPluginService_ComputeSha1, &params) != OrthancPluginErrorCode_Success)
5622 {
5623 /* Error */
5624 return NULL;
5625 }
5626 else
5627 {
5628 return result;
5629 }
5630 }
5631
5632
5633
5634 typedef struct
5635 {
5636 OrthancPluginDictionaryEntry* target;
5637 const char* name;
5638 } _OrthancPluginLookupDictionary;
5639
5655 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginLookupDictionary(
5656 OrthancPluginContext* context,
5657 OrthancPluginDictionaryEntry* target,
5658 const char* name)
5659 {
5660 _OrthancPluginLookupDictionary params;
5661 params.target = target;
5662 params.name = name;
5663 return context->InvokeService(context, _OrthancPluginService_LookupDictionary, &params);
5664 }
5665
5666
5667
5668 typedef struct
5669 {
5670 OrthancPluginRestOutput* output;
5671 const void* answer;
5672 uint32_t answerSize;
5673 uint32_t headersCount;
5674 const char* const* headersKeys;
5675 const char* const* headersValues;
5676 } _OrthancPluginSendMultipartItem2;
5677
5698 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSendMultipartItem2(
5699 OrthancPluginContext* context,
5700 OrthancPluginRestOutput* output,
5701 const void* answer,
5702 uint32_t answerSize,
5703 uint32_t headersCount,
5704 const char* const* headersKeys,
5705 const char* const* headersValues)
5706 {
5707 _OrthancPluginSendMultipartItem2 params;
5708 params.output = output;
5709 params.answer = answer;
5710 params.answerSize = answerSize;
5711 params.headersCount = headersCount;
5712 params.headersKeys = headersKeys;
5713 params.headersValues = headersValues;
5714
5715 return context->InvokeService(context, _OrthancPluginService_SendMultipartItem2, &params);
5716 }
5717
5718
5719 typedef struct
5720 {
5721 OrthancPluginIncomingHttpRequestFilter callback;
5722 } _OrthancPluginIncomingHttpRequestFilter;
5723
5736 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter(
5737 OrthancPluginContext* context,
5738 OrthancPluginIncomingHttpRequestFilter callback)
5739 {
5740 _OrthancPluginIncomingHttpRequestFilter params;
5741 params.callback = callback;
5742
5743 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter, &params);
5744 }
5745
5746
5747
5748 typedef struct
5749 {
5750 OrthancPluginMemoryBuffer* answerBody;
5751 OrthancPluginMemoryBuffer* answerHeaders;
5752 uint16_t* httpStatus;
5753 OrthancPluginHttpMethod method;
5754 const char* url;
5755 uint32_t headersCount;
5756 const char* const* headersKeys;
5757 const char* const* headersValues;
5758 const void* body;
5759 uint32_t bodySize;
5760 const char* username;
5761 const char* password;
5762 uint32_t timeout;
5763 const char* certificateFile;
5764 const char* certificateKeyFile;
5765 const char* certificateKeyPassword;
5766 uint8_t pkcs11;
5767 } _OrthancPluginCallHttpClient2;
5768
5769
5770
5811 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpClient(
5812 OrthancPluginContext* context,
5813 OrthancPluginMemoryBuffer* answerBody,
5814 OrthancPluginMemoryBuffer* answerHeaders,
5815 uint16_t* httpStatus,
5816 OrthancPluginHttpMethod method,
5817 const char* url,
5818 uint32_t headersCount,
5819 const char* const* headersKeys,
5820 const char* const* headersValues,
5821 const void* body,
5822 uint32_t bodySize,
5823 const char* username,
5824 const char* password,
5825 uint32_t timeout,
5826 const char* certificateFile,
5827 const char* certificateKeyFile,
5828 const char* certificateKeyPassword,
5829 uint8_t pkcs11)
5830 {
5831 _OrthancPluginCallHttpClient2 params;
5832 memset(&params, 0, sizeof(params));
5833
5834 params.answerBody = answerBody;
5835 params.answerHeaders = answerHeaders;
5836 params.httpStatus = httpStatus;
5837 params.method = method;
5838 params.url = url;
5839 params.headersCount = headersCount;
5840 params.headersKeys = headersKeys;
5841 params.headersValues = headersValues;
5842 params.body = body;
5843 params.bodySize = bodySize;
5844 params.username = username;
5845 params.password = password;
5846 params.timeout = timeout;
5847 params.certificateFile = certificateFile;
5848 params.certificateKeyFile = certificateKeyFile;
5849 params.certificateKeyPassword = certificateKeyPassword;
5850 params.pkcs11 = pkcs11;
5851
5852 return context->InvokeService(context, _OrthancPluginService_CallHttpClient2, &params);
5853 }
5854
5855
5866 ORTHANC_PLUGIN_INLINE char* OrthancPluginGenerateUuid(
5867 OrthancPluginContext* context)
5868 {
5869 char* result;
5870
5871 _OrthancPluginRetrieveDynamicString params;
5872 params.result = &result;
5873 params.argument = NULL;
5874
5875 if (context->InvokeService(context, _OrthancPluginService_GenerateUuid, &params) != OrthancPluginErrorCode_Success)
5876 {
5877 /* Error */
5878 return NULL;
5879 }
5880 else
5881 {
5882 return result;
5883 }
5884 }
5885
5886
5887
5888
5889 typedef struct
5890 {
5891 OrthancPluginFindCallback callback;
5892 } _OrthancPluginFindCallback;
5893
5905 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterFindCallback(
5906 OrthancPluginContext* context,
5907 OrthancPluginFindCallback callback)
5908 {
5909 _OrthancPluginFindCallback params;
5910 params.callback = callback;
5911
5912 return context->InvokeService(context, _OrthancPluginService_RegisterFindCallback, &params);
5913 }
5914
5915
5916 typedef struct
5917 {
5918 OrthancPluginFindAnswers *answers;
5919 const OrthancPluginFindQuery *query;
5920 const void *dicom;
5921 uint32_t size;
5922 uint32_t index;
5923 uint32_t *resultUint32;
5924 uint16_t *resultGroup;
5925 uint16_t *resultElement;
5926 char **resultString;
5927 } _OrthancPluginFindOperation;
5928
5944 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginFindAddAnswer(
5945 OrthancPluginContext* context,
5946 OrthancPluginFindAnswers* answers,
5947 const void* dicom,
5948 uint32_t size)
5949 {
5950 _OrthancPluginFindOperation params;
5951 memset(&params, 0, sizeof(params));
5952 params.answers = answers;
5953 params.dicom = dicom;
5954 params.size = size;
5955
5956 return context->InvokeService(context, _OrthancPluginService_FindAddAnswer, &params);
5957 }
5958
5959
5973 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginFindMarkIncomplete(
5974 OrthancPluginContext* context,
5975 OrthancPluginFindAnswers* answers)
5976 {
5977 _OrthancPluginFindOperation params;
5978 memset(&params, 0, sizeof(params));
5979 params.answers = answers;
5980
5981 return context->InvokeService(context, _OrthancPluginService_FindMarkIncomplete, &params);
5982 }
5983
5984
5985
5997 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFindQuerySize(
5998 OrthancPluginContext* context,
5999 const OrthancPluginFindQuery* query)
6000 {
6001 uint32_t count = 0;
6002
6003 _OrthancPluginFindOperation params;
6004 memset(&params, 0, sizeof(params));
6005 params.query = query;
6006 params.resultUint32 = &count;
6007
6008 if (context->InvokeService(context, _OrthancPluginService_GetFindQuerySize, &params) != OrthancPluginErrorCode_Success)
6009 {
6010 /* Error */
6011 return 0;
6012 }
6013 else
6014 {
6015 return count;
6016 }
6017 }
6018
6019
6034 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetFindQueryTag(
6035 OrthancPluginContext* context,
6036 uint16_t* group,
6037 uint16_t* element,
6038 const OrthancPluginFindQuery* query,
6039 uint32_t index)
6040 {
6041 _OrthancPluginFindOperation params;
6042 memset(&params, 0, sizeof(params));
6043 params.query = query;
6044 params.index = index;
6045 params.resultGroup = group;
6046 params.resultElement = element;
6047
6048 return context->InvokeService(context, _OrthancPluginService_GetFindQueryTag, &params);
6049 }
6050
6051
6065 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetFindQueryTagName(
6066 OrthancPluginContext* context,
6067 const OrthancPluginFindQuery* query,
6068 uint32_t index)
6069 {
6070 char* result;
6071
6072 _OrthancPluginFindOperation params;
6073 memset(&params, 0, sizeof(params));
6074 params.query = query;
6075 params.index = index;
6076 params.resultString = &result;
6077
6078 if (context->InvokeService(context, _OrthancPluginService_GetFindQueryTagName, &params) != OrthancPluginErrorCode_Success)
6079 {
6080 /* Error */
6081 return NULL;
6082 }
6083 else
6084 {
6085 return result;
6086 }
6087 }
6088
6089
6103 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetFindQueryValue(
6104 OrthancPluginContext* context,
6105 const OrthancPluginFindQuery* query,
6106 uint32_t index)
6107 {
6108 char* result;
6109
6110 _OrthancPluginFindOperation params;
6111 memset(&params, 0, sizeof(params));
6112 params.query = query;
6113 params.index = index;
6114 params.resultString = &result;
6115
6116 if (context->InvokeService(context, _OrthancPluginService_GetFindQueryValue, &params) != OrthancPluginErrorCode_Success)
6117 {
6118 /* Error */
6119 return NULL;
6120 }
6121 else
6122 {
6123 return result;
6124 }
6125 }
6126
6127
6128
6129
6130 typedef struct
6131 {
6132 OrthancPluginMoveCallback callback;
6133 OrthancPluginGetMoveSize getMoveSize;
6134 OrthancPluginApplyMove applyMove;
6135 OrthancPluginFreeMove freeMove;
6136 } _OrthancPluginMoveCallback;
6137
6151 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterMoveCallback(
6152 OrthancPluginContext* context,
6153 OrthancPluginMoveCallback callback,
6154 OrthancPluginGetMoveSize getMoveSize,
6155 OrthancPluginApplyMove applyMove,
6156 OrthancPluginFreeMove freeMove)
6157 {
6158 _OrthancPluginMoveCallback params;
6159 params.callback = callback;
6160 params.getMoveSize = getMoveSize;
6161 params.applyMove = applyMove;
6162 params.freeMove = freeMove;
6163
6164 return context->InvokeService(context, _OrthancPluginService_RegisterMoveCallback, &params);
6165 }
6166
6167
6168
6169 typedef struct
6170 {
6171 OrthancPluginFindMatcher** target;
6172 const void* query;
6173 uint32_t size;
6174 } _OrthancPluginCreateFindMatcher;
6175
6176
6190 ORTHANC_PLUGIN_INLINE OrthancPluginFindMatcher* OrthancPluginCreateFindMatcher(
6191 OrthancPluginContext* context,
6192 const void* query,
6193 uint32_t size)
6194 {
6195 OrthancPluginFindMatcher* target = NULL;
6196
6197 _OrthancPluginCreateFindMatcher params;
6198 memset(&params, 0, sizeof(params));
6199 params.target = &target;
6200 params.query = query;
6201 params.size = size;
6202
6203 if (context->InvokeService(context, _OrthancPluginService_CreateFindMatcher, &params) != OrthancPluginErrorCode_Success)
6204 {
6205 return NULL;
6206 }
6207 else
6208 {
6209 return target;
6210 }
6211 }
6212
6213
6214 typedef struct
6215 {
6216 OrthancPluginFindMatcher* matcher;
6217 } _OrthancPluginFreeFindMatcher;
6218
6228 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeFindMatcher(
6229 OrthancPluginContext* context,
6230 OrthancPluginFindMatcher* matcher)
6231 {
6232 _OrthancPluginFreeFindMatcher params;
6233 params.matcher = matcher;
6234
6235 context->InvokeService(context, _OrthancPluginService_FreeFindMatcher, &params);
6236 }
6237
6238
6239 typedef struct
6240 {
6241 const OrthancPluginFindMatcher* matcher;
6242 const void* dicom;
6243 uint32_t size;
6244 int32_t* isMatch;
6245 } _OrthancPluginFindMatcherIsMatch;
6246
6261 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginFindMatcherIsMatch(
6262 OrthancPluginContext* context,
6263 const OrthancPluginFindMatcher* matcher,
6264 const void* dicom,
6265 uint32_t size)
6266 {
6267 int32_t isMatch = 0;
6268
6269 _OrthancPluginFindMatcherIsMatch params;
6270 params.matcher = matcher;
6271 params.dicom = dicom;
6272 params.size = size;
6273 params.isMatch = &isMatch;
6274
6275 if (context->InvokeService(context, _OrthancPluginService_FindMatcherIsMatch, &params) == OrthancPluginErrorCode_Success)
6276 {
6277 return isMatch;
6278 }
6279 else
6280 {
6281 /* Error: Assume non-match */
6282 return 0;
6283 }
6284 }
6285
6286
6287 typedef struct
6288 {
6289 OrthancPluginIncomingHttpRequestFilter2 callback;
6290 } _OrthancPluginIncomingHttpRequestFilter2;
6291
6303 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter2(
6304 OrthancPluginContext* context,
6305 OrthancPluginIncomingHttpRequestFilter2 callback)
6306 {
6307 _OrthancPluginIncomingHttpRequestFilter2 params;
6308 params.callback = callback;
6309
6310 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter2, &params);
6311 }
6312
6313
6314
6315 typedef struct
6316 {
6317 OrthancPluginPeers** peers;
6318 } _OrthancPluginGetPeers;
6319
6331 ORTHANC_PLUGIN_INLINE OrthancPluginPeers* OrthancPluginGetPeers(
6332 OrthancPluginContext* context)
6333 {
6334 OrthancPluginPeers* peers = NULL;
6335
6336 _OrthancPluginGetPeers params;
6337 memset(&params, 0, sizeof(params));
6338 params.peers = &peers;
6339
6340 if (context->InvokeService(context, _OrthancPluginService_GetPeers, &params) != OrthancPluginErrorCode_Success)
6341 {
6342 return NULL;
6343 }
6344 else
6345 {
6346 return peers;
6347 }
6348 }
6349
6350
6351 typedef struct
6352 {
6353 OrthancPluginPeers* peers;
6354 } _OrthancPluginFreePeers;
6355
6365 ORTHANC_PLUGIN_INLINE void OrthancPluginFreePeers(
6366 OrthancPluginContext* context,
6367 OrthancPluginPeers* peers)
6368 {
6369 _OrthancPluginFreePeers params;
6370 params.peers = peers;
6371
6372 context->InvokeService(context, _OrthancPluginService_FreePeers, &params);
6373 }
6374
6375
6376 typedef struct
6377 {
6378 uint32_t* target;
6379 const OrthancPluginPeers* peers;
6380 } _OrthancPluginGetPeersCount;
6381
6395 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetPeersCount(
6396 OrthancPluginContext* context,
6397 const OrthancPluginPeers* peers)
6398 {
6399 uint32_t target = 0;
6400
6401 _OrthancPluginGetPeersCount params;
6402 memset(&params, 0, sizeof(params));
6403 params.target = &target;
6404 params.peers = peers;
6405
6406 if (context->InvokeService(context, _OrthancPluginService_GetPeersCount, &params) != OrthancPluginErrorCode_Success)
6407 {
6408 /* Error */
6409 return 0;
6410 }
6411 else
6412 {
6413 return target;
6414 }
6415 }
6416
6417
6418 typedef struct
6419 {
6420 const char** target;
6421 const OrthancPluginPeers* peers;
6422 uint32_t peerIndex;
6423 const char* userProperty;
6424 } _OrthancPluginGetPeerProperty;
6425
6443 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerName(
6444 OrthancPluginContext* context,
6445 const OrthancPluginPeers* peers,
6446 uint32_t peerIndex)
6447 {
6448 const char* target = NULL;
6449
6450 _OrthancPluginGetPeerProperty params;
6451 memset(&params, 0, sizeof(params));
6452 params.target = &target;
6453 params.peers = peers;
6454 params.peerIndex = peerIndex;
6455 params.userProperty = NULL;
6456
6457 if (context->InvokeService(context, _OrthancPluginService_GetPeerName, &params) != OrthancPluginErrorCode_Success)
6458 {
6459 /* Error */
6460 return NULL;
6461 }
6462 else
6463 {
6464 return target;
6465 }
6466 }
6467
6468
6484 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerUrl(
6485 OrthancPluginContext* context,
6486 const OrthancPluginPeers* peers,
6487 uint32_t peerIndex)
6488 {
6489 const char* target = NULL;
6490
6491 _OrthancPluginGetPeerProperty params;
6492 memset(&params, 0, sizeof(params));
6493 params.target = &target;
6494 params.peers = peers;
6495 params.peerIndex = peerIndex;
6496 params.userProperty = NULL;
6497
6498 if (context->InvokeService(context, _OrthancPluginService_GetPeerUrl, &params) != OrthancPluginErrorCode_Success)
6499 {
6500 /* Error */
6501 return NULL;
6502 }
6503 else
6504 {
6505 return target;
6506 }
6507 }
6508
6509
6510
6530 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerUserProperty(
6531 OrthancPluginContext* context,
6532 const OrthancPluginPeers* peers,
6533 uint32_t peerIndex,
6534 const char* userProperty)
6535 {
6536 const char* target = NULL;
6537
6538 _OrthancPluginGetPeerProperty params;
6539 memset(&params, 0, sizeof(params));
6540 params.target = &target;
6541 params.peers = peers;
6542 params.peerIndex = peerIndex;
6543 params.userProperty = userProperty;
6544
6545 if (context->InvokeService(context, _OrthancPluginService_GetPeerUserProperty, &params) != OrthancPluginErrorCode_Success)
6546 {
6547 /* No such user property */
6548 return NULL;
6549 }
6550 else
6551 {
6552 return target;
6553 }
6554 }
6555
6556
6557
6558 typedef struct
6559 {
6560 OrthancPluginMemoryBuffer* answerBody;
6561 OrthancPluginMemoryBuffer* answerHeaders;
6562 uint16_t* httpStatus;
6563 const OrthancPluginPeers* peers;
6564 uint32_t peerIndex;
6565 OrthancPluginHttpMethod method;
6566 const char* uri;
6567 uint32_t additionalHeadersCount;
6568 const char* const* additionalHeadersKeys;
6569 const char* const* additionalHeadersValues;
6570 const void* body;
6571 uint32_t bodySize;
6572 uint32_t timeout;
6573 } _OrthancPluginCallPeerApi;
6574
6611 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCallPeerApi(
6612 OrthancPluginContext* context,
6613 OrthancPluginMemoryBuffer* answerBody,
6614 OrthancPluginMemoryBuffer* answerHeaders,
6615 uint16_t* httpStatus,
6616 const OrthancPluginPeers* peers,
6617 uint32_t peerIndex,
6618 OrthancPluginHttpMethod method,
6619 const char* uri,
6620 uint32_t additionalHeadersCount,
6621 const char* const* additionalHeadersKeys,
6622 const char* const* additionalHeadersValues,
6623 const void* body,
6624 uint32_t bodySize,
6625 uint32_t timeout)
6626 {
6627 _OrthancPluginCallPeerApi params;
6628 memset(&params, 0, sizeof(params));
6629
6630 params.answerBody = answerBody;
6631 params.answerHeaders = answerHeaders;
6632 params.httpStatus = httpStatus;
6633 params.peers = peers;
6634 params.peerIndex = peerIndex;
6635 params.method = method;
6636 params.uri = uri;
6637 params.additionalHeadersCount = additionalHeadersCount;
6638 params.additionalHeadersKeys = additionalHeadersKeys;
6639 params.additionalHeadersValues = additionalHeadersValues;
6640 params.body = body;
6641 params.bodySize = bodySize;
6642 params.timeout = timeout;
6643
6644 return context->InvokeService(context, _OrthancPluginService_CallPeerApi, &params);
6645 }
6646
6647
6648
6649
6650
6651 typedef struct
6652 {
6653 OrthancPluginJob** target;
6654 void *job;
6655 OrthancPluginJobFinalize finalize;
6656 const char *type;
6657 OrthancPluginJobGetProgress getProgress;
6658 OrthancPluginJobGetContent getContent;
6659 OrthancPluginJobGetSerialized getSerialized;
6660 OrthancPluginJobStep step;
6661 OrthancPluginJobStop stop;
6662 OrthancPluginJobReset reset;
6663 } _OrthancPluginCreateJob;
6664
6696 ORTHANC_PLUGIN_INLINE OrthancPluginJob *OrthancPluginCreateJob(
6697 OrthancPluginContext *context,
6698 void *job,
6699 OrthancPluginJobFinalize finalize,
6700 const char *type,
6701 OrthancPluginJobGetProgress getProgress,
6702 OrthancPluginJobGetContent getContent,
6703 OrthancPluginJobGetSerialized getSerialized,
6704 OrthancPluginJobStep step,
6705 OrthancPluginJobStop stop,
6706 OrthancPluginJobReset reset)
6707 {
6708 OrthancPluginJob* target = NULL;
6709
6710 _OrthancPluginCreateJob params;
6711 memset(&params, 0, sizeof(params));
6712
6713 params.target = &target;
6714 params.job = job;
6715 params.finalize = finalize;
6716 params.type = type;
6717 params.getProgress = getProgress;
6718 params.getContent = getContent;
6719 params.getSerialized = getSerialized;
6720 params.step = step;
6721 params.stop = stop;
6722 params.reset = reset;
6723
6724 if (context->InvokeService(context, _OrthancPluginService_CreateJob, &params) != OrthancPluginErrorCode_Success ||
6725 target == NULL)
6726 {
6727 /* Error */
6728 return NULL;
6729 }
6730 else
6731 {
6732 return target;
6733 }
6734 }
6735
6736
6737 typedef struct
6738 {
6739 OrthancPluginJob* job;
6740 } _OrthancPluginFreeJob;
6741
6751 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeJob(
6752 OrthancPluginContext* context,
6753 OrthancPluginJob* job)
6754 {
6755 _OrthancPluginFreeJob params;
6756 params.job = job;
6757
6758 context->InvokeService(context, _OrthancPluginService_FreeJob, &params);
6759 }
6760
6761
6762
6763 typedef struct
6764 {
6765 char** resultId;
6766 OrthancPluginJob *job;
6767 int priority;
6768 } _OrthancPluginSubmitJob;
6769
6783 ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob(
6784 OrthancPluginContext *context,
6785 OrthancPluginJob *job,
6786 int priority)
6787 {
6788 char* resultId = NULL;
6789
6790 _OrthancPluginSubmitJob params;
6791 memset(&params, 0, sizeof(params));
6792
6793 params.resultId = &resultId;
6794 params.job = job;
6795 params.priority = priority;
6796
6797 if (context->InvokeService(context, _OrthancPluginService_SubmitJob, &params) != OrthancPluginErrorCode_Success ||
6798 resultId == NULL)
6799 {
6800 /* Error */
6801 return NULL;
6802 }
6803 else
6804 {
6805 return resultId;
6806 }
6807 }
6808
6809
6810
6811 typedef struct
6812 {
6813 OrthancPluginJobsUnserializer unserializer;
6814 } _OrthancPluginJobsUnserializer;
6815
6828 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterJobsUnserializer(
6829 OrthancPluginContext* context,
6830 OrthancPluginJobsUnserializer unserializer)
6831 {
6832 _OrthancPluginJobsUnserializer params;
6833 params.unserializer = unserializer;
6834
6835 context->InvokeService(context, _OrthancPluginService_RegisterJobsUnserializer, &params);
6836 }
6837
6838
6839
6840 typedef struct
6841 {
6842 OrthancPluginRestOutput* output;
6843 const char* details;
6844 uint8_t log;
6845 } _OrthancPluginSetHttpErrorDetails;
6846
6864 ORTHANC_PLUGIN_INLINE void OrthancPluginSetHttpErrorDetails(
6865 OrthancPluginContext* context,
6866 OrthancPluginRestOutput* output,
6867 const char* details,
6868 uint8_t log)
6869 {
6870 _OrthancPluginSetHttpErrorDetails params;
6871 params.output = output;
6872 params.details = details;
6873 params.log = log;
6874 context->InvokeService(context, _OrthancPluginService_SetHttpErrorDetails, &params);
6875 }
6876
6877
6878
6879 typedef struct
6880 {
6881 const char** result;
6882 const char* argument;
6883 } _OrthancPluginRetrieveStaticString;
6884
6896 ORTHANC_PLUGIN_INLINE const char* OrthancPluginAutodetectMimeType(
6897 OrthancPluginContext* context,
6898 const char* path)
6899 {
6900 const char* result = NULL;
6901
6902 _OrthancPluginRetrieveStaticString params;
6903 params.result = &result;
6904 params.argument = path;
6905
6906 if (context->InvokeService(context, _OrthancPluginService_AutodetectMimeType, &params) != OrthancPluginErrorCode_Success)
6907 {
6908 /* Error */
6909 return NULL;
6910 }
6911 else
6912 {
6913 return result;
6914 }
6915 }
6916
6917
6918
6919 typedef struct
6920 {
6921 const char* name;
6922 float value;
6923 OrthancPluginMetricsType type;
6924 } _OrthancPluginSetMetricsValue;
6925
6940 ORTHANC_PLUGIN_INLINE void OrthancPluginSetMetricsValue(
6941 OrthancPluginContext* context,
6942 const char* name,
6943 float value,
6944 OrthancPluginMetricsType type)
6945 {
6946 _OrthancPluginSetMetricsValue params;
6947 params.name = name;
6948 params.value = value;
6949 params.type = type;
6950 context->InvokeService(context, _OrthancPluginService_SetMetricsValue, &params);
6951 }
6952
6953
6954
6955 typedef struct
6956 {
6957 OrthancPluginRefreshMetricsCallback callback;
6958 } _OrthancPluginRegisterRefreshMetricsCallback;
6959
6970 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRefreshMetricsCallback(
6971 OrthancPluginContext* context,
6972 OrthancPluginRefreshMetricsCallback callback)
6973 {
6974 _OrthancPluginRegisterRefreshMetricsCallback params;
6975 params.callback = callback;
6976 context->InvokeService(context, _OrthancPluginService_RegisterRefreshMetricsCallback, &params);
6977 }
6978
6979
6980
6981
6982 typedef struct
6983 {
6984 char** target;
6985 const void* dicom;
6986 uint32_t dicomSize;
6987 OrthancPluginDicomWebBinaryCallback callback;
6988 } _OrthancPluginEncodeDicomWeb;
6989
7006 ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebJson(
7007 OrthancPluginContext* context,
7008 const void* dicom,
7009 uint32_t dicomSize,
7010 OrthancPluginDicomWebBinaryCallback callback)
7011 {
7012 char* target = NULL;
7013
7014 _OrthancPluginEncodeDicomWeb params;
7015 params.target = &target;
7016 params.dicom = dicom;
7017 params.dicomSize = dicomSize;
7018 params.callback = callback;
7019
7020 if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebJson, &params) != OrthancPluginErrorCode_Success)
7021 {
7022 /* Error */
7023 return NULL;
7024 }
7025 else
7026 {
7027 return target;
7028 }
7029 }
7030
7031
7048 ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebXml(
7049 OrthancPluginContext* context,
7050 const void* dicom,
7051 uint32_t dicomSize,
7052 OrthancPluginDicomWebBinaryCallback callback)
7053 {
7054 char* target = NULL;
7055
7056 _OrthancPluginEncodeDicomWeb params;
7057 params.target = &target;
7058 params.dicom = dicom;
7059 params.dicomSize = dicomSize;
7060 params.callback = callback;
7061
7062 if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebXml, &params) != OrthancPluginErrorCode_Success)
7063 {
7064 /* Error */
7065 return NULL;
7066 }
7067 else
7068 {
7069 return target;
7070 }
7071 }
7072
7073
7074
7075 typedef struct
7076 {
7077 char** target;
7078 const void* dicom;
7079 uint32_t dicomSize;
7080 OrthancPluginDicomWebBinaryCallback2 callback;
7081 void* payload;
7082 } _OrthancPluginEncodeDicomWeb2;
7083
7100 ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebJson2(
7101 OrthancPluginContext* context,
7102 const void* dicom,
7103 uint32_t dicomSize,
7104 OrthancPluginDicomWebBinaryCallback2 callback,
7105 void* payload)
7106 {
7107 char* target = NULL;
7108
7109 _OrthancPluginEncodeDicomWeb2 params;
7110 params.target = &target;
7111 params.dicom = dicom;
7112 params.dicomSize = dicomSize;
7113 params.callback = callback;
7114 params.payload = payload;
7115
7116 if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebJson2, &params) != OrthancPluginErrorCode_Success)
7117 {
7118 /* Error */
7119 return NULL;
7120 }
7121 else
7122 {
7123 return target;
7124 }
7125 }
7126
7127
7144 ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebXml2(
7145 OrthancPluginContext* context,
7146 const void* dicom,
7147 uint32_t dicomSize,
7148 OrthancPluginDicomWebBinaryCallback2 callback,
7149 void* payload)
7150 {
7151 char* target = NULL;
7152
7153 _OrthancPluginEncodeDicomWeb2 params;
7154 params.target = &target;
7155 params.dicom = dicom;
7156 params.dicomSize = dicomSize;
7157 params.callback = callback;
7158 params.payload = payload;
7159
7160 if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebXml2, &params) != OrthancPluginErrorCode_Success)
7161 {
7162 /* Error */
7163 return NULL;
7164 }
7165 else
7166 {
7167 return target;
7168 }
7169 }
7170
7171
7172
7188 typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientAnswerAddHeader) (
7189 void* answer,
7190 const char* key,
7191 const char* value);
7192
7193
7209 typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientAnswerAddChunk) (
7210 void* answer,
7211 const void* data,
7212 uint32_t size);
7213
7214
7229 typedef uint8_t (*OrthancPluginChunkedClientRequestIsDone) (void* request);
7230
7231
7246 typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientRequestNext) (void* request);
7247
7248
7262 typedef const void* (*OrthancPluginChunkedClientRequestGetChunkData) (void* request);
7263
7264
7278 typedef uint32_t (*OrthancPluginChunkedClientRequestGetChunkSize) (void* request);
7279
7280
7281 typedef struct
7282 {
7283 void* answer;
7284 OrthancPluginChunkedClientAnswerAddChunk answerAddChunk;
7285 OrthancPluginChunkedClientAnswerAddHeader answerAddHeader;
7286 uint16_t* httpStatus;
7287 OrthancPluginHttpMethod method;
7288 const char* url;
7289 uint32_t headersCount;
7290 const char* const* headersKeys;
7291 const char* const* headersValues;
7292 void* request;
7293 OrthancPluginChunkedClientRequestIsDone requestIsDone;
7294 OrthancPluginChunkedClientRequestGetChunkData requestChunkData;
7295 OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize;
7296 OrthancPluginChunkedClientRequestNext requestNext;
7297 const char* username;
7298 const char* password;
7299 uint32_t timeout;
7300 const char* certificateFile;
7301 const char* certificateKeyFile;
7302 const char* certificateKeyPassword;
7303 uint8_t pkcs11;
7304 } _OrthancPluginChunkedHttpClient;
7305
7306
7357 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginChunkedHttpClient(
7358 OrthancPluginContext* context,
7359 void* answer,
7360 OrthancPluginChunkedClientAnswerAddChunk answerAddChunk,
7361 OrthancPluginChunkedClientAnswerAddHeader answerAddHeader,
7362 uint16_t* httpStatus,
7363 OrthancPluginHttpMethod method,
7364 const char* url,
7365 uint32_t headersCount,
7366 const char* const* headersKeys,
7367 const char* const* headersValues,
7368 void* request,
7369 OrthancPluginChunkedClientRequestIsDone requestIsDone,
7370 OrthancPluginChunkedClientRequestGetChunkData requestChunkData,
7371 OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize,
7372 OrthancPluginChunkedClientRequestNext requestNext,
7373 const char* username,
7374 const char* password,
7375 uint32_t timeout,
7376 const char* certificateFile,
7377 const char* certificateKeyFile,
7378 const char* certificateKeyPassword,
7379 uint8_t pkcs11)
7380 {
7381 _OrthancPluginChunkedHttpClient params;
7382 memset(&params, 0, sizeof(params));
7383
7384 /* In common with OrthancPluginHttpClient() */
7385 params.httpStatus = httpStatus;
7386 params.method = method;
7387 params.url = url;
7388 params.headersCount = headersCount;
7389 params.headersKeys = headersKeys;
7390 params.headersValues = headersValues;
7391 params.username = username;
7392 params.password = password;
7393 params.timeout = timeout;
7394 params.certificateFile = certificateFile;
7395 params.certificateKeyFile = certificateKeyFile;
7396 params.certificateKeyPassword = certificateKeyPassword;
7397 params.pkcs11 = pkcs11;
7398
7399 /* For chunked body/answer */
7400 params.answer = answer;
7401 params.answerAddChunk = answerAddChunk;
7402 params.answerAddHeader = answerAddHeader;
7403 params.request = request;
7404 params.requestIsDone = requestIsDone;
7405 params.requestChunkData = requestChunkData;
7406 params.requestChunkSize = requestChunkSize;
7407 params.requestNext = requestNext;
7408
7409 return context->InvokeService(context, _OrthancPluginService_ChunkedHttpClient, &params);
7410 }
7411
7412
7413
7418 typedef struct _OrthancPluginServerChunkedRequestReader_t OrthancPluginServerChunkedRequestReader;
7419
7420
7421
7437 typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderFactory) (
7438 OrthancPluginServerChunkedRequestReader** reader,
7439 const char* url,
7440 const OrthancPluginHttpRequest* request);
7441
7442
7456 typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderAddChunk) (
7457 OrthancPluginServerChunkedRequestReader* reader,
7458 const void* data,
7459 uint32_t size);
7460
7461
7476 typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderExecute) (
7477 OrthancPluginServerChunkedRequestReader* reader,
7478 OrthancPluginRestOutput* output);
7479
7480
7494 typedef void (*OrthancPluginServerChunkedRequestReaderFinalize) (
7495 OrthancPluginServerChunkedRequestReader* reader);
7496
7497 typedef struct
7498 {
7499 const char* pathRegularExpression;
7500 OrthancPluginRestCallback getHandler;
7501 OrthancPluginServerChunkedRequestReaderFactory postHandler;
7502 OrthancPluginRestCallback deleteHandler;
7503 OrthancPluginServerChunkedRequestReaderFactory putHandler;
7504 OrthancPluginServerChunkedRequestReaderAddChunk addChunk;
7505 OrthancPluginServerChunkedRequestReaderExecute execute;
7506 OrthancPluginServerChunkedRequestReaderFinalize finalize;
7507 } _OrthancPluginChunkedRestCallback;
7508
7509
7539 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterChunkedRestCallback(
7540 OrthancPluginContext* context,
7541 const char* pathRegularExpression,
7542 OrthancPluginRestCallback getHandler,
7543 OrthancPluginServerChunkedRequestReaderFactory postHandler,
7544 OrthancPluginRestCallback deleteHandler,
7545 OrthancPluginServerChunkedRequestReaderFactory putHandler,
7546 OrthancPluginServerChunkedRequestReaderAddChunk addChunk,
7547 OrthancPluginServerChunkedRequestReaderExecute execute,
7548 OrthancPluginServerChunkedRequestReaderFinalize finalize)
7549 {
7550 _OrthancPluginChunkedRestCallback params;
7551 params.pathRegularExpression = pathRegularExpression;
7552 params.getHandler = getHandler;
7553 params.postHandler = postHandler;
7554 params.deleteHandler = deleteHandler;
7555 params.putHandler = putHandler;
7556 params.addChunk = addChunk;
7557 params.execute = execute;
7558 params.finalize = finalize;
7559
7560 context->InvokeService(context, _OrthancPluginService_RegisterChunkedRestCallback, &params);
7561 }
7562
7563
7564
7565
7566
7567 typedef struct
7568 {
7569 char** result;
7570 uint16_t group;
7571 uint16_t element;
7572 const char* privateCreator;
7573 } _OrthancPluginGetTagName;
7574
7590 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetTagName(
7591 OrthancPluginContext* context,
7592 uint16_t group,
7593 uint16_t element,
7594 const char* privateCreator)
7595 {
7596 char* result;
7597
7598 _OrthancPluginGetTagName params;
7599 params.result = &result;
7600 params.group = group;
7601 params.element = element;
7602 params.privateCreator = privateCreator;
7603
7604 if (context->InvokeService(context, _OrthancPluginService_GetTagName, &params) != OrthancPluginErrorCode_Success)
7605 {
7606 /* Error */
7607 return NULL;
7608 }
7609 else
7610 {
7611 return result;
7612 }
7613 }
7614
7615
7616
7645 typedef OrthancPluginErrorCode (*OrthancPluginStorageCommitmentFactory) (
7646 void** handler /* out */,
7647 const char* jobId,
7648 const char* transactionUid,
7649 const char* const* sopClassUids,
7650 const char* const* sopInstanceUids,
7651 uint32_t countInstances,
7652 const char* remoteAet,
7653 const char* calledAet);
7654
7655
7667 typedef void (*OrthancPluginStorageCommitmentDestructor) (void* handler);
7668
7669
7688 typedef OrthancPluginErrorCode (*OrthancPluginStorageCommitmentLookup) (
7689 OrthancPluginStorageCommitmentFailureReason* target,
7690 void* handler,
7691 const char* sopClassUid,
7692 const char* sopInstanceUid);
7693
7694
7695 typedef struct
7696 {
7697 OrthancPluginStorageCommitmentFactory factory;
7698 OrthancPluginStorageCommitmentDestructor destructor;
7699 OrthancPluginStorageCommitmentLookup lookup;
7700 } _OrthancPluginRegisterStorageCommitmentScpCallback;
7701
7715 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterStorageCommitmentScpCallback(
7716 OrthancPluginContext* context,
7717 OrthancPluginStorageCommitmentFactory factory,
7718 OrthancPluginStorageCommitmentDestructor destructor,
7719 OrthancPluginStorageCommitmentLookup lookup)
7720 {
7721 _OrthancPluginRegisterStorageCommitmentScpCallback params;
7722 params.factory = factory;
7723 params.destructor = destructor;
7724 params.lookup = lookup;
7725 return context->InvokeService(context, _OrthancPluginService_RegisterStorageCommitmentScpCallback, &params);
7726 }
7727
7728
7729
7755 typedef int32_t (*OrthancPluginIncomingDicomInstanceFilter) (
7756 const OrthancPluginDicomInstance* instance);
7757
7758
7759 typedef struct
7760 {
7761 OrthancPluginIncomingDicomInstanceFilter callback;
7762 } _OrthancPluginIncomingDicomInstanceFilter;
7763
7776 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingDicomInstanceFilter(
7777 OrthancPluginContext* context,
7778 OrthancPluginIncomingDicomInstanceFilter callback)
7779 {
7780 _OrthancPluginIncomingDicomInstanceFilter params;
7781 params.callback = callback;
7782
7783 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingDicomInstanceFilter, &params);
7784 }
7785
7786
7817 typedef int32_t (*OrthancPluginIncomingCStoreInstanceFilter) (
7818 uint16_t* dimseStatus /* out */,
7819 const OrthancPluginDicomInstance* instance);
7820
7821
7822 typedef struct
7823 {
7824 OrthancPluginIncomingCStoreInstanceFilter callback;
7825 } _OrthancPluginIncomingCStoreInstanceFilter;
7826
7839 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingCStoreInstanceFilter(
7840 OrthancPluginContext* context,
7841 OrthancPluginIncomingCStoreInstanceFilter callback)
7842 {
7843 _OrthancPluginIncomingCStoreInstanceFilter params;
7844 params.callback = callback;
7845
7846 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingCStoreInstanceFilter, &params);
7847 }
7848
7884 typedef OrthancPluginReceivedInstanceAction (*OrthancPluginReceivedInstanceCallback) (
7885 OrthancPluginMemoryBuffer64* modifiedDicomBuffer,
7886 const void* receivedDicomBuffer,
7887 uint64_t receivedDicomBufferSize,
7888 OrthancPluginInstanceOrigin origin);
7889
7890
7891 typedef struct
7892 {
7893 OrthancPluginReceivedInstanceCallback callback;
7894 } _OrthancPluginReceivedInstanceCallback;
7895
7916 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterReceivedInstanceCallback(
7917 OrthancPluginContext* context,
7918 OrthancPluginReceivedInstanceCallback callback)
7919 {
7920 _OrthancPluginReceivedInstanceCallback params;
7921 params.callback = callback;
7922
7923 return context->InvokeService(context, _OrthancPluginService_RegisterReceivedInstanceCallback, &params);
7924 }
7925
7939 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceTransferSyntaxUid(
7940 OrthancPluginContext* context,
7941 const OrthancPluginDicomInstance* instance)
7942 {
7943 char* result;
7944
7945 _OrthancPluginAccessDicomInstance params;
7946 memset(&params, 0, sizeof(params));
7947 params.resultStringToFree = &result;
7948 params.instance = instance;
7949
7950 if (context->InvokeService(context, _OrthancPluginService_GetInstanceTransferSyntaxUid, &params) != OrthancPluginErrorCode_Success)
7951 {
7952 /* Error */
7953 return NULL;
7954 }
7955 else
7956 {
7957 return result;
7958 }
7959 }
7960
7961
7974 ORTHANC_PLUGIN_INLINE int32_t OrthancPluginHasInstancePixelData(
7975 OrthancPluginContext* context,
7976 const OrthancPluginDicomInstance* instance)
7977 {
7978 int64_t hasPixelData;
7979
7980 _OrthancPluginAccessDicomInstance params;
7981 memset(&params, 0, sizeof(params));
7982 params.resultInt64 = &hasPixelData;
7983 params.instance = instance;
7984
7985 if (context->InvokeService(context, _OrthancPluginService_HasInstancePixelData, &params) != OrthancPluginErrorCode_Success ||
7986 hasPixelData < 0 ||
7987 hasPixelData > 1)
7988 {
7989 /* Error */
7990 return -1;
7991 }
7992 else
7993 {
7994 return (hasPixelData != 0);
7995 }
7996 }
7997
7998
7999
8000
8001
8002
8003 typedef struct
8004 {
8005 OrthancPluginDicomInstance** target;
8006 const void* buffer;
8007 uint32_t size;
8008 const char* transferSyntax;
8009 } _OrthancPluginCreateDicomInstance;
8010
8024 ORTHANC_PLUGIN_INLINE OrthancPluginDicomInstance* OrthancPluginCreateDicomInstance(
8025 OrthancPluginContext* context,
8026 const void* buffer,
8027 uint32_t size)
8028 {
8029 OrthancPluginDicomInstance* target = NULL;
8030
8031 _OrthancPluginCreateDicomInstance params;
8032 params.target = &target;
8033 params.buffer = buffer;
8034 params.size = size;
8035
8036 if (context->InvokeService(context, _OrthancPluginService_CreateDicomInstance, &params) != OrthancPluginErrorCode_Success)
8037 {
8038 /* Error */
8039 return NULL;
8040 }
8041 else
8042 {
8043 return target;
8044 }
8045 }
8046
8047 typedef struct
8048 {
8049 OrthancPluginDicomInstance* dicom;
8050 } _OrthancPluginFreeDicomInstance;
8051
8062 ORTHANC_PLUGIN_INLINE void OrthancPluginFreeDicomInstance(
8063 OrthancPluginContext* context,
8064 OrthancPluginDicomInstance* dicom)
8065 {
8066 _OrthancPluginFreeDicomInstance params;
8067 params.dicom = dicom;
8068
8069 context->InvokeService(context, _OrthancPluginService_FreeDicomInstance, &params);
8070 }
8071
8072
8073 typedef struct
8074 {
8075 uint32_t* targetUint32;
8076 OrthancPluginMemoryBuffer* targetBuffer;
8077 OrthancPluginImage** targetImage;
8078 char** targetStringToFree;
8079 const OrthancPluginDicomInstance* instance;
8080 uint32_t frameIndex;
8081 OrthancPluginDicomToJsonFormat format;
8082 OrthancPluginDicomToJsonFlags flags;
8083 uint32_t maxStringLength;
8084 OrthancPluginDicomWebBinaryCallback2 dicomWebCallback;
8085 void* dicomWebPayload;
8086 } _OrthancPluginAccessDicomInstance2;
8087
8099 ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetInstanceFramesCount(
8100 OrthancPluginContext* context,
8101 const OrthancPluginDicomInstance* instance)
8102 {
8103 uint32_t count;
8104
8105 _OrthancPluginAccessDicomInstance2 params;
8106 memset(&params, 0, sizeof(params));
8107 params.targetUint32 = &count;
8108 params.instance = instance;
8109
8110 if (context->InvokeService(context, _OrthancPluginService_GetInstanceFramesCount, &params) != OrthancPluginErrorCode_Success)
8111 {
8112 /* Error */
8113 return 0;
8114 }
8115 else
8116 {
8117 return count;
8118 }
8119 }
8120
8121
8139 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetInstanceRawFrame(
8140 OrthancPluginContext* context,
8141 OrthancPluginMemoryBuffer* target,
8142 const OrthancPluginDicomInstance* instance,
8143 uint32_t frameIndex)
8144 {
8145 _OrthancPluginAccessDicomInstance2 params;
8146 memset(&params, 0, sizeof(params));
8147 params.targetBuffer = target;
8148 params.instance = instance;
8149 params.frameIndex = frameIndex;
8150
8151 return context->InvokeService(context, _OrthancPluginService_GetInstanceRawFrame, &params);
8152 }
8153
8154
8167 ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginGetInstanceDecodedFrame(
8168 OrthancPluginContext* context,
8169 const OrthancPluginDicomInstance* instance,
8170 uint32_t frameIndex)
8171 {
8172 OrthancPluginImage* target = NULL;
8173
8174 _OrthancPluginAccessDicomInstance2 params;
8175 memset(&params, 0, sizeof(params));
8176 params.targetImage = &target;
8177 params.instance = instance;
8178 params.frameIndex = frameIndex;
8179
8180 if (context->InvokeService(context, _OrthancPluginService_GetInstanceDecodedFrame, &params) != OrthancPluginErrorCode_Success)
8181 {
8182 return NULL;
8183 }
8184 else
8185 {
8186 return target;
8187 }
8188 }
8189
8190
8206 ORTHANC_PLUGIN_INLINE OrthancPluginDicomInstance* OrthancPluginTranscodeDicomInstance(
8207 OrthancPluginContext* context,
8208 const void* buffer,
8209 uint32_t size,
8210 const char* transferSyntax)
8211 {
8212 OrthancPluginDicomInstance* target = NULL;
8213
8214 _OrthancPluginCreateDicomInstance params;
8215 params.target = &target;
8216 params.buffer = buffer;
8217 params.size = size;
8218 params.transferSyntax = transferSyntax;
8219
8220 if (context->InvokeService(context, _OrthancPluginService_TranscodeDicomInstance, &params) != OrthancPluginErrorCode_Success)
8221 {
8222 /* Error */
8223 return NULL;
8224 }
8225 else
8226 {
8227 return target;
8228 }
8229 }
8230
8244 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSerializeDicomInstance(
8245 OrthancPluginContext* context,
8246 OrthancPluginMemoryBuffer* target,
8247 const OrthancPluginDicomInstance* instance)
8248 {
8249 _OrthancPluginAccessDicomInstance2 params;
8250 memset(&params, 0, sizeof(params));
8251 params.targetBuffer = target;
8252 params.instance = instance;
8253
8254 return context->InvokeService(context, _OrthancPluginService_SerializeDicomInstance, &params);
8255 }
8256
8257
8276 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceAdvancedJson(
8277 OrthancPluginContext* context,
8278 const OrthancPluginDicomInstance* instance,
8279 OrthancPluginDicomToJsonFormat format,
8280 OrthancPluginDicomToJsonFlags flags,
8281 uint32_t maxStringLength)
8282 {
8283 char* result = NULL;
8284
8285 _OrthancPluginAccessDicomInstance2 params;
8286 memset(&params, 0, sizeof(params));
8287 params.targetStringToFree = &result;
8288 params.instance = instance;
8289 params.format = format;
8290 params.flags = flags;
8291 params.maxStringLength = maxStringLength;
8292
8293 if (context->InvokeService(context, _OrthancPluginService_GetInstanceAdvancedJson, &params) != OrthancPluginErrorCode_Success)
8294 {
8295 /* Error */
8296 return NULL;
8297 }
8298 else
8299 {
8300 return result;
8301 }
8302 }
8303
8304
8319 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceDicomWebJson(
8320 OrthancPluginContext* context,
8321 const OrthancPluginDicomInstance* instance,
8322 OrthancPluginDicomWebBinaryCallback2 callback,
8323 void* payload)
8324 {
8325 char* target = NULL;
8326
8327 _OrthancPluginAccessDicomInstance2 params;
8328 params.targetStringToFree = &target;
8329 params.instance = instance;
8330 params.dicomWebCallback = callback;
8331 params.dicomWebPayload = payload;
8332
8333 if (context->InvokeService(context, _OrthancPluginService_GetInstanceDicomWebJson, &params) != OrthancPluginErrorCode_Success)
8334 {
8335 /* Error */
8336 return NULL;
8337 }
8338 else
8339 {
8340 return target;
8341 }
8342 }
8343
8344
8359 ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceDicomWebXml(
8360 OrthancPluginContext* context,
8361 const OrthancPluginDicomInstance* instance,
8362 OrthancPluginDicomWebBinaryCallback2 callback,
8363 void* payload)
8364 {
8365 char* target = NULL;
8366
8367 _OrthancPluginAccessDicomInstance2 params;
8368 params.targetStringToFree = &target;
8369 params.instance = instance;
8370 params.dicomWebCallback = callback;
8371 params.dicomWebPayload = payload;
8372
8373 if (context->InvokeService(context, _OrthancPluginService_GetInstanceDicomWebXml, &params) != OrthancPluginErrorCode_Success)
8374 {
8375 /* Error */
8376 return NULL;
8377 }
8378 else
8379 {
8380 return target;
8381 }
8382 }
8383
8384
8385
8404 typedef OrthancPluginErrorCode (*OrthancPluginTranscoderCallback) (
8405 OrthancPluginMemoryBuffer* transcoded /* out */,
8406 const void* buffer,
8407 uint64_t size,
8408 const char* const* allowedSyntaxes,
8409 uint32_t countSyntaxes,
8410 uint8_t allowNewSopInstanceUid);
8411
8412
8413 typedef struct
8414 {
8415 OrthancPluginTranscoderCallback callback;
8416 } _OrthancPluginTranscoderCallback;
8417
8431 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterTranscoderCallback(
8432 OrthancPluginContext* context,
8433 OrthancPluginTranscoderCallback callback)
8434 {
8435 _OrthancPluginTranscoderCallback params;
8436 params.callback = callback;
8437
8438 return context->InvokeService(context, _OrthancPluginService_RegisterTranscoderCallback, &params);
8439 }
8440
8441
8442
8443 typedef struct
8444 {
8445 OrthancPluginMemoryBuffer* target;
8446 uint32_t size;
8447 } _OrthancPluginCreateMemoryBuffer;
8448
8466 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer(
8467 OrthancPluginContext* context,
8468 OrthancPluginMemoryBuffer* target,
8469 uint32_t size)
8470 {
8471 _OrthancPluginCreateMemoryBuffer params;
8472 params.target = target;
8473 params.size = size;
8474
8475 return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer, &params);
8476 }
8477
8478
8504 ORTHANC_PLUGIN_INLINE char* OrthancPluginGenerateRestApiAuthorizationToken(
8505 OrthancPluginContext* context)
8506 {
8507 char* result;
8508
8509 _OrthancPluginRetrieveDynamicString params;
8510 params.result = &result;
8511 params.argument = NULL;
8512
8513 if (context->InvokeService(context, _OrthancPluginService_GenerateRestApiAuthorizationToken,
8514 &params) != OrthancPluginErrorCode_Success)
8515 {
8516 /* Error */
8517 return NULL;
8518 }
8519 else
8520 {
8521 return result;
8522 }
8523 }
8524
8525
8526
8527 typedef struct
8528 {
8529 OrthancPluginMemoryBuffer64* target;
8530 uint64_t size;
8531 } _OrthancPluginCreateMemoryBuffer64;
8532
8550 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer64(
8551 OrthancPluginContext* context,
8552 OrthancPluginMemoryBuffer64* target,
8553 uint64_t size)
8554 {
8555 _OrthancPluginCreateMemoryBuffer64 params;
8556 params.target = target;
8557 params.size = size;
8558
8559 return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer64, &params);
8560 }
8561
8562
8563 typedef struct
8564 {
8565 OrthancPluginStorageCreate create;
8566 OrthancPluginStorageReadWhole readWhole;
8567 OrthancPluginStorageReadRange readRange;
8568 OrthancPluginStorageRemove remove;
8569 } _OrthancPluginRegisterStorageArea2;
8570
8587 ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterStorageArea2(
8588 OrthancPluginContext* context,
8589 OrthancPluginStorageCreate create,
8590 OrthancPluginStorageReadWhole readWhole,
8591 OrthancPluginStorageReadRange readRange,
8592 OrthancPluginStorageRemove remove)
8593 {
8594 _OrthancPluginRegisterStorageArea2 params;
8595 params.create = create;
8596 params.readWhole = readWhole;
8597 params.readRange = readRange;
8598 params.remove = remove;
8599 context->InvokeService(context, _OrthancPluginService_RegisterStorageArea2, &params);
8600 }
8601
8602
8603
8604 typedef struct
8605 {
8606 _OrthancPluginCreateDicom createDicom;
8607 const char* privateCreator;
8608 } _OrthancPluginCreateDicom2;
8609
8634 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateDicom2(
8635 OrthancPluginContext* context,
8636 OrthancPluginMemoryBuffer* target,
8637 const char* json,
8638 const OrthancPluginImage* pixelData,
8639 OrthancPluginCreateDicomFlags flags,
8640 const char* privateCreator)
8641 {
8642 _OrthancPluginCreateDicom2 params;
8643 params.createDicom.target = target;
8644 params.createDicom.json = json;
8645 params.createDicom.pixelData = pixelData;
8646 params.createDicom.flags = flags;
8647 params.privateCreator = privateCreator;
8648
8649 return context->InvokeService(context, _OrthancPluginService_CreateDicom2, &params);
8650 }
8651
8652
8653
8654
8655
8656
8657 typedef struct
8658 {
8659 OrthancPluginMemoryBuffer* answerBody;
8660 OrthancPluginMemoryBuffer* answerHeaders;
8661 uint16_t* httpStatus;
8662 OrthancPluginHttpMethod method;
8663 const char* uri;
8664 uint32_t headersCount;
8665 const char* const* headersKeys;
8666 const char* const* headersValues;
8667 const void* body;
8668 uint32_t bodySize;
8669 uint8_t afterPlugins;
8670 } _OrthancPluginCallRestApi;
8671
8702 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCallRestApi(
8703 OrthancPluginContext* context,
8704 OrthancPluginMemoryBuffer* answerBody,
8705 OrthancPluginMemoryBuffer* answerHeaders,
8706 uint16_t* httpStatus,
8707 OrthancPluginHttpMethod method,
8708 const char* uri,
8709 uint32_t headersCount,
8710 const char* const* headersKeys,
8711 const char* const* headersValues,
8712 const void* body,
8713 uint32_t bodySize,
8714 uint8_t afterPlugins)
8715 {
8716 _OrthancPluginCallRestApi params;
8717 memset(&params, 0, sizeof(params));
8718
8719 params.answerBody = answerBody;
8720 params.answerHeaders = answerHeaders;
8721 params.httpStatus = httpStatus;
8722 params.method = method;
8723 params.uri = uri;
8724 params.headersCount = headersCount;
8725 params.headersKeys = headersKeys;
8726 params.headersValues = headersValues;
8727 params.body = body;
8728 params.bodySize = bodySize;
8729 params.afterPlugins = afterPlugins;
8730
8731 return context->InvokeService(context, _OrthancPluginService_CallRestApi, &params);
8732 }
8733
8734
8735
8740 typedef struct _OrthancPluginWebDavCollection_t OrthancPluginWebDavCollection;
8741
8742
8759 typedef OrthancPluginErrorCode (*OrthancPluginWebDavAddFile) (
8760 OrthancPluginWebDavCollection* collection,
8761 const char* name,
8762 uint64_t size,
8763 const char* mimeType,
8764 const char* dateTime);
8765
8766
8780 typedef OrthancPluginErrorCode (*OrthancPluginWebDavAddFolder) (
8781 OrthancPluginWebDavCollection* collection,
8782 const char* name,
8783 const char* dateTime);
8784
8785
8807 typedef OrthancPluginErrorCode (*OrthancPluginWebDavRetrieveFile) (
8808 OrthancPluginWebDavCollection* collection,
8809 const void* data,
8810 uint64_t size,
8811 const char* mimeType,
8812 const char* dateTime);
8813
8814
8828 typedef OrthancPluginErrorCode (*OrthancPluginWebDavIsExistingFolderCallback) (
8829 uint8_t* isExisting, /* out */
8830 uint32_t pathSize,
8831 const char* const* pathItems,
8832 void* payload);
8833
8834
8853 typedef OrthancPluginErrorCode (*OrthancPluginWebDavListFolderCallback) (
8854 uint8_t* isExisting, /* out */
8855 OrthancPluginWebDavCollection* collection,
8856 OrthancPluginWebDavAddFile addFile,
8857 OrthancPluginWebDavAddFolder addFolder,
8858 uint32_t pathSize,
8859 const char* const* pathItems,
8860 void* payload);
8861
8862
8879 typedef OrthancPluginErrorCode (*OrthancPluginWebDavRetrieveFileCallback) (
8880 OrthancPluginWebDavCollection* collection,
8881 OrthancPluginWebDavRetrieveFile retrieveFile,
8882 uint32_t pathSize,
8883 const char* const* pathItems,
8884 void* payload);
8885
8886
8902 typedef OrthancPluginErrorCode (*OrthancPluginWebDavStoreFileCallback) (
8903 uint8_t* isReadOnly, /* out */
8904 uint32_t pathSize,
8905 const char* const* pathItems,
8906 const void* data,
8907 uint64_t size,
8908 void* payload);
8909
8910
8924 typedef OrthancPluginErrorCode (*OrthancPluginWebDavCreateFolderCallback) (
8925 uint8_t* isReadOnly, /* out */
8926 uint32_t pathSize,
8927 const char* const* pathItems,
8928 void* payload);
8929
8930
8944 typedef OrthancPluginErrorCode (*OrthancPluginWebDavDeleteItemCallback) (
8945 uint8_t* isReadOnly, /* out */
8946 uint32_t pathSize,
8947 const char* const* pathItems,
8948 void* payload);
8949
8950
8951 typedef struct
8952 {
8953 const char* uri;
8954 OrthancPluginWebDavIsExistingFolderCallback isExistingFolder;
8955 OrthancPluginWebDavListFolderCallback listFolder;
8956 OrthancPluginWebDavRetrieveFileCallback retrieveFile;
8957 OrthancPluginWebDavStoreFileCallback storeFile;
8958 OrthancPluginWebDavCreateFolderCallback createFolder;
8959 OrthancPluginWebDavDeleteItemCallback deleteItem;
8960 void* payload;
8961 } _OrthancPluginRegisterWebDavCollection;
8962
8983 ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterWebDavCollection(
8984 OrthancPluginContext* context,
8985 const char* uri,
8986 OrthancPluginWebDavIsExistingFolderCallback isExistingFolder,
8987 OrthancPluginWebDavListFolderCallback listFolder,
8988 OrthancPluginWebDavRetrieveFileCallback retrieveFile,
8989 OrthancPluginWebDavStoreFileCallback storeFile,
8990 OrthancPluginWebDavCreateFolderCallback createFolder,
8991 OrthancPluginWebDavDeleteItemCallback deleteItem,
8992 void* payload)
8993 {
8994 _OrthancPluginRegisterWebDavCollection params;
8995 params.uri = uri;
8996 params.isExistingFolder = isExistingFolder;
8997 params.listFolder = listFolder;
8998 params.retrieveFile = retrieveFile;
8999 params.storeFile = storeFile;
9000 params.createFolder = createFolder;
9001 params.deleteItem = deleteItem;
9002 params.payload = payload;
9003
9004 return context->InvokeService(context, _OrthancPluginService_RegisterWebDavCollection, &params);
9005 }
9006
9007
9016 ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetDatabaseServerIdentifier(
9017 OrthancPluginContext* context)
9018 {
9019 const char* result;
9020
9021 _OrthancPluginRetrieveStaticString params;
9022 params.result = &result;
9023 params.argument = NULL;
9024
9025 if (context->InvokeService(context, _OrthancPluginService_GetDatabaseServerIdentifier, &params) != OrthancPluginErrorCode_Success)
9026 {
9027 /* Error */
9028 return NULL;
9029 }
9030 else
9031 {
9032 return result;
9033 }
9034 }
9035
9036
9037#ifdef __cplusplus
9038}
9039#endif
9040
9041
9043
OrthancPluginReceivedInstanceCallback
OrthancPluginReceivedInstanceAction(* OrthancPluginReceivedInstanceCallback)(OrthancPluginMemoryBuffer64 *modifiedDicomBuffer, const void *receivedDicomBuffer, uint64_t receivedDicomBufferSize, OrthancPluginInstanceOrigin origin)
Callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-STORE or REST...
Definition OrthancCPlugin.h:7884
OrthancPluginWebDavAddFile
OrthancPluginErrorCode(* OrthancPluginWebDavAddFile)(OrthancPluginWebDavCollection *collection, const char *name, uint64_t size, const char *mimeType, const char *dateTime)
Declare a file while returning the content of a folder.
Definition OrthancCPlugin.h:8759
OrthancPluginCheckVersionAdvanced
int OrthancPluginCheckVersionAdvanced(OrthancPluginContext *context, int expectedMajor, int expectedMinor, int expectedRevision)
Check that the version of the hosting Orthanc is above a given version.
Definition OrthancCPlugin.h:1836
OrthancPluginRegisterStorageArea
void OrthancPluginRegisterStorageArea(OrthancPluginContext *context, OrthancPluginStorageCreate create, OrthancPluginStorageRead read, OrthancPluginStorageRemove remove)
Register a custom storage area.
Definition OrthancCPlugin.h:3174
OrthancPluginRegisterOnStoredInstanceCallback
void OrthancPluginRegisterOnStoredInstanceCallback(OrthancPluginContext *context, OrthancPluginOnStoredInstanceCallback callback)
Register a callback for received instances.
Definition OrthancCPlugin.h:2139
OrthancPluginDicomWebSetBinaryNode
void(* OrthancPluginDicomWebSetBinaryNode)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebBinaryMode mode, const char *bulkDataUri)
Signature of a function to set the content of a node encoding a binary DICOM tag, into a JSON or XML ...
Definition OrthancCPlugin.h:1224
OrthancPluginRegisterDecodeImageCallback
OrthancPluginErrorCode OrthancPluginRegisterDecodeImageCallback(OrthancPluginContext *context, OrthancPluginDecodeImageCallback callback)
Register a callback to handle the decoding of DICOM images.
Definition OrthancCPlugin.h:5400
OrthancPluginChangeType
OrthancPluginChangeType
Definition OrthancCPlugin.h:730
OrthancPluginStorageReadWhole
OrthancPluginErrorCode(* OrthancPluginStorageReadWhole)(OrthancPluginMemoryBuffer64 *target, const char *uuid, OrthancPluginContentType type)
Callback for reading a whole file from the storage area.
Definition OrthancCPlugin.h:1290
OrthancPluginRegisterIncomingCStoreInstanceFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingCStoreInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingCStoreInstanceFilter callback)
Register a callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition OrthancCPlugin.h:7839
OrthancPluginCheckVersion
int OrthancPluginCheckVersion(OrthancPluginContext *context)
Check the compatibility of the plugin wrt. the version of its hosting Orthanc.
Definition OrthancCPlugin.h:1942
OrthancPluginDecodeImageCallback
OrthancPluginErrorCode(* OrthancPluginDecodeImageCallback)(OrthancPluginImage **target, const void *dicom, const uint32_t size, uint32_t frameIndex)
Signature of a callback function to decode a DICOM instance as an image.
Definition OrthancCPlugin.h:1202
OrthancPluginRegisterRefreshMetricsCallback
void OrthancPluginRegisterRefreshMetricsCallback(OrthancPluginContext *context, OrthancPluginRefreshMetricsCallback callback)
Register a callback to refresh the metrics.
Definition OrthancCPlugin.h:6970
OrthancPluginWebDavCreateFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavCreateFolderCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback to create a folder.
Definition OrthancCPlugin.h:8924
OrthancPluginWebDavCollection
struct _OrthancPluginWebDavCollection_t OrthancPluginWebDavCollection
Opaque structure that represents a WebDAV collection.
Definition OrthancCPlugin.h:8740
OrthancPluginDicomWebBinaryCallback
void(* OrthancPluginDicomWebBinaryCallback)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebSetBinaryNode setter, uint32_t levelDepth, const uint16_t *levelTagGroup, const uint16_t *levelTagElement, const uint32_t *levelIndex, uint16_t tagGroup, uint16_t tagElement, OrthancPluginValueRepresentation vr)
Callback executed to encode a binary tag in DICOMweb.
Definition OrthancCPlugin.h:1717
OrthancPluginWebDavRetrieveFileCallback
OrthancPluginErrorCode(* OrthancPluginWebDavRetrieveFileCallback)(OrthancPluginWebDavCollection *collection, OrthancPluginWebDavRetrieveFile retrieveFile, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for retrieving the content of a file.
Definition OrthancCPlugin.h:8879
OrthancPluginIncomingDicomInstanceFilter
int32_t(* OrthancPluginIncomingDicomInstanceFilter)(const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc.
Definition OrthancCPlugin.h:7755
OrthancPluginStorageAreaRemove
OrthancPluginErrorCode OrthancPluginStorageAreaRemove(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Remove a file from the storage area.
Definition OrthancCPlugin.h:4758
OrthancPluginTranscoderCallback
OrthancPluginErrorCode(* OrthancPluginTranscoderCallback)(OrthancPluginMemoryBuffer *transcoded, const void *buffer, uint64_t size, const char *const *allowedSyntaxes, uint32_t countSyntaxes, uint8_t allowNewSopInstanceUid)
Signature of a callback function to transcode a DICOM instance.
Definition OrthancCPlugin.h:8404
OrthancPluginRegisterIncomingHttpRequestFilter2
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter2(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter2 callback)
Register a callback to filter incoming HTTP requests.
Definition OrthancCPlugin.h:6303
OrthancPluginWebDavRetrieveFile
OrthancPluginErrorCode(* OrthancPluginWebDavRetrieveFile)(OrthancPluginWebDavCollection *collection, const void *data, uint64_t size, const char *mimeType, const char *dateTime)
Retrieve the content of a file.
Definition OrthancCPlugin.h:8807
OrthancPluginStorageRead
OrthancPluginErrorCode(* OrthancPluginStorageRead)(void **content, int64_t *size, const char *uuid, OrthancPluginContentType type)
Callback for reading from the storage area.
Definition OrthancCPlugin.h:1270
OrthancPluginRegisterRestCallback
void OrthancPluginRegisterRestCallback(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback.
Definition OrthancCPlugin.h:2061
OrthancPluginGetExpectedDatabaseVersion
uint32_t OrthancPluginGetExpectedDatabaseVersion(OrthancPluginContext *context)
Get the expected version of the database schema.
Definition OrthancCPlugin.h:3562
OrthancPluginRegisterReceivedInstanceCallback
OrthancPluginErrorCode OrthancPluginRegisterReceivedInstanceCallback(OrthancPluginContext *context, OrthancPluginReceivedInstanceCallback callback)
Register a callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-ST...
Definition OrthancCPlugin.h:7916
OrthancPluginWebDavListFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavListFolderCallback)(uint8_t *isExisting, OrthancPluginWebDavCollection *collection, OrthancPluginWebDavAddFile addFile, OrthancPluginWebDavAddFolder addFolder, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for listing the content of a folder.
Definition OrthancCPlugin.h:8853
OrthancPluginJobsUnserializer
OrthancPluginJob *(* OrthancPluginJobsUnserializer)(const char *jobType, const char *serialized)
Callback executed to unserialize a custom job.
Definition OrthancCPlugin.h:1671
OrthancPluginRestOutput
struct _OrthancPluginRestOutput_t OrthancPluginRestOutput
Opaque structure that represents the HTTP connection to the client application.
Definition OrthancCPlugin.h:1073
OrthancPluginRegisterOnChangeCallback
void OrthancPluginRegisterOnChangeCallback(OrthancPluginContext *context, OrthancPluginOnChangeCallback callback)
Register a callback to monitor changes.
Definition OrthancCPlugin.h:3317
OrthancPluginRegisterStorageArea2
void OrthancPluginRegisterStorageArea2(OrthancPluginContext *context, OrthancPluginStorageCreate create, OrthancPluginStorageReadWhole readWhole, OrthancPluginStorageReadRange readRange, OrthancPluginStorageRemove remove)
Register a custom storage area, with support for range request.
Definition OrthancCPlugin.h:8587
OrthancPluginWebDavAddFolder
OrthancPluginErrorCode(* OrthancPluginWebDavAddFolder)(OrthancPluginWebDavCollection *collection, const char *name, const char *dateTime)
Declare a subfolder while returning the content of a folder.
Definition OrthancCPlugin.h:8780
OrthancPluginRegisterWebDavCollection
OrthancPluginErrorCode OrthancPluginRegisterWebDavCollection(OrthancPluginContext *context, const char *uri, OrthancPluginWebDavIsExistingFolderCallback isExistingFolder, OrthancPluginWebDavListFolderCallback listFolder, OrthancPluginWebDavRetrieveFileCallback retrieveFile, OrthancPluginWebDavStoreFileCallback storeFile, OrthancPluginWebDavCreateFolderCallback createFolder, OrthancPluginWebDavDeleteItemCallback deleteItem, void *payload)
Register a WebDAV virtual filesystem.
Definition OrthancCPlugin.h:8983
OrthancPluginIncomingHttpRequestFilter2
int32_t(* OrthancPluginIncomingHttpRequestFilter2)(OrthancPluginHttpMethod method, const char *uri, const char *ip, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, uint32_t getArgumentsCount, const char *const *getArgumentsKeys, const char *const *getArgumentsValues)
Callback to filter incoming HTTP requests received by Orthanc.
Definition OrthancCPlugin.h:1416
OrthancPluginRestCallback
OrthancPluginErrorCode(* OrthancPluginRestCallback)(OrthancPluginRestOutput *output, const char *url, const OrthancPluginHttpRequest *request)
Signature of a callback function that answers to a REST request.
Definition OrthancCPlugin.h:1170
OrthancPluginRefreshMetricsCallback
void(* OrthancPluginRefreshMetricsCallback)()
Callback executed to update the metrics of the plugin.
Definition OrthancCPlugin.h:1689
OrthancPluginRegisterTranscoderCallback
OrthancPluginErrorCode OrthancPluginRegisterTranscoderCallback(OrthancPluginContext *context, OrthancPluginTranscoderCallback callback)
Register a callback to handle the transcoding of DICOM images.
Definition OrthancCPlugin.h:8431
OrthancPluginOnStoredInstanceCallback
OrthancPluginErrorCode(* OrthancPluginOnStoredInstanceCallback)(const OrthancPluginDicomInstance *instance, const char *instanceId)
Signature of a callback function that is triggered when Orthanc stores a new DICOM instance.
Definition OrthancCPlugin.h:1181
OrthancPluginWebDavStoreFileCallback
OrthancPluginErrorCode(* OrthancPluginWebDavStoreFileCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, const void *data, uint64_t size, void *payload)
Callback to store a file.
Definition OrthancCPlugin.h:8902
OrthancPluginWebDavDeleteItemCallback
OrthancPluginErrorCode(* OrthancPluginWebDavDeleteItemCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback to remove a file or a folder.
Definition OrthancCPlugin.h:8944
OrthancPluginReconstructMainDicomTags
OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, OrthancPluginResourceType level)
Reconstruct the main DICOM tags.
Definition OrthancCPlugin.h:4950
OrthancPluginStorageRemove
OrthancPluginErrorCode(* OrthancPluginStorageRemove)(const char *uuid, OrthancPluginContentType type)
Callback for removing a file from the storage area.
Definition OrthancCPlugin.h:1331
OrthancPluginStorageCreate
OrthancPluginErrorCode(* OrthancPluginStorageCreate)(const char *uuid, const void *content, int64_t size, OrthancPluginContentType type)
Callback for writing to the storage area.
Definition OrthancCPlugin.h:1243
OrthancPluginDicomWebBinaryCallback2
void(* OrthancPluginDicomWebBinaryCallback2)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebSetBinaryNode setter, uint32_t levelDepth, const uint16_t *levelTagGroup, const uint16_t *levelTagElement, const uint32_t *levelIndex, uint16_t tagGroup, uint16_t tagElement, OrthancPluginValueRepresentation vr, void *payload)
Callback executed to encode a binary tag in DICOMweb.
Definition OrthancCPlugin.h:1755
OrthancPluginOnChangeCallback
OrthancPluginErrorCode(* OrthancPluginOnChangeCallback)(OrthancPluginChangeType changeType, OrthancPluginResourceType resourceType, const char *resourceId)
Signature of a callback function that is triggered when a change happens to some DICOM resource.
Definition OrthancCPlugin.h:1191
OrthancPluginServerChunkedRequestReader
struct _OrthancPluginServerChunkedRequestReader_t OrthancPluginServerChunkedRequestReader
Opaque structure that reads the content of a HTTP request body during a chunked HTTP transfer.
Definition OrthancCPlugin.h:7418
OrthancPluginWebDavIsExistingFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavIsExistingFolderCallback)(uint8_t *isExisting, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for testing the existence of a folder.
Definition OrthancCPlugin.h:8828
OrthancPluginIncomingHttpRequestFilter
int32_t(* OrthancPluginIncomingHttpRequestFilter)(OrthancPluginHttpMethod method, const char *uri, const char *ip, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues)
Callback to filter incoming HTTP requests received by Orthanc.
Definition OrthancCPlugin.h:1381
OrthancPluginRegisterJobsUnserializer
void OrthancPluginRegisterJobsUnserializer(OrthancPluginContext *context, OrthancPluginJobsUnserializer unserializer)
Register an unserializer for custom jobs.
Definition OrthancCPlugin.h:6828
OrthancPluginFree
void(* OrthancPluginFree)(void *buffer)
Signature of a function to free dynamic memory.
Definition OrthancCPlugin.h:1214
OrthancPluginRegisterRestCallbackNoLock
void OrthancPluginRegisterRestCallbackNoLock(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback, without locking.
Definition OrthancCPlugin.h:2101
OrthancPluginStorageAreaRead
OrthancPluginErrorCode OrthancPluginStorageAreaRead(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Read a file from the storage area.
Definition OrthancCPlugin.h:4719
OrthancPluginStorageReadRange
OrthancPluginErrorCode(* OrthancPluginStorageReadRange)(OrthancPluginMemoryBuffer64 *target, const char *uuid, OrthancPluginContentType type, uint64_t rangeStart)
Callback for reading a range of a file from the storage area.
Definition OrthancCPlugin.h:1313
OrthancPluginRegisterChunkedRestCallback
void OrthancPluginRegisterChunkedRestCallback(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback getHandler, OrthancPluginServerChunkedRequestReaderFactory postHandler, OrthancPluginRestCallback deleteHandler, OrthancPluginServerChunkedRequestReaderFactory putHandler, OrthancPluginServerChunkedRequestReaderAddChunk addChunk, OrthancPluginServerChunkedRequestReaderExecute execute, OrthancPluginServerChunkedRequestReaderFinalize finalize)
Register a REST callback to handle chunked HTTP transfers.
Definition OrthancCPlugin.h:7539
OrthancPluginIncomingCStoreInstanceFilter
int32_t(* OrthancPluginIncomingCStoreInstanceFilter)(uint16_t *dimseStatus, const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition OrthancCPlugin.h:7817
OrthancPluginRegisterIncomingDicomInstanceFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingDicomInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingDicomInstanceFilter callback)
Register a callback to filter incoming DICOM instances.
Definition OrthancCPlugin.h:7776
OrthancPluginRegisterIncomingHttpRequestFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter callback)
Register a callback to filter incoming HTTP requests.
Definition OrthancCPlugin.h:5736
OrthancPluginStorageAreaCreate
OrthancPluginErrorCode OrthancPluginStorageAreaCreate(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, const char *uuid, const void *content, uint64_t size, OrthancPluginContentType type)
Create a file inside the storage area.
Definition OrthancCPlugin.h:4675
OrthancPluginChangeType_OrthancStopped
@ OrthancPluginChangeType_OrthancStopped
Definition OrthancCPlugin.h:742
OrthancPluginChangeType_OrthancStarted
@ OrthancPluginChangeType_OrthancStarted
Definition OrthancCPlugin.h:741
OrthancPluginChangeType_Deleted
@ OrthancPluginChangeType_Deleted
Definition OrthancCPlugin.h:732
OrthancPluginChangeType_JobFailure
@ OrthancPluginChangeType_JobFailure
Definition OrthancCPlugin.h:749
OrthancPluginChangeType_NewInstance
@ OrthancPluginChangeType_NewInstance
Definition OrthancCPlugin.h:734
OrthancPluginChangeType_NewPatient
@ OrthancPluginChangeType_NewPatient
Definition OrthancCPlugin.h:735
OrthancPluginChangeType_JobSubmitted
@ OrthancPluginChangeType_JobSubmitted
Definition OrthancCPlugin.h:747
OrthancPluginChangeType_NewSeries
@ OrthancPluginChangeType_NewSeries
Definition OrthancCPlugin.h:736
OrthancPluginChangeType_StablePatient
@ OrthancPluginChangeType_StablePatient
Definition OrthancCPlugin.h:738
OrthancPluginChangeType_UpdatedPeers
@ OrthancPluginChangeType_UpdatedPeers
Definition OrthancCPlugin.h:745
OrthancPluginChangeType_StableStudy
@ OrthancPluginChangeType_StableStudy
Definition OrthancCPlugin.h:740
OrthancPluginChangeType_CompletedSeries
@ OrthancPluginChangeType_CompletedSeries
Definition OrthancCPlugin.h:731
OrthancPluginChangeType_NewChildInstance
@ OrthancPluginChangeType_NewChildInstance
Definition OrthancCPlugin.h:733
OrthancPluginChangeType_UpdatedAttachment
@ OrthancPluginChangeType_UpdatedAttachment
Definition OrthancCPlugin.h:743
OrthancPluginChangeType_UpdatedMetadata
@ OrthancPluginChangeType_UpdatedMetadata
Definition OrthancCPlugin.h:744
OrthancPluginChangeType_StableSeries
@ OrthancPluginChangeType_StableSeries
Definition OrthancCPlugin.h:739
OrthancPluginChangeType_UpdatedModalities
@ OrthancPluginChangeType_UpdatedModalities
Definition OrthancCPlugin.h:746
OrthancPluginChangeType_JobSuccess
@ OrthancPluginChangeType_JobSuccess
Definition OrthancCPlugin.h:748
OrthancPluginChangeType_NewStudy
@ OrthancPluginChangeType_NewStudy
Definition OrthancCPlugin.h:737
OrthancPluginGetFindQuerySize
uint32_t OrthancPluginGetFindQuerySize(OrthancPluginContext *context, const OrthancPluginFindQuery *query)
Get the number of tags in a C-Find query.
Definition OrthancCPlugin.h:5997
OrthancPluginFindQuery
struct _OrthancPluginFindQuery_t OrthancPluginFindQuery
Opaque structure to an object that represents a C-Find query.
Definition OrthancCPlugin.h:1121
OrthancPluginApplyMove
OrthancPluginErrorCode(* OrthancPluginApplyMove)(void *moveDriver)
Callback to apply one C-Move suboperation.
Definition OrthancCPlugin.h:1526
OrthancPluginFindMarkIncomplete
OrthancPluginErrorCode OrthancPluginFindMarkIncomplete(OrthancPluginContext *context, OrthancPluginFindAnswers *answers)
Mark the set of C-Find answers as incomplete.
Definition OrthancCPlugin.h:5973
OrthancPluginStorageCommitmentDestructor
void(* OrthancPluginStorageCommitmentDestructor)(void *handler)
Callback to free one storage commitment SCP handler.
Definition OrthancCPlugin.h:7667
OrthancPluginWorklistCallback
OrthancPluginErrorCode(* OrthancPluginWorklistCallback)(OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const char *issuerAet, const char *calledAet)
Callback to handle the C-Find SCP requests for worklists.
Definition OrthancCPlugin.h:1350
OrthancPluginRegisterMoveCallback
OrthancPluginErrorCode OrthancPluginRegisterMoveCallback(OrthancPluginContext *context, OrthancPluginMoveCallback callback, OrthancPluginGetMoveSize getMoveSize, OrthancPluginApplyMove applyMove, OrthancPluginFreeMove freeMove)
Register a callback to handle C-Move requests.
Definition OrthancCPlugin.h:6151
OrthancPluginGetFindQueryValue
char * OrthancPluginGetFindQueryValue(OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index)
Get the value associated with one tag in a C-Find query.
Definition OrthancCPlugin.h:6103
OrthancPluginStorageCommitmentFactory
OrthancPluginErrorCode(* OrthancPluginStorageCommitmentFactory)(void **handler, const char *jobId, const char *transactionUid, const char *const *sopClassUids, const char *const *sopInstanceUids, uint32_t countInstances, const char *remoteAet, const char *calledAet)
Callback executed by the storage commitment SCP.
Definition OrthancCPlugin.h:7645
OrthancPluginRegisterFindCallback
OrthancPluginErrorCode OrthancPluginRegisterFindCallback(OrthancPluginContext *context, OrthancPluginFindCallback callback)
Register a callback to handle C-Find requests.
Definition OrthancCPlugin.h:5905
OrthancPluginWorklistGetDicomQuery
OrthancPluginErrorCode OrthancPluginWorklistGetDicomQuery(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginWorklistQuery *query)
Retrieve the worklist query as a DICOM file.
Definition OrthancCPlugin.h:5282
OrthancPluginStorageCommitmentLookup
OrthancPluginErrorCode(* OrthancPluginStorageCommitmentLookup)(OrthancPluginStorageCommitmentFailureReason *target, void *handler, const char *sopClassUid, const char *sopInstanceUid)
Callback to get the status of one DICOM instance in the storage commitment SCP.
Definition OrthancCPlugin.h:7688
OrthancPluginWorklistIsMatch
int32_t OrthancPluginWorklistIsMatch(OrthancPluginContext *context, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size)
Test whether a worklist matches the query.
Definition OrthancCPlugin.h:5243
OrthancPluginFindAddAnswer
OrthancPluginErrorCode OrthancPluginFindAddAnswer(OrthancPluginContext *context, OrthancPluginFindAnswers *answers, const void *dicom, uint32_t size)
Add one answer to some C-Find request.
Definition OrthancCPlugin.h:5944
OrthancPluginRegisterStorageCommitmentScpCallback
OrthancPluginErrorCode OrthancPluginRegisterStorageCommitmentScpCallback(OrthancPluginContext *context, OrthancPluginStorageCommitmentFactory factory, OrthancPluginStorageCommitmentDestructor destructor, OrthancPluginStorageCommitmentLookup lookup)
Register a callback to handle incoming requests to the storage commitment SCP.
Definition OrthancCPlugin.h:7715
OrthancPluginFindAnswers
struct _OrthancPluginFindAnswers_t OrthancPluginFindAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition OrthancCPlugin.h:1129
OrthancPluginWorklistAnswers
struct _OrthancPluginWorklistAnswers_t OrthancPluginWorklistAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition OrthancCPlugin.h:1113
OrthancPluginFindCallback
OrthancPluginErrorCode(* OrthancPluginFindCallback)(OrthancPluginFindAnswers *answers, const OrthancPluginFindQuery *query, const char *issuerAet, const char *calledAet)
Callback to handle incoming C-Find SCP requests.
Definition OrthancCPlugin.h:1443
OrthancPluginGetMoveSize
uint32_t(* OrthancPluginGetMoveSize)(void *moveDriver)
Callback to read the size of a C-Move driver.
Definition OrthancCPlugin.h:1511
OrthancPluginRegisterWorklistCallback
OrthancPluginErrorCode OrthancPluginRegisterWorklistCallback(OrthancPluginContext *context, OrthancPluginWorklistCallback callback)
Register a callback to handle modality worklists requests.
Definition OrthancCPlugin.h:5139
OrthancPluginGetFindQueryTagName
char * OrthancPluginGetFindQueryTagName(OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index)
Get the symbolic name of one tag in a C-Find query.
Definition OrthancCPlugin.h:6065
OrthancPluginWorklistMarkIncomplete
OrthancPluginErrorCode OrthancPluginWorklistMarkIncomplete(OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers)
Mark the set of worklist answers as incomplete.
Definition OrthancCPlugin.h:5205
OrthancPluginGetFindQueryTag
OrthancPluginErrorCode OrthancPluginGetFindQueryTag(OrthancPluginContext *context, uint16_t *group, uint16_t *element, const OrthancPluginFindQuery *query, uint32_t index)
Get one tag in a C-Find query.
Definition OrthancCPlugin.h:6034
OrthancPluginFreeMove
void(* OrthancPluginFreeMove)(void *moveDriver)
Callback to free one C-Move driver.
Definition OrthancCPlugin.h:1540
OrthancPluginWorklistQuery
struct _OrthancPluginWorklistQuery_t OrthancPluginWorklistQuery
Opaque structure to an object that represents a C-Find query for worklists.
Definition OrthancCPlugin.h:1105
OrthancPluginMoveCallback
void *(* OrthancPluginMoveCallback)(OrthancPluginResourceType resourceType, const char *patientId, const char *accessionNumber, const char *studyInstanceUid, const char *seriesInstanceUid, const char *sopInstanceUid, const char *originatorAet, const char *sourceAet, const char *targetAet, uint16_t originatorId)
Callback to handle incoming C-Move SCP requests.
Definition OrthancCPlugin.h:1486
OrthancPluginWorklistAddAnswer
OrthancPluginErrorCode OrthancPluginWorklistAddAnswer(OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size)
Add one answer to some modality worklist request.
Definition OrthancCPlugin.h:5175
OrthancPluginHasInstancePixelData
int32_t OrthancPluginHasInstancePixelData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Check whether the DICOM file has pixel data.
Definition OrthancCPlugin.h:7974
OrthancPluginGetInstanceDicomWebXml
char * OrthancPluginGetInstanceDicomWebXml(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:8359
OrthancPluginDicomInstance
struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance
Opaque structure that represents a DICOM instance that is managed by the Orthanc core.
Definition OrthancCPlugin.h:1081
OrthancPluginGetInstanceRawFrame
OrthancPluginErrorCode OrthancPluginGetInstanceRawFrame(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginDicomInstance *instance, uint32_t frameIndex)
Get the raw content of a frame in a DICOM instance.
Definition OrthancCPlugin.h:8139
OrthancPluginGetInstanceRemoteAet
const char * OrthancPluginGetInstanceRemoteAet(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the AET of a DICOM instance.
Definition OrthancCPlugin.h:2905
OrthancPluginGetInstanceJson
char * OrthancPluginGetInstanceJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file.
Definition OrthancCPlugin.h:3007
OrthancPluginTranscodeDicomInstance
OrthancPluginDicomInstance * OrthancPluginTranscodeDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size, const char *transferSyntax)
Parse and transcode a DICOM instance.
Definition OrthancCPlugin.h:8206
OrthancPluginCreateDicomInstance
OrthancPluginDicomInstance * OrthancPluginCreateDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size)
Parse a DICOM instance.
Definition OrthancCPlugin.h:8024
OrthancPluginGetInstanceFramesCount
uint32_t OrthancPluginGetInstanceFramesCount(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the number of frames in a DICOM instance.
Definition OrthancCPlugin.h:8099
OrthancPluginGetInstanceOrigin
OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the origin of a DICOM file.
Definition OrthancCPlugin.h:5308
OrthancPluginGetInstanceSize
int64_t OrthancPluginGetInstanceSize(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the size of a DICOM file.
Definition OrthancCPlugin.h:2938
OrthancPluginGetInstanceDicomWebJson
char * OrthancPluginGetInstanceDicomWebJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:8319
OrthancPluginGetInstanceTransferSyntaxUid
char * OrthancPluginGetInstanceTransferSyntaxUid(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the transfer syntax of a DICOM file.
Definition OrthancCPlugin.h:7939
OrthancPluginHasInstanceMetadata
int OrthancPluginHasInstanceMetadata(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, const char *metadata)
Check whether a DICOM instance is associated with some metadata.
Definition OrthancCPlugin.h:3084
OrthancPluginFreeDicomInstance
void OrthancPluginFreeDicomInstance(OrthancPluginContext *context, OrthancPluginDicomInstance *dicom)
Free a DICOM instance.
Definition OrthancCPlugin.h:8062
OrthancPluginSerializeDicomInstance
OrthancPluginErrorCode OrthancPluginSerializeDicomInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginDicomInstance *instance)
Writes a DICOM instance to a memory buffer.
Definition OrthancCPlugin.h:8244
OrthancPluginGetInstanceMetadata
const char * OrthancPluginGetInstanceMetadata(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, const char *metadata)
Get the value of some metadata associated with a given DICOM instance.
Definition OrthancCPlugin.h:3125
OrthancPluginGetInstanceSimplifiedJson
char * OrthancPluginGetInstanceSimplifiedJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file (with simplification).
Definition OrthancCPlugin.h:3045
OrthancPluginGetInstanceData
const void * OrthancPluginGetInstanceData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the data of a DICOM file.
Definition OrthancCPlugin.h:2971
OrthancPluginGetInstanceDecodedFrame
OrthancPluginImage * OrthancPluginGetInstanceDecodedFrame(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition OrthancCPlugin.h:8167
OrthancPluginGetInstanceAdvancedJson
char * OrthancPluginGetInstanceAdvancedJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM memory buffer as a JSON string.
Definition OrthancCPlugin.h:8276
OrthancPluginConvertPixelFormat
OrthancPluginImage * OrthancPluginConvertPixelFormat(OrthancPluginContext *context, const OrthancPluginImage *source, OrthancPluginPixelFormat targetFormat)
Change the pixel format of an image.
Definition OrthancCPlugin.h:4461
OrthancPluginPixelFormat
OrthancPluginPixelFormat
Definition OrthancCPlugin.h:606
OrthancPluginDrawText
OrthancPluginErrorCode OrthancPluginDrawText(OrthancPluginContext *context, OrthancPluginImage *image, uint32_t fontIndex, const char *utf8Text, int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b)
Draw text on an image.
Definition OrthancCPlugin.h:4621
OrthancPluginCompressJpegImage
OrthancPluginErrorCode OrthancPluginCompressJpegImage(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer, uint8_t quality)
Encode a JPEG image.
Definition OrthancCPlugin.h:4205
OrthancPluginGetImagePitch
uint32_t OrthancPluginGetImagePitch(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pitch of an image.
Definition OrthancCPlugin.h:3996
OrthancPluginGetImagePixelFormat
OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pixel format of an image.
Definition OrthancCPlugin.h:3895
OrthancPluginCreateImage
OrthancPluginImage * OrthancPluginCreateImage(OrthancPluginContext *context, OrthancPluginPixelFormat format, uint32_t width, uint32_t height)
Create an image.
Definition OrthancCPlugin.h:5438
OrthancPluginGetFontsCount
uint32_t OrthancPluginGetFontsCount(OrthancPluginContext *context)
Return the number of available fonts.
Definition OrthancCPlugin.h:4496
OrthancPluginGetImageHeight
uint32_t OrthancPluginGetImageHeight(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the height of an image.
Definition OrthancCPlugin.h:3961
OrthancPluginGetImageBuffer
void * OrthancPluginGetImageBuffer(OrthancPluginContext *context, const OrthancPluginImage *image)
Return a pointer to the content of an image.
Definition OrthancCPlugin.h:4030
OrthancPluginFreeImage
void OrthancPluginFreeImage(OrthancPluginContext *context, OrthancPluginImage *image)
Free an image.
Definition OrthancCPlugin.h:4115
OrthancPluginCompressPngImage
OrthancPluginErrorCode OrthancPluginCompressPngImage(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer)
Encode a PNG image.
Definition OrthancCPlugin.h:4160
OrthancPluginDecodeDicomImage
OrthancPluginImage * OrthancPluginDecodeDicomImage(OrthancPluginContext *context, const void *buffer, uint32_t bufferSize, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition OrthancCPlugin.h:5527
OrthancPluginUncompressImage
OrthancPluginImage * OrthancPluginUncompressImage(OrthancPluginContext *context, const void *data, uint32_t size, OrthancPluginImageFormat format)
Decode a compressed image.
Definition OrthancCPlugin.h:4073
OrthancPluginGetFontName
const char * OrthancPluginGetFontName(OrthancPluginContext *context, uint32_t fontIndex)
Return the name of a font.
Definition OrthancCPlugin.h:4536
OrthancPluginImageFormat
OrthancPluginImageFormat
Definition OrthancCPlugin.h:775
OrthancPluginStorageArea
struct _OrthancPluginStorageArea_t OrthancPluginStorageArea
Opaque structure that represents the storage area that is actually used by Orthanc.
Definition OrthancCPlugin.h:1097
OrthancPluginCompressionType
OrthancPluginCompressionType
Definition OrthancCPlugin.h:760
OrthancPluginGetImageWidth
uint32_t OrthancPluginGetImageWidth(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the width of an image.
Definition OrthancCPlugin.h:3928
OrthancPluginBufferCompression
OrthancPluginErrorCode OrthancPluginBufferCompression(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const void *source, uint32_t size, OrthancPluginCompressionType compression, uint8_t uncompress)
Compress or decompress a buffer.
Definition OrthancCPlugin.h:3707
OrthancPluginGetFontSize
uint32_t OrthancPluginGetFontSize(OrthancPluginContext *context, uint32_t fontIndex)
Return the size of a font.
Definition OrthancCPlugin.h:4568
OrthancPluginCreateImageAccessor
OrthancPluginImage * OrthancPluginCreateImageAccessor(OrthancPluginContext *context, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, void *buffer)
Create an image pointing to a memory buffer.
Definition OrthancCPlugin.h:5481
OrthancPluginImage
struct _OrthancPluginImage_t OrthancPluginImage
Opaque structure that represents an image that is uncompressed in memory.
Definition OrthancCPlugin.h:1089
OrthancPluginPixelFormat_RGBA32
@ OrthancPluginPixelFormat_RGBA32
Color image in RGBA32 format.
Definition OrthancCPlugin.h:645
OrthancPluginPixelFormat_RGB48
@ OrthancPluginPixelFormat_RGB48
Color image in RGB48 format.
Definition OrthancCPlugin.h:655
OrthancPluginPixelFormat_Grayscale8
@ OrthancPluginPixelFormat_Grayscale8
Graylevel 8bpp image.
Definition OrthancCPlugin.h:613
OrthancPluginPixelFormat_SignedGrayscale16
@ OrthancPluginPixelFormat_SignedGrayscale16
Graylevel, signed 16bpp image.
Definition OrthancCPlugin.h:629
OrthancPluginPixelFormat_Float32
@ OrthancPluginPixelFormat_Float32
Graylevel, floating-point 32bpp image.
Definition OrthancCPlugin.h:671
OrthancPluginPixelFormat_RGB24
@ OrthancPluginPixelFormat_RGB24
Color image in RGB24 format.
Definition OrthancCPlugin.h:637
OrthancPluginPixelFormat_BGRA32
@ OrthancPluginPixelFormat_BGRA32
Color image in BGRA32 format.
Definition OrthancCPlugin.h:679
OrthancPluginPixelFormat_Unknown
@ OrthancPluginPixelFormat_Unknown
Definition OrthancCPlugin.h:647
OrthancPluginPixelFormat_Grayscale64
@ OrthancPluginPixelFormat_Grayscale64
Graylevel, unsigned 64bpp image.
Definition OrthancCPlugin.h:687
OrthancPluginPixelFormat_Grayscale32
@ OrthancPluginPixelFormat_Grayscale32
Graylevel, unsigned 32bpp image.
Definition OrthancCPlugin.h:663
OrthancPluginPixelFormat_Grayscale16
@ OrthancPluginPixelFormat_Grayscale16
Graylevel, unsigned 16bpp image.
Definition OrthancCPlugin.h:621
OrthancPluginImageFormat_Png
@ OrthancPluginImageFormat_Png
Definition OrthancCPlugin.h:776
OrthancPluginImageFormat_Jpeg
@ OrthancPluginImageFormat_Jpeg
Definition OrthancCPlugin.h:777
OrthancPluginImageFormat_Dicom
@ OrthancPluginImageFormat_Dicom
Definition OrthancCPlugin.h:778
OrthancPluginCompressionType_Gzip
@ OrthancPluginCompressionType_Gzip
Definition OrthancCPlugin.h:763
OrthancPluginCompressionType_ZlibWithSize
@ OrthancPluginCompressionType_ZlibWithSize
Definition OrthancCPlugin.h:762
OrthancPluginCompressionType_Zlib
@ OrthancPluginCompressionType_Zlib
Definition OrthancCPlugin.h:761
OrthancPluginCompressionType_GzipWithSize
@ OrthancPluginCompressionType_GzipWithSize
Definition OrthancCPlugin.h:764
OrthancPluginRestApiPost
OrthancPluginErrorCode OrthancPluginRestApiPost(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a POST call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2369
OrthancPluginRestApiPostAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiPostAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a POST call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2404
OrthancPluginRestApiPutAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiPutAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a PUT call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2517
OrthancPluginLookupStudyWithAccessionNumber
char * OrthancPluginLookupStudyWithAccessionNumber(OrthancPluginContext *context, const char *accessionNumber)
Look for a study, using the accession number.
Definition OrthancCPlugin.h:2653
OrthancPluginLookupSeries
char * OrthancPluginLookupSeries(OrthancPluginContext *context, const char *seriesUID)
Look for a series.
Definition OrthancCPlugin.h:2688
OrthancPluginSetGlobalProperty
OrthancPluginErrorCode OrthancPluginSetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *value)
Set the value of a global property.
Definition OrthancCPlugin.h:3465
OrthancPluginRestApiPut
OrthancPluginErrorCode OrthancPluginRestApiPut(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a PUT call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2481
OrthancPluginGetGlobalProperty
char * OrthancPluginGetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *defaultValue)
Get the value of a global property.
Definition OrthancCPlugin.h:3426
OrthancPluginLookupStudy
char * OrthancPluginLookupStudy(OrthancPluginContext *context, const char *studyUID)
Look for a study.
Definition OrthancCPlugin.h:2618
OrthancPluginRestApiGet
OrthancPluginErrorCode OrthancPluginRestApiGet(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri)
Make a GET call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2302
OrthancPluginLookupInstance
char * OrthancPluginLookupInstance(OrthancPluginContext *context, const char *sopInstanceUID)
Look for an instance.
Definition OrthancCPlugin.h:2723
OrthancPluginRestApiGetAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiGetAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri)
Make a GET call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2332
OrthancPluginLookupPatient
char * OrthancPluginLookupPatient(OrthancPluginContext *context, const char *patientID)
Look for a patient.
Definition OrthancCPlugin.h:2583
OrthancPluginRestApiDelete
OrthancPluginErrorCode OrthancPluginRestApiDelete(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2433
OrthancPluginRestApiDeleteAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2456
OrthancPluginCallRestApi
OrthancPluginErrorCode OrthancPluginCallRestApi(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *uri, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, const void *body, uint32_t bodySize, uint8_t afterPlugins)
Call the REST API of Orthanc with full flexibility.
Definition OrthancCPlugin.h:8702
OrthancPluginGenerateRestApiAuthorizationToken
char * OrthancPluginGenerateRestApiAuthorizationToken(OrthancPluginContext *context)
Generate a token to grant full access to the REST API of Orthanc.
Definition OrthancCPlugin.h:8504
OrthancPluginRestApiGet2
OrthancPluginErrorCode OrthancPluginRestApiGet2(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, int32_t afterPlugins)
Make a GET call to the Orthanc REST API, with custom HTTP headers.
Definition OrthancCPlugin.h:5101
OrthancPluginGetDicomForInstance
OrthancPluginErrorCode OrthancPluginGetDicomForInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *instanceId)
Retrieve a DICOM instance using its Orthanc identifier.
Definition OrthancCPlugin.h:2269
OrthancPluginCompressAndAnswerPngImage
void OrthancPluginCompressAndAnswerPngImage(OrthancPluginContext *context, OrthancPluginRestOutput *output, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer)
Answer to a REST request with a PNG image.
Definition OrthancCPlugin.h:2228
OrthancPluginSendUnauthorized
void OrthancPluginSendUnauthorized(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *realm)
Signal that a REST request is not authorized.
Definition OrthancCPlugin.h:2791
OrthancPluginSetHttpErrorDetails
void OrthancPluginSetHttpErrorDetails(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *details, uint8_t log)
Provide a detailed description for an HTTP error.
Definition OrthancCPlugin.h:6864
OrthancPluginSendMethodNotAllowed
void OrthancPluginSendMethodNotAllowed(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *allowedMethods)
Signal that this URI does not support this HTTP method.
Definition OrthancCPlugin.h:2814
OrthancPluginAnswerBuffer
void OrthancPluginAnswerBuffer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize, const char *mimeType)
Answer to a REST request.
Definition OrthancCPlugin.h:2171
OrthancPluginSendHttpStatusCode
void OrthancPluginSendHttpStatusCode(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status)
Send a HTTP status code.
Definition OrthancCPlugin.h:2768
OrthancPluginSetHttpHeader
void OrthancPluginSetHttpHeader(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *key, const char *value)
Set some HTTP header.
Definition OrthancCPlugin.h:2869
OrthancPluginSetCookie
void OrthancPluginSetCookie(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *cookie, const char *value)
Set a cookie.
Definition OrthancCPlugin.h:2844
OrthancPluginRedirect
void OrthancPluginRedirect(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *redirection)
Redirect a REST request.
Definition OrthancCPlugin.h:2551
OrthancPluginCompressAndAnswerJpegImage
void OrthancPluginCompressAndAnswerJpegImage(OrthancPluginContext *context, OrthancPluginRestOutput *output, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer, uint8_t quality)
Answer to a REST request with a JPEG image.
Definition OrthancCPlugin.h:4252
OrthancPluginSendMultipartItem
OrthancPluginErrorCode OrthancPluginSendMultipartItem(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize)
Send an item as a part of some HTTP multipart answer.
Definition OrthancCPlugin.h:3665
OrthancPluginSendMultipartItem2
OrthancPluginErrorCode OrthancPluginSendMultipartItem2(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues)
Send an item as a part of some HTTP multipart answer, with custom headers.
Definition OrthancCPlugin.h:5698
OrthancPluginStartMultipartAnswer
OrthancPluginErrorCode OrthancPluginStartMultipartAnswer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *subType, const char *contentType)
Start an HTTP multipart answer.
Definition OrthancCPlugin.h:3636
OrthancPluginSendHttpStatus
void OrthancPluginSendHttpStatus(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status, const char *body, uint32_t bodySize)
Send a HTTP status, with a custom body.
Definition OrthancCPlugin.h:3859
OrthancPluginJobStop
OrthancPluginErrorCode(* OrthancPluginJobStop)(void *job, OrthancPluginJobStopReason reason)
Callback executed once one custom job leaves the "running" state.
Definition OrthancCPlugin.h:1638
OrthancPluginServerChunkedRequestReaderExecute
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderExecute)(OrthancPluginServerChunkedRequestReader *reader, OrthancPluginRestOutput *output)
Callback invoked whenever the request body is entirely received.
Definition OrthancCPlugin.h:7476
OrthancPluginHttpClient
OrthancPluginErrorCode OrthancPluginHttpClient(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *url, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, const void *body, uint32_t bodySize, const char *username, const char *password, uint32_t timeout, const char *certificateFile, const char *certificateKeyFile, const char *certificateKeyPassword, uint8_t pkcs11)
Issue a HTTP call with full flexibility.
Definition OrthancCPlugin.h:5811
OrthancPluginJob
struct _OrthancPluginJob_t OrthancPluginJob
Opaque structure to a job to be executed by Orthanc.
Definition OrthancCPlugin.h:1153
OrthancPluginCreateDicom2
OrthancPluginErrorCode OrthancPluginCreateDicom2(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *json, const OrthancPluginImage *pixelData, OrthancPluginCreateDicomFlags flags, const char *privateCreator)
Create a DICOM instance from a JSON string and an image, with a private creator.
Definition OrthancCPlugin.h:8634
OrthancPluginLogInfo
void OrthancPluginLogInfo(OrthancPluginContext *context, const char *message)
Log an information.
Definition OrthancCPlugin.h:2025
OrthancPluginServerChunkedRequestReaderFactory
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderFactory)(OrthancPluginServerChunkedRequestReader **reader, const char *url, const OrthancPluginHttpRequest *request)
Callback to create a reader to handle incoming chunked HTTP transfers.
Definition OrthancCPlugin.h:7437
OrthancPluginFreeFindMatcher
void OrthancPluginFreeFindMatcher(OrthancPluginContext *context, OrthancPluginFindMatcher *matcher)
Free a C-Find matcher.
Definition OrthancCPlugin.h:6228
OrthancPluginFreePeers
void OrthancPluginFreePeers(OrthancPluginContext *context, OrthancPluginPeers *peers)
Free the list of available Orthanc peers.
Definition OrthancCPlugin.h:6365
OrthancPluginRegisterPrivateDictionaryTag
OrthancPluginErrorCode OrthancPluginRegisterPrivateDictionaryTag(OrthancPluginContext *context, uint16_t group, uint16_t element, OrthancPluginValueRepresentation vr, const char *name, uint32_t minMultiplicity, uint32_t maxMultiplicity, const char *privateCreator)
Register a new private tag into the DICOM dictionary.
Definition OrthancCPlugin.h:4906
OrthancPluginIdentifierConstraint
OrthancPluginIdentifierConstraint
Definition OrthancCPlugin.h:879
OrthancPluginRegisterDictionaryTag
OrthancPluginErrorCode OrthancPluginRegisterDictionaryTag(OrthancPluginContext *context, uint16_t group, uint16_t element, OrthancPluginValueRepresentation vr, const char *name, uint32_t minMultiplicity, uint32_t maxMultiplicity)
Register a new tag into the DICOM dictionary.
Definition OrthancCPlugin.h:4853
OrthancPluginResourceType
OrthancPluginResourceType
Definition OrthancCPlugin.h:713
OrthancPluginWriteFile
OrthancPluginErrorCode OrthancPluginWriteFile(OrthancPluginContext *context, const char *path, const void *data, uint32_t size)
Write a file.
Definition OrthancCPlugin.h:3775
OrthancPluginGetCommandLineArgumentsCount
uint32_t OrthancPluginGetCommandLineArgumentsCount(OrthancPluginContext *context)
Get the number of command-line arguments.
Definition OrthancCPlugin.h:3496
OrthancPluginComputeMd5
char * OrthancPluginComputeMd5(OrthancPluginContext *context, const void *buffer, uint32_t size)
Compute an MD5 hash.
Definition OrthancCPlugin.h:5573
OrthancPluginErrorCode
OrthancPluginErrorCode
Definition OrthancCPlugin.h:201
OrthancPluginPeers
struct _OrthancPluginPeers_t OrthancPluginPeers
Opaque structure to the set of remote Orthanc Peers that are known to the local Orthanc server.
Definition OrthancCPlugin.h:1145
OrthancPluginHttpPost
OrthancPluginErrorCode OrthancPluginHttpPost(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const void *body, uint32_t bodySize, const char *username, const char *password)
Issue a HTTP POST call.
Definition OrthancCPlugin.h:4343
OrthancPluginChunkedClientRequestGetChunkSize
uint32_t(* OrthancPluginChunkedClientRequestGetChunkSize)(void *request)
Callback to read the size of the current request chunk during a chunked transfer.
Definition OrthancCPlugin.h:7278
OrthancPluginRegisterErrorCode
OrthancPluginErrorCode OrthancPluginRegisterErrorCode(OrthancPluginContext *context, int32_t code, uint16_t httpStatus, const char *message)
Declare a custom error code for this plugin.
Definition OrthancCPlugin.h:4797
OrthancPluginCreateMemoryBuffer
OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, uint32_t size)
Create a 32-bit memory buffer.
Definition OrthancCPlugin.h:8466
OrthancPluginDicomWebBinaryMode
OrthancPluginDicomWebBinaryMode
Definition OrthancCPlugin.h:968
OrthancPluginChunkedClientRequestNext
OrthancPluginErrorCode(* OrthancPluginChunkedClientRequestNext)(void *request)
Callback to advance in the request body during a chunked transfer.
Definition OrthancCPlugin.h:7246
OrthancPluginDicomWebNode
struct _OrthancPluginDicomWebNode_t OrthancPluginDicomWebNode
Opaque structure that represents a node in a JSON or XML document used in DICOMweb.
Definition OrthancCPlugin.h:1162
OrthancPluginJobGetProgress
float(* OrthancPluginJobGetProgress)(void *job)
Callback to check the progress of one custom job.
Definition OrthancCPlugin.h:1566
OrthancPluginEncodeDicomWebJson
char * OrthancPluginEncodeDicomWebJson(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback callback)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:7006
OrthancPluginCreateFindMatcher
OrthancPluginFindMatcher * OrthancPluginCreateFindMatcher(OrthancPluginContext *context, const void *query, uint32_t size)
Create a C-Find matcher.
Definition OrthancCPlugin.h:6190
OrthancPluginDicomToJsonFlags
OrthancPluginDicomToJsonFlags
Definition OrthancCPlugin.h:843
OrthancPluginJobStepStatus
OrthancPluginJobStepStatus
Definition OrthancCPlugin.h:925
OrthancPluginCreateDicomFlags
OrthancPluginCreateDicomFlags
Definition OrthancCPlugin.h:864
OrthancPluginServerChunkedRequestReaderFinalize
void(* OrthancPluginServerChunkedRequestReaderFinalize)(OrthancPluginServerChunkedRequestReader *reader)
Callback invoked to release the resources associated with an incoming HTTP chunked transfer.
Definition OrthancCPlugin.h:7494
OrthancPluginFindMatcherIsMatch
int32_t OrthancPluginFindMatcherIsMatch(OrthancPluginContext *context, const OrthancPluginFindMatcher *matcher, const void *dicom, uint32_t size)
Test whether a DICOM instance matches a C-Find query.
Definition OrthancCPlugin.h:6261
OrthancPluginExtendOrthancExplorer
void OrthancPluginExtendOrthancExplorer(OrthancPluginContext *context, const char *javascript)
Extend the JavaScript code of Orthanc Explorer.
Definition OrthancCPlugin.h:3392
OrthancPluginLogWarning
void OrthancPluginLogWarning(OrthancPluginContext *context, const char *message)
Log a warning.
Definition OrthancCPlugin.h:2009
OrthancPluginGetPeerName
const char * OrthancPluginGetPeerName(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex)
Get the symbolic name of an Orthanc peer.
Definition OrthancCPlugin.h:6443
OrthancPluginGetPeers
OrthancPluginPeers * OrthancPluginGetPeers(OrthancPluginContext *context)
Return the list of available Orthanc peers.
Definition OrthancCPlugin.h:6331
OrthancPluginConstraintType
OrthancPluginConstraintType
Definition OrthancCPlugin.h:894
OrthancPluginGetOrthancDirectory
char * OrthancPluginGetOrthancDirectory(OrthancPluginContext *context)
Return the directory containing the Orthanc.
Definition OrthancCPlugin.h:3236
OrthancPluginReadFile
OrthancPluginErrorCode OrthancPluginReadFile(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *path)
Read a file.
Definition OrthancCPlugin.h:3744
OrthancPluginJobStep
OrthancPluginJobStepStatus(* OrthancPluginJobStep)(void *job)
Callback to execute one step of a custom job.
Definition OrthancCPlugin.h:1614
OrthancPluginComputeSha1
char * OrthancPluginComputeSha1(OrthancPluginContext *context, const void *buffer, uint32_t size)
Compute a SHA-1 hash.
Definition OrthancCPlugin.h:5609
OrthancPluginGetCommandLineArgument
char * OrthancPluginGetCommandLineArgument(OrthancPluginContext *context, uint32_t argument)
Get the value of a command-line argument.
Definition OrthancCPlugin.h:3530
OrthancPluginSetMetricsValue
void OrthancPluginSetMetricsValue(OrthancPluginContext *context, const char *name, float value, OrthancPluginMetricsType type)
Set the value of a metrics.
Definition OrthancCPlugin.h:6940
OrthancPluginServerChunkedRequestReaderAddChunk
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderAddChunk)(OrthancPluginServerChunkedRequestReader *reader, const void *data, uint32_t size)
Callback invoked whenever a new data chunk is available during a chunked transfer.
Definition OrthancCPlugin.h:7456
OrthancPluginReceivedInstanceAction
OrthancPluginReceivedInstanceAction
Definition OrthancCPlugin.h:1015
OrthancPluginChunkedHttpClient
OrthancPluginErrorCode OrthancPluginChunkedHttpClient(OrthancPluginContext *context, void *answer, OrthancPluginChunkedClientAnswerAddChunk answerAddChunk, OrthancPluginChunkedClientAnswerAddHeader answerAddHeader, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *url, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, void *request, OrthancPluginChunkedClientRequestIsDone requestIsDone, OrthancPluginChunkedClientRequestGetChunkData requestChunkData, OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize, OrthancPluginChunkedClientRequestNext requestNext, const char *username, const char *password, uint32_t timeout, const char *certificateFile, const char *certificateKeyFile, const char *certificateKeyPassword, uint8_t pkcs11)
Issue a HTTP call, using chunked HTTP transfers.
Definition OrthancCPlugin.h:7357
OrthancPluginFreeMemoryBuffer64
void OrthancPluginFreeMemoryBuffer64(OrthancPluginContext *context, OrthancPluginMemoryBuffer64 *buffer)
Free a memory buffer.
Definition OrthancCPlugin.h:1977
OrthancPluginHttpPut
OrthancPluginErrorCode OrthancPluginHttpPut(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const void *body, uint32_t bodySize, const char *username, const char *password)
Issue a HTTP PUT call.
Definition OrthancCPlugin.h:4385
OrthancPluginDicomBufferToJson
char * OrthancPluginDicomBufferToJson(OrthancPluginContext *context, const void *buffer, uint32_t size, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM memory buffer as a JSON string.
Definition OrthancCPlugin.h:4994
OrthancPluginCreateDicom
OrthancPluginErrorCode OrthancPluginCreateDicom(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *json, const OrthancPluginImage *pixelData, OrthancPluginCreateDicomFlags flags)
Create a DICOM instance from a JSON string and an image.
Definition OrthancCPlugin.h:5364
OrthancPluginDicomInstanceToJson
char * OrthancPluginDicomInstanceToJson(OrthancPluginContext *context, const char *instanceId, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM instance as a JSON string.
Definition OrthancCPlugin.h:5043
OrthancPluginFreeJob
void OrthancPluginFreeJob(OrthancPluginContext *context, OrthancPluginJob *job)
Free a custom job.
Definition OrthancCPlugin.h:6751
OrthancPluginGetDatabaseServerIdentifier
const char * OrthancPluginGetDatabaseServerIdentifier(OrthancPluginContext *context)
Gets the DatabaseServerIdentifier.
Definition OrthancCPlugin.h:9016
OrthancPluginSubmitJob
char * OrthancPluginSubmitJob(OrthancPluginContext *context, OrthancPluginJob *job, int priority)
Submit a new job to the jobs engine of Orthanc.
Definition OrthancCPlugin.h:6783
OrthancPluginGenerateUuid
char * OrthancPluginGenerateUuid(OrthancPluginContext *context)
Generate an UUID.
Definition OrthancCPlugin.h:5866
OrthancPluginStorageCommitmentFailureReason
OrthancPluginStorageCommitmentFailureReason
Definition OrthancCPlugin.h:981
OrthancPluginChunkedClientAnswerAddChunk
OrthancPluginErrorCode(* OrthancPluginChunkedClientAnswerAddChunk)(void *answer, const void *data, uint32_t size)
Callback executed when an answer chunk is received during a chunked transfer.
Definition OrthancCPlugin.h:7209
OrthancPluginGetPeerUserProperty
const char * OrthancPluginGetPeerUserProperty(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex, const char *userProperty)
Get some user-defined property of an Orthanc peer.
Definition OrthancCPlugin.h:6530
OrthancPluginMetricsType
OrthancPluginMetricsType
Definition OrthancCPlugin.h:951
OrthancPluginAutodetectMimeType
const char * OrthancPluginAutodetectMimeType(OrthancPluginContext *context, const char *path)
Detect the MIME type of a file.
Definition OrthancCPlugin.h:6896
OrthancPluginHttpDelete
OrthancPluginErrorCode OrthancPluginHttpDelete(OrthancPluginContext *context, const char *url, const char *username, const char *password)
Issue a HTTP DELETE call.
Definition OrthancCPlugin.h:4423
OrthancPluginChunkedClientRequestIsDone
uint8_t(* OrthancPluginChunkedClientRequestIsDone)(void *request)
Callback to know whether the request body is entirely read during a chunked transfer.
Definition OrthancCPlugin.h:7229
OrthancPluginChunkedClientRequestGetChunkData
const void *(* OrthancPluginChunkedClientRequestGetChunkData)(void *request)
Callback to read the current chunk of the request body during a chunked transfer.
Definition OrthancCPlugin.h:7262
OrthancPluginCreateJob
OrthancPluginJob * OrthancPluginCreateJob(OrthancPluginContext *context, void *job, OrthancPluginJobFinalize finalize, const char *type, OrthancPluginJobGetProgress getProgress, OrthancPluginJobGetContent getContent, OrthancPluginJobGetSerialized getSerialized, OrthancPluginJobStep step, OrthancPluginJobStop stop, OrthancPluginJobReset reset)
Create a custom job.
Definition OrthancCPlugin.h:6696
OrthancPluginFreeMemoryBuffer
void OrthancPluginFreeMemoryBuffer(OrthancPluginContext *context, OrthancPluginMemoryBuffer *buffer)
Free a memory buffer.
Definition OrthancCPlugin.h:1961
OrthancPluginEncodeDicomWebXml
char * OrthancPluginEncodeDicomWebXml(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback callback)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:7048
OrthancPluginJobGetSerialized
const char *(* OrthancPluginJobGetSerialized)(void *job)
Callback to serialize one custom job.
Definition OrthancCPlugin.h:1599
OrthancPluginGetConfiguration
char * OrthancPluginGetConfiguration(OrthancPluginContext *context)
Return the content of the configuration file(s).
Definition OrthancCPlugin.h:3595
OrthancPluginCreateMemoryBuffer64
OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer64(OrthancPluginContext *context, OrthancPluginMemoryBuffer64 *target, uint64_t size)
Create a 64-bit memory buffer.
Definition OrthancCPlugin.h:8550
OrthancPluginChunkedClientAnswerAddHeader
OrthancPluginErrorCode(* OrthancPluginChunkedClientAnswerAddHeader)(void *answer, const char *key, const char *value)
Callback executed when a HTTP header is received during a chunked transfer.
Definition OrthancCPlugin.h:7188
OrthancPluginGetPeersCount
uint32_t OrthancPluginGetPeersCount(OrthancPluginContext *context, const OrthancPluginPeers *peers)
Get the number of Orthanc peers.
Definition OrthancCPlugin.h:6395
OrthancPluginJobGetContent
const char *(* OrthancPluginJobGetContent)(void *job)
Callback to retrieve the content of one custom job.
Definition OrthancCPlugin.h:1581
OrthancPluginValueRepresentation
OrthancPluginValueRepresentation
Definition OrthancCPlugin.h:789
OrthancPluginHttpGet
OrthancPluginErrorCode OrthancPluginHttpGet(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const char *username, const char *password)
Issue a HTTP GET call.
Definition OrthancCPlugin.h:4305
OrthancPluginJobStopReason
OrthancPluginJobStopReason
Definition OrthancCPlugin.h:939
OrthancPluginGetOrthancPath
char * OrthancPluginGetOrthancPath(OrthancPluginContext *context)
Return the path to the Orthanc executable.
Definition OrthancCPlugin.h:3206
OrthancPluginDicomToJsonFormat
OrthancPluginDicomToJsonFormat
Definition OrthancCPlugin.h:828
OrthancPluginLogError
void OrthancPluginLogError(OrthancPluginContext *context, const char *message)
Log an error.
Definition OrthancCPlugin.h:1993
OrthancPluginGetConfigurationPath
char * OrthancPluginGetConfigurationPath(OrthancPluginContext *context)
Return the path to the configuration file(s).
Definition OrthancCPlugin.h:3271
OrthancPluginHttpMethod
OrthancPluginHttpMethod
Definition OrthancCPlugin.h:326
OrthancPluginSetRootUri
void OrthancPluginSetRootUri(OrthancPluginContext *context, const char *uri)
Set the URI where the plugin provides its Web interface.
Definition OrthancCPlugin.h:3348
OrthancPluginEncodeDicomWebXml2
char * OrthancPluginEncodeDicomWebXml2(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:7144
OrthancPluginCallPeerApi
OrthancPluginErrorCode OrthancPluginCallPeerApi(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, const OrthancPluginPeers *peers, uint32_t peerIndex, OrthancPluginHttpMethod method, const char *uri, uint32_t additionalHeadersCount, const char *const *additionalHeadersKeys, const char *const *additionalHeadersValues, const void *body, uint32_t bodySize, uint32_t timeout)
Call the REST API of an Orthanc peer.
Definition OrthancCPlugin.h:6611
OrthancPluginFindMatcher
struct _OrthancPluginFindMatcher_t OrthancPluginFindMatcher
Opaque structure to an object that can be used to check whether a DICOM instance matches a C-Find que...
Definition OrthancCPlugin.h:1137
OrthancPluginEncodeDicomWebJson2
char * OrthancPluginEncodeDicomWebJson2(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:7100
OrthancPluginLookupDictionary
OrthancPluginErrorCode OrthancPluginLookupDictionary(OrthancPluginContext *context, OrthancPluginDictionaryEntry *target, const char *name)
Get information about the given DICOM tag.
Definition OrthancCPlugin.h:5655
OrthancPluginInstanceOrigin
OrthancPluginInstanceOrigin
Definition OrthancCPlugin.h:909
OrthancPluginJobFinalize
void(* OrthancPluginJobFinalize)(void *job)
Callback to finalize one custom job.
Definition OrthancCPlugin.h:1553
OrthancPluginFreeString
void OrthancPluginFreeString(OrthancPluginContext *context, char *str)
Free a string.
Definition OrthancCPlugin.h:1806
OrthancPluginJobReset
OrthancPluginErrorCode(* OrthancPluginJobReset)(void *job)
Callback executed once one stopped custom job is started again.
Definition OrthancCPlugin.h:1655
OrthancPluginGetErrorDescription
const char * OrthancPluginGetErrorDescription(OrthancPluginContext *context, OrthancPluginErrorCode error)
Get the description of a given error code.
Definition OrthancCPlugin.h:3806
OrthancPluginContext
struct _OrthancPluginContext_t OrthancPluginContext
Data structure that contains information about the Orthanc core.
OrthancPluginContentType
OrthancPluginContentType
Definition OrthancCPlugin.h:698
OrthancPluginGetPeerUrl
const char * OrthancPluginGetPeerUrl(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex)
Get the base URL of an Orthanc peer.
Definition OrthancCPlugin.h:6484
OrthancPluginSetDescription
void OrthancPluginSetDescription(OrthancPluginContext *context, const char *description)
Set a description for this plugin.
Definition OrthancCPlugin.h:3370
OrthancPluginGetTagName
char * OrthancPluginGetTagName(OrthancPluginContext *context, uint16_t group, uint16_t element, const char *privateCreator)
Returns the symbolic name of a DICOM tag.
Definition OrthancCPlugin.h:7590
OrthancPluginIdentifierConstraint_Wildcard
@ OrthancPluginIdentifierConstraint_Wildcard
Definition OrthancCPlugin.h:883
OrthancPluginIdentifierConstraint_Equal
@ OrthancPluginIdentifierConstraint_Equal
Definition OrthancCPlugin.h:880
OrthancPluginIdentifierConstraint_SmallerOrEqual
@ OrthancPluginIdentifierConstraint_SmallerOrEqual
Definition OrthancCPlugin.h:881
OrthancPluginIdentifierConstraint_GreaterOrEqual
@ OrthancPluginIdentifierConstraint_GreaterOrEqual
Definition OrthancCPlugin.h:882
OrthancPluginResourceType_Instance
@ OrthancPluginResourceType_Instance
Definition OrthancCPlugin.h:717
OrthancPluginResourceType_None
@ OrthancPluginResourceType_None
Definition OrthancCPlugin.h:718
OrthancPluginResourceType_Series
@ OrthancPluginResourceType_Series
Definition OrthancCPlugin.h:716
OrthancPluginResourceType_Study
@ OrthancPluginResourceType_Study
Definition OrthancCPlugin.h:715
OrthancPluginResourceType_Patient
@ OrthancPluginResourceType_Patient
Definition OrthancCPlugin.h:714
OrthancPluginErrorCode_CreateDicomBadParent
@ OrthancPluginErrorCode_CreateDicomBadParent
Definition OrthancCPlugin.h:288
OrthancPluginErrorCode_MainDicomTagsMultiplyDefined
@ OrthancPluginErrorCode_MainDicomTagsMultiplyDefined
Definition OrthancCPlugin.h:247
OrthancPluginErrorCode_SQLiteFlush
@ OrthancPluginErrorCode_SQLiteFlush
Definition OrthancCPlugin.h:256
OrthancPluginErrorCode_IncompatibleDatabaseVersion
@ OrthancPluginErrorCode_IncompatibleDatabaseVersion
Definition OrthancCPlugin.h:221
OrthancPluginErrorCode_BadSequenceOfCalls
@ OrthancPluginErrorCode_BadSequenceOfCalls
Definition OrthancCPlugin.h:209
OrthancPluginErrorCode_SharedLibrary
@ OrthancPluginErrorCode_SharedLibrary
Definition OrthancCPlugin.h:228
OrthancPluginErrorCode_NullPointer
@ OrthancPluginErrorCode_NullPointer
Definition OrthancCPlugin.h:238
OrthancPluginErrorCode_NotLuaPredicate
@ OrthancPluginErrorCode_NotLuaPredicate
Definition OrthancCPlugin.h:298
OrthancPluginErrorCode_LuaAlreadyExecuted
@ OrthancPluginErrorCode_LuaAlreadyExecuted
Definition OrthancCPlugin.h:296
OrthancPluginErrorCode_NotAcceptable
@ OrthancPluginErrorCode_NotAcceptable
Definition OrthancCPlugin.h:237
OrthancPluginErrorCode_FullStorage
@ OrthancPluginErrorCode_FullStorage
Definition OrthancCPlugin.h:222
OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered
@ OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered
Definition OrthancCPlugin.h:301
OrthancPluginErrorCode_InexistentFile
@ OrthancPluginErrorCode_InexistentFile
Definition OrthancCPlugin.h:216
OrthancPluginErrorCode_CreateDicomParentEncoding
@ OrthancPluginErrorCode_CreateDicomParentEncoding
Definition OrthancCPlugin.h:290
OrthancPluginErrorCode_CannotOrderSlices
@ OrthancPluginErrorCode_CannotOrderSlices
Definition OrthancCPlugin.h:304
OrthancPluginErrorCode_InternalError
@ OrthancPluginErrorCode_InternalError
Definition OrthancCPlugin.h:202
OrthancPluginErrorCode_DiscontinuedAbi
@ OrthancPluginErrorCode_DiscontinuedAbi
Definition OrthancCPlugin.h:243
OrthancPluginErrorCode_NoCFindHandler
@ OrthancPluginErrorCode_NoCFindHandler
Definition OrthancCPlugin.h:274
OrthancPluginErrorCode_SQLiteCommitWithoutTransaction
@ OrthancPluginErrorCode_SQLiteCommitWithoutTransaction
Definition OrthancCPlugin.h:254
OrthancPluginErrorCode_DatabasePlugin
@ OrthancPluginErrorCode_DatabasePlugin
Definition OrthancCPlugin.h:234
OrthancPluginErrorCode_SQLiteStatementAlreadyUsed
@ OrthancPluginErrorCode_SQLiteStatementAlreadyUsed
Definition OrthancCPlugin.h:251
OrthancPluginErrorCode_SQLiteCannotRun
@ OrthancPluginErrorCode_SQLiteCannotRun
Definition OrthancCPlugin.h:257
OrthancPluginErrorCode_UnknownPluginService
@ OrthancPluginErrorCode_UnknownPluginService
Definition OrthancCPlugin.h:229
OrthancPluginErrorCode_JsonToLuaTable
@ OrthancPluginErrorCode_JsonToLuaTable
Definition OrthancCPlugin.h:293
OrthancPluginErrorCode_CreateDicomOverrideTag
@ OrthancPluginErrorCode_CreateDicomOverrideTag
Definition OrthancCPlugin.h:284
OrthancPluginErrorCode_SQLiteBindOutOfRange
@ OrthancPluginErrorCode_SQLiteBindOutOfRange
Definition OrthancCPlugin.h:259
OrthancPluginErrorCode_ParameterOutOfRange
@ OrthancPluginErrorCode_ParameterOutOfRange
Definition OrthancCPlugin.h:206
OrthancPluginErrorCode_SQLiteRegisterFunction
@ OrthancPluginErrorCode_SQLiteRegisterFunction
Definition OrthancCPlugin.h:255
OrthancPluginErrorCode_SQLiteTransactionBegin
@ OrthancPluginErrorCode_SQLiteTransactionBegin
Definition OrthancCPlugin.h:263
OrthancPluginErrorCode_CreateDicomNoPayload
@ OrthancPluginErrorCode_CreateDicomNoPayload
Definition OrthancCPlugin.h:286
OrthancPluginErrorCode_Unauthorized
@ OrthancPluginErrorCode_Unauthorized
Definition OrthancCPlugin.h:232
OrthancPluginErrorCode_RegularFileExpected
@ OrthancPluginErrorCode_RegularFileExpected
Definition OrthancCPlugin.h:270
OrthancPluginErrorCode_DicomPortInUse
@ OrthancPluginErrorCode_DicomPortInUse
Definition OrthancCPlugin.h:268
OrthancPluginErrorCode_BadApplicationEntityTitle
@ OrthancPluginErrorCode_BadApplicationEntityTitle
Definition OrthancCPlugin.h:273
OrthancPluginErrorCode_NoCStoreHandler
@ OrthancPluginErrorCode_NoCStoreHandler
Definition OrthancCPlugin.h:276
OrthancPluginErrorCode_PathToExecutable
@ OrthancPluginErrorCode_PathToExecutable
Definition OrthancCPlugin.h:271
OrthancPluginErrorCode_NoSopClassOrInstance
@ OrthancPluginErrorCode_NoSopClassOrInstance
Definition OrthancCPlugin.h:278
OrthancPluginErrorCode_BadFont
@ OrthancPluginErrorCode_BadFont
Definition OrthancCPlugin.h:233
OrthancPluginErrorCode_DatabaseUnavailable
@ OrthancPluginErrorCode_DatabaseUnavailable
Definition OrthancCPlugin.h:239
OrthancPluginErrorCode_CannotCreateLua
@ OrthancPluginErrorCode_CannotCreateLua
Definition OrthancCPlugin.h:294
OrthancPluginErrorCode_SQLiteExecute
@ OrthancPluginErrorCode_SQLiteExecute
Definition OrthancCPlugin.h:252
OrthancPluginErrorCode_UriSyntax
@ OrthancPluginErrorCode_UriSyntax
Definition OrthancCPlugin.h:215
OrthancPluginErrorCode_DirectoryOverFile
@ OrthancPluginErrorCode_DirectoryOverFile
Definition OrthancCPlugin.h:264
OrthancPluginErrorCode_Revision
@ OrthancPluginErrorCode_Revision
Definition OrthancCPlugin.h:246
OrthancPluginErrorCode_InexistentTag
@ OrthancPluginErrorCode_InexistentTag
Definition OrthancCPlugin.h:224
OrthancPluginErrorCode_IncompatibleImageFormat
@ OrthancPluginErrorCode_IncompatibleImageFormat
Definition OrthancCPlugin.h:226
OrthancPluginErrorCode_UnsupportedMediaType
@ OrthancPluginErrorCode_UnsupportedMediaType
Definition OrthancCPlugin.h:309
OrthancPluginErrorCode_DicomFindUnavailable
@ OrthancPluginErrorCode_DicomFindUnavailable
Definition OrthancCPlugin.h:280
OrthancPluginErrorCode_SQLiteCannotStep
@ OrthancPluginErrorCode_SQLiteCannotStep
Definition OrthancCPlugin.h:258
OrthancPluginErrorCode_CreateDicomParentIsInstance
@ OrthancPluginErrorCode_CreateDicomParentIsInstance
Definition OrthancCPlugin.h:289
OrthancPluginErrorCode_StorageAreaAlreadyRegistered
@ OrthancPluginErrorCode_StorageAreaAlreadyRegistered
Definition OrthancCPlugin.h:300
OrthancPluginErrorCode_LuaReturnsNoString
@ OrthancPluginErrorCode_LuaReturnsNoString
Definition OrthancCPlugin.h:299
OrthancPluginErrorCode_UnknownResource
@ OrthancPluginErrorCode_UnknownResource
Definition OrthancCPlugin.h:220
OrthancPluginErrorCode_CreateDicomNotString
@ OrthancPluginErrorCode_CreateDicomNotString
Definition OrthancCPlugin.h:283
OrthancPluginErrorCode_HttpPortInUse
@ OrthancPluginErrorCode_HttpPortInUse
Definition OrthancCPlugin.h:267
OrthancPluginErrorCode_SslDisabled
@ OrthancPluginErrorCode_SslDisabled
Definition OrthancCPlugin.h:303
OrthancPluginErrorCode_UnknownModality
@ OrthancPluginErrorCode_UnknownModality
Definition OrthancCPlugin.h:291
OrthancPluginErrorCode_BadHttpStatusInRest
@ OrthancPluginErrorCode_BadHttpStatusInRest
Definition OrthancCPlugin.h:269
OrthancPluginErrorCode_BadGeometry
@ OrthancPluginErrorCode_BadGeometry
Definition OrthancCPlugin.h:241
OrthancPluginErrorCode_AlreadyExistingTag
@ OrthancPluginErrorCode_AlreadyExistingTag
Definition OrthancCPlugin.h:306
OrthancPluginErrorCode_FileStorageCannotWrite
@ OrthancPluginErrorCode_FileStorageCannotWrite
Definition OrthancCPlugin.h:265
OrthancPluginErrorCode_CreateDicomUseDataUriScheme
@ OrthancPluginErrorCode_CreateDicomUseDataUriScheme
Definition OrthancCPlugin.h:287
OrthancPluginErrorCode_DirectoryExpected
@ OrthancPluginErrorCode_DirectoryExpected
Definition OrthancCPlugin.h:266
OrthancPluginErrorCode_NoCMoveHandler
@ OrthancPluginErrorCode_NoCMoveHandler
Definition OrthancCPlugin.h:275
OrthancPluginErrorCode_SQLitePrepareStatement
@ OrthancPluginErrorCode_SQLitePrepareStatement
Definition OrthancCPlugin.h:260
OrthancPluginErrorCode_CorruptedFile
@ OrthancPluginErrorCode_CorruptedFile
Definition OrthancCPlugin.h:223
OrthancPluginErrorCode_StorageAreaPlugin
@ OrthancPluginErrorCode_StorageAreaPlugin
Definition OrthancCPlugin.h:235
OrthancPluginErrorCode_BadJobOrdering
@ OrthancPluginErrorCode_BadJobOrdering
Definition OrthancCPlugin.h:292
OrthancPluginErrorCode_DatabaseCannotSerialize
@ OrthancPluginErrorCode_DatabaseCannotSerialize
Definition OrthancCPlugin.h:245
OrthancPluginErrorCode_CanceledJob
@ OrthancPluginErrorCode_CanceledJob
Definition OrthancCPlugin.h:240
OrthancPluginErrorCode_BadRange
@ OrthancPluginErrorCode_BadRange
Definition OrthancCPlugin.h:244
OrthancPluginErrorCode_NotImplemented
@ OrthancPluginErrorCode_NotImplemented
Definition OrthancCPlugin.h:205
OrthancPluginErrorCode_SslInitialization
@ OrthancPluginErrorCode_SslInitialization
Definition OrthancCPlugin.h:242
OrthancPluginErrorCode_IncompatibleImageSize
@ OrthancPluginErrorCode_IncompatibleImageSize
Definition OrthancCPlugin.h:227
OrthancPluginErrorCode_BadFileFormat
@ OrthancPluginErrorCode_BadFileFormat
Definition OrthancCPlugin.h:218
OrthancPluginErrorCode_BadRequest
@ OrthancPluginErrorCode_BadRequest
Definition OrthancCPlugin.h:211
OrthancPluginErrorCode_SystemCommand
@ OrthancPluginErrorCode_SystemCommand
Definition OrthancCPlugin.h:213
OrthancPluginErrorCode_NoStorageCommitmentHandler
@ OrthancPluginErrorCode_NoStorageCommitmentHandler
Definition OrthancCPlugin.h:307
OrthancPluginErrorCode_SQLiteAlreadyOpened
@ OrthancPluginErrorCode_SQLiteAlreadyOpened
Definition OrthancCPlugin.h:249
OrthancPluginErrorCode_Plugin
@ OrthancPluginErrorCode_Plugin
Definition OrthancCPlugin.h:204
OrthancPluginErrorCode_CannotExecuteLua
@ OrthancPluginErrorCode_CannotExecuteLua
Definition OrthancCPlugin.h:295
OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction
@ OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction
Definition OrthancCPlugin.h:253
OrthancPluginErrorCode_UnknownDicomTag
@ OrthancPluginErrorCode_UnknownDicomTag
Definition OrthancCPlugin.h:230
OrthancPluginErrorCode_NoPresentationContext
@ OrthancPluginErrorCode_NoPresentationContext
Definition OrthancCPlugin.h:279
OrthancPluginErrorCode_EmptyRequest
@ OrthancPluginErrorCode_EmptyRequest
Definition OrthancCPlugin.h:236
OrthancPluginErrorCode_DatabaseNotInitialized
@ OrthancPluginErrorCode_DatabaseNotInitialized
Definition OrthancCPlugin.h:302
OrthancPluginErrorCode_DicomMoveUnavailable
@ OrthancPluginErrorCode_DicomMoveUnavailable
Definition OrthancCPlugin.h:281
OrthancPluginErrorCode_SQLiteTransactionCommit
@ OrthancPluginErrorCode_SQLiteTransactionCommit
Definition OrthancCPlugin.h:262
OrthancPluginErrorCode_BadJson
@ OrthancPluginErrorCode_BadJson
Definition OrthancCPlugin.h:231
OrthancPluginErrorCode_Success
@ OrthancPluginErrorCode_Success
Definition OrthancCPlugin.h:203
OrthancPluginErrorCode_NetworkProtocol
@ OrthancPluginErrorCode_NetworkProtocol
Definition OrthancCPlugin.h:212
OrthancPluginErrorCode_NoApplicationEntityFilter
@ OrthancPluginErrorCode_NoApplicationEntityFilter
Definition OrthancCPlugin.h:277
OrthancPluginErrorCode_InexistentItem
@ OrthancPluginErrorCode_InexistentItem
Definition OrthancCPlugin.h:210
OrthancPluginErrorCode_Timeout
@ OrthancPluginErrorCode_Timeout
Definition OrthancCPlugin.h:219
OrthancPluginErrorCode_LuaBadOutput
@ OrthancPluginErrorCode_LuaBadOutput
Definition OrthancCPlugin.h:297
OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted
@ OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted
Definition OrthancCPlugin.h:261
OrthancPluginErrorCode_NoCGetHandler
@ OrthancPluginErrorCode_NoCGetHandler
Definition OrthancCPlugin.h:308
OrthancPluginErrorCode_SQLiteNotOpened
@ OrthancPluginErrorCode_SQLiteNotOpened
Definition OrthancCPlugin.h:248
OrthancPluginErrorCode_ReadOnly
@ OrthancPluginErrorCode_ReadOnly
Definition OrthancCPlugin.h:225
OrthancPluginErrorCode_CannotStoreInstance
@ OrthancPluginErrorCode_CannotStoreInstance
Definition OrthancCPlugin.h:282
OrthancPluginErrorCode_CannotWriteFile
@ OrthancPluginErrorCode_CannotWriteFile
Definition OrthancCPlugin.h:217
OrthancPluginErrorCode_BadParameterType
@ OrthancPluginErrorCode_BadParameterType
Definition OrthancCPlugin.h:208
OrthancPluginErrorCode_NotEnoughMemory
@ OrthancPluginErrorCode_NotEnoughMemory
Definition OrthancCPlugin.h:207
OrthancPluginErrorCode_CreateDicomUseContent
@ OrthancPluginErrorCode_CreateDicomUseContent
Definition OrthancCPlugin.h:285
OrthancPluginErrorCode_Database
@ OrthancPluginErrorCode_Database
Definition OrthancCPlugin.h:214
OrthancPluginErrorCode_SQLiteCannotOpen
@ OrthancPluginErrorCode_SQLiteCannotOpen
Definition OrthancCPlugin.h:250
OrthancPluginErrorCode_MakeDirectory
@ OrthancPluginErrorCode_MakeDirectory
Definition OrthancCPlugin.h:272
OrthancPluginErrorCode_NoWorklistHandler
@ OrthancPluginErrorCode_NoWorklistHandler
Definition OrthancCPlugin.h:305
OrthancPluginDicomWebBinaryMode_InlineBinary
@ OrthancPluginDicomWebBinaryMode_InlineBinary
Definition OrthancCPlugin.h:970
OrthancPluginDicomWebBinaryMode_BulkDataUri
@ OrthancPluginDicomWebBinaryMode_BulkDataUri
Definition OrthancCPlugin.h:971
OrthancPluginDicomWebBinaryMode_Ignore
@ OrthancPluginDicomWebBinaryMode_Ignore
Definition OrthancCPlugin.h:969
OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii
@ OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii
Definition OrthancCPlugin.h:849
OrthancPluginDicomToJsonFlags_IncludeBinary
@ OrthancPluginDicomToJsonFlags_IncludeBinary
Definition OrthancCPlugin.h:845
OrthancPluginDicomToJsonFlags_IncludePixelData
@ OrthancPluginDicomToJsonFlags_IncludePixelData
Definition OrthancCPlugin.h:848
OrthancPluginDicomToJsonFlags_IncludeUnknownTags
@ OrthancPluginDicomToJsonFlags_IncludeUnknownTags
Definition OrthancCPlugin.h:847
OrthancPluginDicomToJsonFlags_SkipGroupLengths
@ OrthancPluginDicomToJsonFlags_SkipGroupLengths
Definition OrthancCPlugin.h:852
OrthancPluginDicomToJsonFlags_ConvertBinaryToNull
@ OrthancPluginDicomToJsonFlags_ConvertBinaryToNull
Definition OrthancCPlugin.h:850
OrthancPluginDicomToJsonFlags_StopAfterPixelData
@ OrthancPluginDicomToJsonFlags_StopAfterPixelData
Definition OrthancCPlugin.h:851
OrthancPluginDicomToJsonFlags_IncludePrivateTags
@ OrthancPluginDicomToJsonFlags_IncludePrivateTags
Definition OrthancCPlugin.h:846
OrthancPluginJobStepStatus_Continue
@ OrthancPluginJobStepStatus_Continue
Definition OrthancCPlugin.h:928
OrthancPluginJobStepStatus_Success
@ OrthancPluginJobStepStatus_Success
Definition OrthancCPlugin.h:926
OrthancPluginJobStepStatus_Failure
@ OrthancPluginJobStepStatus_Failure
Definition OrthancCPlugin.h:927
OrthancPluginCreateDicomFlags_DecodeDataUriScheme
@ OrthancPluginCreateDicomFlags_DecodeDataUriScheme
Definition OrthancCPlugin.h:866
OrthancPluginCreateDicomFlags_GenerateIdentifiers
@ OrthancPluginCreateDicomFlags_GenerateIdentifiers
Definition OrthancCPlugin.h:867
OrthancPluginConstraintType_SmallerOrEqual
@ OrthancPluginConstraintType_SmallerOrEqual
Definition OrthancCPlugin.h:896
OrthancPluginConstraintType_List
@ OrthancPluginConstraintType_List
Definition OrthancCPlugin.h:899
OrthancPluginConstraintType_GreaterOrEqual
@ OrthancPluginConstraintType_GreaterOrEqual
Definition OrthancCPlugin.h:897
OrthancPluginConstraintType_Equal
@ OrthancPluginConstraintType_Equal
Definition OrthancCPlugin.h:895
OrthancPluginConstraintType_Wildcard
@ OrthancPluginConstraintType_Wildcard
Definition OrthancCPlugin.h:898
OrthancPluginReceivedInstanceAction_KeepAsIs
@ OrthancPluginReceivedInstanceAction_KeepAsIs
Definition OrthancCPlugin.h:1016
OrthancPluginReceivedInstanceAction_Discard
@ OrthancPluginReceivedInstanceAction_Discard
Definition OrthancCPlugin.h:1018
OrthancPluginReceivedInstanceAction_Modify
@ OrthancPluginReceivedInstanceAction_Modify
Definition OrthancCPlugin.h:1017
OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported
@ OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported
Definition OrthancCPlugin.h:996
OrthancPluginStorageCommitmentFailureReason_Success
@ OrthancPluginStorageCommitmentFailureReason_Success
Definition OrthancCPlugin.h:982
OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID
@ OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID
Definition OrthancCPlugin.h:1005
OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict
@ OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict
Definition OrthancCPlugin.h:1000
OrthancPluginStorageCommitmentFailureReason_ResourceLimitation
@ OrthancPluginStorageCommitmentFailureReason_ResourceLimitation
Definition OrthancCPlugin.h:992
OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance
@ OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance
Definition OrthancCPlugin.h:988
OrthancPluginStorageCommitmentFailureReason_ProcessingFailure
@ OrthancPluginStorageCommitmentFailureReason_ProcessingFailure
Definition OrthancCPlugin.h:985
OrthancPluginMetricsType_Default
@ OrthancPluginMetricsType_Default
Definition OrthancCPlugin.h:952
OrthancPluginMetricsType_Timer
@ OrthancPluginMetricsType_Timer
Definition OrthancCPlugin.h:959
OrthancPluginValueRepresentation_PN
@ OrthancPluginValueRepresentation_PN
Definition OrthancCPlugin.h:805
OrthancPluginValueRepresentation_UL
@ OrthancPluginValueRepresentation_UL
Definition OrthancCPlugin.h:813
OrthancPluginValueRepresentation_UN
@ OrthancPluginValueRepresentation_UN
Definition OrthancCPlugin.h:814
OrthancPluginValueRepresentation_DA
@ OrthancPluginValueRepresentation_DA
Definition OrthancCPlugin.h:794
OrthancPluginValueRepresentation_OF
@ OrthancPluginValueRepresentation_OF
Definition OrthancCPlugin.h:803
OrthancPluginValueRepresentation_OW
@ OrthancPluginValueRepresentation_OW
Definition OrthancCPlugin.h:804
OrthancPluginValueRepresentation_CS
@ OrthancPluginValueRepresentation_CS
Definition OrthancCPlugin.h:793
OrthancPluginValueRepresentation_US
@ OrthancPluginValueRepresentation_US
Definition OrthancCPlugin.h:815
OrthancPluginValueRepresentation_SH
@ OrthancPluginValueRepresentation_SH
Definition OrthancCPlugin.h:806
OrthancPluginValueRepresentation_FL
@ OrthancPluginValueRepresentation_FL
Definition OrthancCPlugin.h:798
OrthancPluginValueRepresentation_DT
@ OrthancPluginValueRepresentation_DT
Definition OrthancCPlugin.h:796
OrthancPluginValueRepresentation_TM
@ OrthancPluginValueRepresentation_TM
Definition OrthancCPlugin.h:811
OrthancPluginValueRepresentation_SQ
@ OrthancPluginValueRepresentation_SQ
Definition OrthancCPlugin.h:808
OrthancPluginValueRepresentation_DS
@ OrthancPluginValueRepresentation_DS
Definition OrthancCPlugin.h:795
OrthancPluginValueRepresentation_OB
@ OrthancPluginValueRepresentation_OB
Definition OrthancCPlugin.h:802
OrthancPluginValueRepresentation_SL
@ OrthancPluginValueRepresentation_SL
Definition OrthancCPlugin.h:807
OrthancPluginValueRepresentation_ST
@ OrthancPluginValueRepresentation_ST
Definition OrthancCPlugin.h:810
OrthancPluginValueRepresentation_IS
@ OrthancPluginValueRepresentation_IS
Definition OrthancCPlugin.h:799
OrthancPluginValueRepresentation_LT
@ OrthancPluginValueRepresentation_LT
Definition OrthancCPlugin.h:801
OrthancPluginValueRepresentation_SS
@ OrthancPluginValueRepresentation_SS
Definition OrthancCPlugin.h:809
OrthancPluginValueRepresentation_UT
@ OrthancPluginValueRepresentation_UT
Definition OrthancCPlugin.h:816
OrthancPluginValueRepresentation_LO
@ OrthancPluginValueRepresentation_LO
Definition OrthancCPlugin.h:800
OrthancPluginValueRepresentation_AE
@ OrthancPluginValueRepresentation_AE
Definition OrthancCPlugin.h:790
OrthancPluginValueRepresentation_FD
@ OrthancPluginValueRepresentation_FD
Definition OrthancCPlugin.h:797
OrthancPluginValueRepresentation_UI
@ OrthancPluginValueRepresentation_UI
Definition OrthancCPlugin.h:812
OrthancPluginValueRepresentation_AS
@ OrthancPluginValueRepresentation_AS
Definition OrthancCPlugin.h:791
OrthancPluginValueRepresentation_AT
@ OrthancPluginValueRepresentation_AT
Definition OrthancCPlugin.h:792
OrthancPluginJobStopReason_Failure
@ OrthancPluginJobStopReason_Failure
Definition OrthancCPlugin.h:942
OrthancPluginJobStopReason_Success
@ OrthancPluginJobStopReason_Success
Definition OrthancCPlugin.h:940
OrthancPluginJobStopReason_Canceled
@ OrthancPluginJobStopReason_Canceled
Definition OrthancCPlugin.h:943
OrthancPluginJobStopReason_Paused
@ OrthancPluginJobStopReason_Paused
Definition OrthancCPlugin.h:941
OrthancPluginDicomToJsonFormat_Full
@ OrthancPluginDicomToJsonFormat_Full
Definition OrthancCPlugin.h:829
OrthancPluginDicomToJsonFormat_Human
@ OrthancPluginDicomToJsonFormat_Human
Definition OrthancCPlugin.h:831
OrthancPluginDicomToJsonFormat_Short
@ OrthancPluginDicomToJsonFormat_Short
Definition OrthancCPlugin.h:830
OrthancPluginHttpMethod_Delete
@ OrthancPluginHttpMethod_Delete
Definition OrthancCPlugin.h:330
OrthancPluginHttpMethod_Post
@ OrthancPluginHttpMethod_Post
Definition OrthancCPlugin.h:328
OrthancPluginHttpMethod_Put
@ OrthancPluginHttpMethod_Put
Definition OrthancCPlugin.h:329
OrthancPluginHttpMethod_Get
@ OrthancPluginHttpMethod_Get
Definition OrthancCPlugin.h:327
OrthancPluginInstanceOrigin_Unknown
@ OrthancPluginInstanceOrigin_Unknown
Definition OrthancCPlugin.h:910
OrthancPluginInstanceOrigin_RestApi
@ OrthancPluginInstanceOrigin_RestApi
Definition OrthancCPlugin.h:912
OrthancPluginInstanceOrigin_Lua
@ OrthancPluginInstanceOrigin_Lua
Definition OrthancCPlugin.h:914
OrthancPluginInstanceOrigin_WebDav
@ OrthancPluginInstanceOrigin_WebDav
Definition OrthancCPlugin.h:915
OrthancPluginInstanceOrigin_DicomProtocol
@ OrthancPluginInstanceOrigin_DicomProtocol
Definition OrthancCPlugin.h:911
OrthancPluginInstanceOrigin_Plugin
@ OrthancPluginInstanceOrigin_Plugin
Definition OrthancCPlugin.h:913
OrthancPluginContentType_Dicom
@ OrthancPluginContentType_Dicom
Definition OrthancCPlugin.h:700
OrthancPluginContentType_DicomAsJson
@ OrthancPluginContentType_DicomAsJson
Definition OrthancCPlugin.h:701
OrthancPluginContentType_Unknown
@ OrthancPluginContentType_Unknown
Definition OrthancCPlugin.h:699
OrthancPluginContentType_DicomUntilPixelData
@ OrthancPluginContentType_DicomUntilPixelData
Definition OrthancCPlugin.h:702
OrthancPluginDictionaryEntry
An entry in the dictionary of DICOM tags.
Definition OrthancCPlugin.h:1788
OrthancPluginDictionaryEntry::minMultiplicity
uint32_t minMultiplicity
Definition OrthancCPlugin.h:1792
OrthancPluginDictionaryEntry::maxMultiplicity
uint32_t maxMultiplicity
Definition OrthancCPlugin.h:1793
OrthancPluginDictionaryEntry::vr
OrthancPluginValueRepresentation vr
Definition OrthancCPlugin.h:1791
OrthancPluginDictionaryEntry::element
uint16_t element
Definition OrthancCPlugin.h:1790
OrthancPluginDictionaryEntry::group
uint16_t group
Definition OrthancCPlugin.h:1789
OrthancPluginHttpRequest
The parameters of a REST request.
Definition OrthancCPlugin.h:341
OrthancPluginHttpRequest::getValues
const char *const * getValues
For a GET request, the values of the GET parameters.
Definition OrthancCPlugin.h:370
OrthancPluginHttpRequest::groups
const char *const * groups
The matched values for the groups of the regular expression.
Definition OrthancCPlugin.h:355
OrthancPluginHttpRequest::bodySize
uint32_t bodySize
For a PUT or POST request, the number of bytes of the body.
Definition OrthancCPlugin.h:380
OrthancPluginHttpRequest::groupsCount
uint32_t groupsCount
The number of groups of the regular expression.
Definition OrthancCPlugin.h:350
OrthancPluginHttpRequest::headersKeys
const char *const * headersKeys
The keys of the HTTP headers (always converted to low-case).
Definition OrthancCPlugin.h:395
OrthancPluginHttpRequest::body
const void * body
For a PUT or POST request, the content of the body.
Definition OrthancCPlugin.h:375
OrthancPluginHttpRequest::getKeys
const char *const * getKeys
For a GET request, the keys of the GET parameters.
Definition OrthancCPlugin.h:365
OrthancPluginHttpRequest::headersCount
uint32_t headersCount
The number of HTTP headers.
Definition OrthancCPlugin.h:390
OrthancPluginHttpRequest::method
OrthancPluginHttpMethod method
The HTTP method.
Definition OrthancCPlugin.h:345
OrthancPluginHttpRequest::getCount
uint32_t getCount
For a GET request, the number of GET parameters.
Definition OrthancCPlugin.h:360
OrthancPluginHttpRequest::headersValues
const char *const * headersValues
The values of the HTTP headers.
Definition OrthancCPlugin.h:400
OrthancPluginMemoryBuffer64
A 64-bit memory buffer allocated by the core system of Orthanc.
Definition OrthancCPlugin.h:1054
OrthancPluginMemoryBuffer64::size
uint64_t size
The number of bytes in the buffer.
Definition OrthancCPlugin.h:1063
OrthancPluginMemoryBuffer64::data
void * data
The content of the buffer.
Definition OrthancCPlugin.h:1058
OrthancPluginMemoryBuffer
A 32-bit memory buffer allocated by the core system of Orthanc.
Definition OrthancCPlugin.h:1032
OrthancPluginMemoryBuffer::size
uint32_t size
The number of bytes in the buffer.
Definition OrthancCPlugin.h:1041
OrthancPluginMemoryBuffer::data
void * data
The content of the buffer.
Definition OrthancCPlugin.h:1036