115 # define ORTHANC_PLUGINS_API __declspec(dllexport)
117 # define ORTHANC_PLUGINS_API __attribute__ ((visibility ("default")))
119 # define ORTHANC_PLUGINS_API
122 #define ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER 1
123 #define ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER 12
124 #define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 5
127 #if !defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
128 #define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \
129 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major || \
130 (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major && \
131 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor || \
132 (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor && \
133 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision))))
152 #ifndef ORTHANC_PLUGIN_INLINE
153 # if __STDC_VERSION__ >= 199901L
155 # define ORTHANC_PLUGIN_INLINE static inline
156 # elif defined(__cplusplus)
158 # define ORTHANC_PLUGIN_INLINE static inline
159 # elif defined(__GNUC__)
161 # define ORTHANC_PLUGIN_INLINE static __inline
162 # elif defined(_MSC_VER)
164 # define ORTHANC_PLUGIN_INLINE static __inline
166 # error Your compiler is not known to support the "inline" keyword
171 #ifndef ORTHANC_PLUGIN_DEPRECATED
172 # if defined(_MSC_VER)
173 # define ORTHANC_PLUGIN_DEPRECATED __declspec(deprecated)
175 # define ORTHANC_PLUGIN_DEPRECATED __attribute__ ((deprecated))
176 # elif defined(__clang__)
177 # define ORTHANC_PLUGIN_DEPRECATED __attribute__ ((deprecated))
179 # pragma message("WARNING: You need to implement ORTHANC_PLUGINS_DEPRECATED for this compiler")
180 # define ORTHANC_PLUGIN_DEPRECATED
329 _OrthancPluginErrorCode_INTERNAL = 0x7fffffff
337 ORTHANC_PLUGINS_API
const char* OrthancPluginGetName();
350 _OrthancPluginHttpMethod_INTERNAL = 0x7fffffff
426 _OrthancPluginService_LogInfo = 1,
427 _OrthancPluginService_LogWarning = 2,
428 _OrthancPluginService_LogError = 3,
429 _OrthancPluginService_GetOrthancPath = 4,
430 _OrthancPluginService_GetOrthancDirectory = 5,
431 _OrthancPluginService_GetConfigurationPath = 6,
432 _OrthancPluginService_SetPluginProperty = 7,
433 _OrthancPluginService_GetGlobalProperty = 8,
434 _OrthancPluginService_SetGlobalProperty = 9,
435 _OrthancPluginService_GetCommandLineArgumentsCount = 10,
436 _OrthancPluginService_GetCommandLineArgument = 11,
437 _OrthancPluginService_GetExpectedDatabaseVersion = 12,
438 _OrthancPluginService_GetConfiguration = 13,
439 _OrthancPluginService_BufferCompression = 14,
440 _OrthancPluginService_ReadFile = 15,
441 _OrthancPluginService_WriteFile = 16,
442 _OrthancPluginService_GetErrorDescription = 17,
443 _OrthancPluginService_CallHttpClient = 18,
444 _OrthancPluginService_RegisterErrorCode = 19,
445 _OrthancPluginService_RegisterDictionaryTag = 20,
446 _OrthancPluginService_DicomBufferToJson = 21,
447 _OrthancPluginService_DicomInstanceToJson = 22,
448 _OrthancPluginService_CreateDicom = 23,
449 _OrthancPluginService_ComputeMd5 = 24,
450 _OrthancPluginService_ComputeSha1 = 25,
451 _OrthancPluginService_LookupDictionary = 26,
452 _OrthancPluginService_CallHttpClient2 = 27,
453 _OrthancPluginService_GenerateUuid = 28,
454 _OrthancPluginService_RegisterPrivateDictionaryTag = 29,
455 _OrthancPluginService_AutodetectMimeType = 30,
456 _OrthancPluginService_SetMetricsValue = 31,
457 _OrthancPluginService_EncodeDicomWebJson = 32,
458 _OrthancPluginService_EncodeDicomWebXml = 33,
459 _OrthancPluginService_ChunkedHttpClient = 34,
460 _OrthancPluginService_GetTagName = 35,
461 _OrthancPluginService_EncodeDicomWebJson2 = 36,
462 _OrthancPluginService_EncodeDicomWebXml2 = 37,
463 _OrthancPluginService_CreateMemoryBuffer = 38,
464 _OrthancPluginService_GenerateRestApiAuthorizationToken = 39,
465 _OrthancPluginService_CreateMemoryBuffer64 = 40,
466 _OrthancPluginService_CreateDicom2 = 41,
467 _OrthancPluginService_GetDatabaseServerIdentifier = 42,
468 _OrthancPluginService_SetMetricsIntegerValue = 43,
469 _OrthancPluginService_SetCurrentThreadName = 44,
470 _OrthancPluginService_LogMessage = 45,
474 _OrthancPluginService_RegisterRestCallback = 1000,
475 _OrthancPluginService_RegisterOnStoredInstanceCallback = 1001,
476 _OrthancPluginService_RegisterStorageArea = 1002,
477 _OrthancPluginService_RegisterOnChangeCallback = 1003,
478 _OrthancPluginService_RegisterRestCallbackNoLock = 1004,
479 _OrthancPluginService_RegisterWorklistCallback = 1005,
480 _OrthancPluginService_RegisterDecodeImageCallback = 1006,
481 _OrthancPluginService_RegisterIncomingHttpRequestFilter = 1007,
482 _OrthancPluginService_RegisterFindCallback = 1008,
483 _OrthancPluginService_RegisterMoveCallback = 1009,
484 _OrthancPluginService_RegisterIncomingHttpRequestFilter2 = 1010,
485 _OrthancPluginService_RegisterRefreshMetricsCallback = 1011,
486 _OrthancPluginService_RegisterChunkedRestCallback = 1012,
487 _OrthancPluginService_RegisterStorageCommitmentScpCallback = 1013,
488 _OrthancPluginService_RegisterIncomingDicomInstanceFilter = 1014,
489 _OrthancPluginService_RegisterTranscoderCallback = 1015,
490 _OrthancPluginService_RegisterStorageArea2 = 1016,
491 _OrthancPluginService_RegisterIncomingCStoreInstanceFilter = 1017,
492 _OrthancPluginService_RegisterReceivedInstanceCallback = 1018,
493 _OrthancPluginService_RegisterWebDavCollection = 1019,
496 _OrthancPluginService_AnswerBuffer = 2000,
497 _OrthancPluginService_CompressAndAnswerPngImage = 2001,
498 _OrthancPluginService_Redirect = 2002,
499 _OrthancPluginService_SendHttpStatusCode = 2003,
500 _OrthancPluginService_SendUnauthorized = 2004,
501 _OrthancPluginService_SendMethodNotAllowed = 2005,
502 _OrthancPluginService_SetCookie = 2006,
503 _OrthancPluginService_SetHttpHeader = 2007,
504 _OrthancPluginService_StartMultipartAnswer = 2008,
505 _OrthancPluginService_SendMultipartItem = 2009,
506 _OrthancPluginService_SendHttpStatus = 2010,
507 _OrthancPluginService_CompressAndAnswerImage = 2011,
508 _OrthancPluginService_SendMultipartItem2 = 2012,
509 _OrthancPluginService_SetHttpErrorDetails = 2013,
512 _OrthancPluginService_GetDicomForInstance = 3000,
513 _OrthancPluginService_RestApiGet = 3001,
514 _OrthancPluginService_RestApiPost = 3002,
515 _OrthancPluginService_RestApiDelete = 3003,
516 _OrthancPluginService_RestApiPut = 3004,
517 _OrthancPluginService_LookupPatient = 3005,
518 _OrthancPluginService_LookupStudy = 3006,
519 _OrthancPluginService_LookupSeries = 3007,
520 _OrthancPluginService_LookupInstance = 3008,
521 _OrthancPluginService_LookupStudyWithAccessionNumber = 3009,
522 _OrthancPluginService_RestApiGetAfterPlugins = 3010,
523 _OrthancPluginService_RestApiPostAfterPlugins = 3011,
524 _OrthancPluginService_RestApiDeleteAfterPlugins = 3012,
525 _OrthancPluginService_RestApiPutAfterPlugins = 3013,
526 _OrthancPluginService_ReconstructMainDicomTags = 3014,
527 _OrthancPluginService_RestApiGet2 = 3015,
528 _OrthancPluginService_CallRestApi = 3016,
531 _OrthancPluginService_GetInstanceRemoteAet = 4000,
532 _OrthancPluginService_GetInstanceSize = 4001,
533 _OrthancPluginService_GetInstanceData = 4002,
534 _OrthancPluginService_GetInstanceJson = 4003,
535 _OrthancPluginService_GetInstanceSimplifiedJson = 4004,
536 _OrthancPluginService_HasInstanceMetadata = 4005,
537 _OrthancPluginService_GetInstanceMetadata = 4006,
538 _OrthancPluginService_GetInstanceOrigin = 4007,
539 _OrthancPluginService_GetInstanceTransferSyntaxUid = 4008,
540 _OrthancPluginService_HasInstancePixelData = 4009,
541 _OrthancPluginService_CreateDicomInstance = 4010,
542 _OrthancPluginService_FreeDicomInstance = 4011,
543 _OrthancPluginService_GetInstanceFramesCount = 4012,
544 _OrthancPluginService_GetInstanceRawFrame = 4013,
545 _OrthancPluginService_GetInstanceDecodedFrame = 4014,
546 _OrthancPluginService_TranscodeDicomInstance = 4015,
547 _OrthancPluginService_SerializeDicomInstance = 4016,
548 _OrthancPluginService_GetInstanceAdvancedJson = 4017,
549 _OrthancPluginService_GetInstanceDicomWebJson = 4018,
550 _OrthancPluginService_GetInstanceDicomWebXml = 4019,
551 _OrthancPluginService_LoadDicomInstance = 4020,
554 _OrthancPluginService_RegisterDatabaseBackend = 5000,
555 _OrthancPluginService_DatabaseAnswer = 5001,
556 _OrthancPluginService_RegisterDatabaseBackendV2 = 5002,
557 _OrthancPluginService_StorageAreaCreate = 5003,
558 _OrthancPluginService_StorageAreaRead = 5004,
559 _OrthancPluginService_StorageAreaRemove = 5005,
560 _OrthancPluginService_RegisterDatabaseBackendV3 = 5006,
561 _OrthancPluginService_RegisterDatabaseBackendV4 = 5007,
564 _OrthancPluginService_GetImagePixelFormat = 6000,
565 _OrthancPluginService_GetImageWidth = 6001,
566 _OrthancPluginService_GetImageHeight = 6002,
567 _OrthancPluginService_GetImagePitch = 6003,
568 _OrthancPluginService_GetImageBuffer = 6004,
569 _OrthancPluginService_UncompressImage = 6005,
570 _OrthancPluginService_FreeImage = 6006,
571 _OrthancPluginService_CompressImage = 6007,
572 _OrthancPluginService_ConvertPixelFormat = 6008,
573 _OrthancPluginService_GetFontsCount = 6009,
574 _OrthancPluginService_GetFontInfo = 6010,
575 _OrthancPluginService_DrawText = 6011,
576 _OrthancPluginService_CreateImage = 6012,
577 _OrthancPluginService_CreateImageAccessor = 6013,
578 _OrthancPluginService_DecodeDicomImage = 6014,
581 _OrthancPluginService_WorklistAddAnswer = 7000,
582 _OrthancPluginService_WorklistMarkIncomplete = 7001,
583 _OrthancPluginService_WorklistIsMatch = 7002,
584 _OrthancPluginService_WorklistGetDicomQuery = 7003,
585 _OrthancPluginService_FindAddAnswer = 7004,
586 _OrthancPluginService_FindMarkIncomplete = 7005,
587 _OrthancPluginService_GetFindQuerySize = 7006,
588 _OrthancPluginService_GetFindQueryTag = 7007,
589 _OrthancPluginService_GetFindQueryTagName = 7008,
590 _OrthancPluginService_GetFindQueryValue = 7009,
591 _OrthancPluginService_CreateFindMatcher = 7010,
592 _OrthancPluginService_FreeFindMatcher = 7011,
593 _OrthancPluginService_FindMatcherIsMatch = 7012,
596 _OrthancPluginService_GetPeers = 8000,
597 _OrthancPluginService_FreePeers = 8001,
598 _OrthancPluginService_GetPeersCount = 8003,
599 _OrthancPluginService_GetPeerName = 8004,
600 _OrthancPluginService_GetPeerUrl = 8005,
601 _OrthancPluginService_CallPeerApi = 8006,
602 _OrthancPluginService_GetPeerUserProperty = 8007,
605 _OrthancPluginService_CreateJob = 9000,
606 _OrthancPluginService_FreeJob = 9001,
607 _OrthancPluginService_SubmitJob = 9002,
608 _OrthancPluginService_RegisterJobsUnserializer = 9003,
609 _OrthancPluginService_CreateJob2 = 9004,
611 _OrthancPluginService_INTERNAL = 0x7fffffff
612 } _OrthancPluginService;
617 _OrthancPluginProperty_Description = 1,
618 _OrthancPluginProperty_RootUri = 2,
619 _OrthancPluginProperty_OrthancExplorer = 3,
621 _OrthancPluginProperty_INTERNAL = 0x7fffffff
622 } _OrthancPluginProperty;
714 _OrthancPluginPixelFormat_INTERNAL = 0x7fffffff
729 _OrthancPluginContentType_INTERNAL = 0x7fffffff
745 _OrthancPluginResourceType_INTERNAL = 0x7fffffff
777 _OrthancPluginChangeType_INTERNAL = 0x7fffffff
792 _OrthancPluginCompressionType_INTERNAL = 0x7fffffff
806 _OrthancPluginImageFormat_INTERNAL = 0x7fffffff
844 _OrthancPluginValueRepresentation_INTERNAL = 0x7fffffff
859 _OrthancPluginDicomToJsonFormat_INTERNAL = 0x7fffffff
880 _OrthancPluginDicomToJsonFlags_INTERNAL = 0x7fffffff
895 _OrthancPluginCreateDicomFlags_INTERNAL = 0x7fffffff
911 _OrthancPluginIdentifierConstraint_INTERNAL = 0x7fffffff
927 _OrthancPluginConstraintType_INTERNAL = 0x7fffffff
943 _OrthancPluginInstanceOrigin_INTERNAL = 0x7fffffff
1060 _OrthancPluginReceivedInstanceAction_INTERNAL = 0x7fffffff
1088 _OrthancPluginLoadDicomInstanceMode_INTERNAL = 0x7fffffff
1105 _OrthancPluginLogLevel_INTERNAL = 0x7fffffff
1125 _OrthancPluginLogCategory_INTERNAL = 0x7fffffff
1288 const char* instanceId);
1299 const char* resourceId);
1310 const uint32_t size,
1311 uint32_t frameIndex);
1332 const char* bulkDataUri);
1350 const void* content,
1422 uint64_t rangeStart);
1458 const char* issuerAet,
1459 const char* calledAet);
1490 uint32_t headersCount,
1491 const char*
const* headersKeys,
1492 const char*
const* headersValues);
1525 uint32_t headersCount,
1526 const char*
const* headersKeys,
1527 const char*
const* headersValues,
1528 uint32_t getArgumentsCount,
1529 const char*
const* getArgumentsKeys,
1530 const char*
const* getArgumentsValues);
1551 const char* issuerAet,
1552 const char* calledAet);
1591 typedef void* (*OrthancPluginMoveCallback) (
1593 const char* patientId,
1594 const char* accessionNumber,
1595 const char* studyInstanceUid,
1596 const char* seriesInstanceUid,
1597 const char* sopInstanceUid,
1598 const char* originatorAet,
1599 const char* sourceAet,
1600 const char* targetAet,
1601 uint16_t originatorId);
1687 typedef const char* (*OrthancPluginJobGetContent) (
void* job);
1725 typedef const char* (*OrthancPluginJobGetSerialized) (
void* job);
1819 const char* serialized);
1868 uint32_t levelDepth,
1869 const uint16_t* levelTagGroup,
1870 const uint16_t* levelTagElement,
1871 const uint32_t* levelIndex,
1873 uint16_t tagElement,
1906 uint32_t levelDepth,
1907 const uint16_t* levelTagGroup,
1908 const uint16_t* levelTagElement,
1909 const uint32_t* levelIndex,
1911 uint16_t tagElement,
1920 typedef struct _OrthancPluginContext_t
1922 void* pluginsManager;
1923 const char* orthancVersion;
1926 _OrthancPluginService service,
1927 const void* params);
1986 int32_t expectedMajor,
1987 int32_t expectedMinor,
1988 int32_t expectedRevision)
1990 int32_t major, minor, revision;
1992 if (
sizeof(
int) !=
sizeof(int32_t) ||
1995 sizeof(int32_t) !=
sizeof(_OrthancPluginService) ||
1996 sizeof(int32_t) !=
sizeof(_OrthancPluginProperty) ||
2023 if (!strcmp(context->orthancVersion,
"mainline"))
2035 (context->orthancVersion,
"%4d.%4d.%4d", &major, &minor, &revision) != 3)
2042 if (major > expectedMajor)
2047 if (major < expectedMajor)
2054 if (minor > expectedMinor)
2059 if (minor < expectedMinor)
2066 if (revision >= expectedRevision)
2098 ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
2099 ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER,
2100 ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
2116 context->Free(buffer->
data);
2132 context->Free(buffer->
data);
2146 const char* message)
2148 context->InvokeService(context, _OrthancPluginService_LogError, message);
2162 const char* message)
2164 context->InvokeService(context, _OrthancPluginService_LogWarning, message);
2178 const char* message)
2180 context->InvokeService(context, _OrthancPluginService_LogInfo, message);
2187 const char* pathRegularExpression;
2189 } _OrthancPluginRestCallback;
2214 const char* pathRegularExpression,
2217 _OrthancPluginRestCallback params;
2218 params.pathRegularExpression = pathRegularExpression;
2219 params.callback = callback;
2220 context->InvokeService(context, _OrthancPluginService_RegisterRestCallback, ¶ms);
2254 const char* pathRegularExpression,
2257 _OrthancPluginRestCallback params;
2258 params.pathRegularExpression = pathRegularExpression;
2259 params.callback = callback;
2260 context->InvokeService(context, _OrthancPluginService_RegisterRestCallbackNoLock, ¶ms);
2268 } _OrthancPluginOnStoredInstanceCallback;
2294 _OrthancPluginOnStoredInstanceCallback params;
2295 params.callback = callback;
2297 context->InvokeService(context, _OrthancPluginService_RegisterOnStoredInstanceCallback, ¶ms);
2306 uint32_t answerSize;
2307 const char* mimeType;
2308 } _OrthancPluginAnswerBuffer;
2326 uint32_t answerSize,
2327 const char* mimeType)
2329 _OrthancPluginAnswerBuffer params;
2330 params.output = output;
2331 params.answer = answer;
2332 params.answerSize = answerSize;
2333 params.mimeType = mimeType;
2334 context->InvokeService(context, _OrthancPluginService_AnswerBuffer, ¶ms);
2346 } _OrthancPluginCompressAndAnswerPngImage;
2358 } _OrthancPluginCompressAndAnswerImage;
2388 _OrthancPluginCompressAndAnswerImage params;
2389 params.output = output;
2391 params.pixelFormat = format;
2392 params.width = width;
2393 params.height = height;
2394 params.pitch = pitch;
2395 params.buffer = buffer;
2397 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, ¶ms);
2405 const char* instanceId;
2406 } _OrthancPluginGetDicomForInstance;
2423 const char* instanceId)
2425 _OrthancPluginGetDicomForInstance params;
2426 params.target = target;
2427 params.instanceId = instanceId;
2428 return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, ¶ms);
2437 } _OrthancPluginRestApiGet;
2458 _OrthancPluginRestApiGet params;
2459 params.target = target;
2461 return context->InvokeService(context, _OrthancPluginService_RestApiGet, ¶ms);
2488 _OrthancPluginRestApiGet params;
2489 params.target = target;
2491 return context->InvokeService(context, _OrthancPluginService_RestApiGetAfterPlugins, ¶ms);
2502 } _OrthancPluginRestApiPostPut;
2527 _OrthancPluginRestApiPostPut params;
2528 params.target = target;
2531 params.bodySize = bodySize;
2532 return context->InvokeService(context, _OrthancPluginService_RestApiPost, ¶ms);
2562 _OrthancPluginRestApiPostPut params;
2563 params.target = target;
2566 params.bodySize = bodySize;
2567 return context->InvokeService(context, _OrthancPluginService_RestApiPostAfterPlugins, ¶ms);
2588 return context->InvokeService(context, _OrthancPluginService_RestApiDelete, uri);
2611 return context->InvokeService(context, _OrthancPluginService_RestApiDeleteAfterPlugins, uri);
2639 _OrthancPluginRestApiPostPut params;
2640 params.target = target;
2643 params.bodySize = bodySize;
2644 return context->InvokeService(context, _OrthancPluginService_RestApiPut, ¶ms);
2675 _OrthancPluginRestApiPostPut params;
2676 params.target = target;
2679 params.bodySize = bodySize;
2680 return context->InvokeService(context, _OrthancPluginService_RestApiPutAfterPlugins, ¶ms);
2688 const char* argument;
2689 } _OrthancPluginOutputPlusArgument;
2705 const char* redirection)
2707 _OrthancPluginOutputPlusArgument params;
2708 params.output = output;
2709 params.argument = redirection;
2710 context->InvokeService(context, _OrthancPluginService_Redirect, ¶ms);
2718 const char* argument;
2719 } _OrthancPluginRetrieveDynamicString;
2736 const char* patientID)
2740 _OrthancPluginRetrieveDynamicString params;
2741 params.result = &result;
2742 params.argument = patientID;
2771 const char* studyUID)
2775 _OrthancPluginRetrieveDynamicString params;
2776 params.result = &result;
2777 params.argument = studyUID;
2806 const char* accessionNumber)
2810 _OrthancPluginRetrieveDynamicString params;
2811 params.result = &result;
2812 params.argument = accessionNumber;
2841 const char* seriesUID)
2845 _OrthancPluginRetrieveDynamicString params;
2846 params.result = &result;
2847 params.argument = seriesUID;
2876 const char* sopInstanceUID)
2880 _OrthancPluginRetrieveDynamicString params;
2881 params.result = &result;
2882 params.argument = sopInstanceUID;
2901 } _OrthancPluginSendHttpStatusCode;
2924 _OrthancPluginSendHttpStatusCode params;
2925 params.output = output;
2926 params.status = status;
2927 context->InvokeService(context, _OrthancPluginService_SendHttpStatusCode, ¶ms);
2947 _OrthancPluginOutputPlusArgument params;
2948 params.output = output;
2949 params.argument = realm;
2950 context->InvokeService(context, _OrthancPluginService_SendUnauthorized, ¶ms);
2968 const char* allowedMethods)
2970 _OrthancPluginOutputPlusArgument params;
2971 params.output = output;
2972 params.argument = allowedMethods;
2973 context->InvokeService(context, _OrthancPluginService_SendMethodNotAllowed, ¶ms);
2982 } _OrthancPluginSetHttpHeader;
3001 _OrthancPluginSetHttpHeader params;
3002 params.output = output;
3003 params.key = cookie;
3004 params.value = value;
3005 context->InvokeService(context, _OrthancPluginService_SetCookie, ¶ms);
3026 _OrthancPluginSetHttpHeader params;
3027 params.output = output;
3029 params.value = value;
3030 context->InvokeService(context, _OrthancPluginService_SetHttpHeader, ¶ms);
3036 char** resultStringToFree;
3037 const char** resultString;
3038 int64_t* resultInt64;
3042 } _OrthancPluginAccessDicomInstance;
3062 _OrthancPluginAccessDicomInstance params;
3063 memset(¶ms, 0,
sizeof(params));
3064 params.resultString = &result;
3065 params.instance = instance;
3095 _OrthancPluginAccessDicomInstance params;
3096 memset(¶ms, 0,
sizeof(params));
3097 params.resultInt64 = &size;
3098 params.instance = instance;
3128 _OrthancPluginAccessDicomInstance params;
3129 memset(¶ms, 0,
sizeof(params));
3130 params.resultString = &result;
3131 params.instance = instance;
3164 _OrthancPluginAccessDicomInstance params;
3165 memset(¶ms, 0,
sizeof(params));
3166 params.resultStringToFree = &result;
3167 params.instance = instance;
3202 _OrthancPluginAccessDicomInstance params;
3203 memset(¶ms, 0,
sizeof(params));
3204 params.resultStringToFree = &result;
3205 params.instance = instance;
3238 const char* metadata)
3242 _OrthancPluginAccessDicomInstance params;
3243 memset(¶ms, 0,
sizeof(params));
3244 params.resultInt64 = &result;
3245 params.instance = instance;
3246 params.key = metadata;
3255 return (result != 0);
3279 const char* metadata)
3283 _OrthancPluginAccessDicomInstance params;
3284 memset(¶ms, 0,
sizeof(params));
3285 params.resultString = &result;
3286 params.instance = instance;
3287 params.key = metadata;
3308 } _OrthancPluginRegisterStorageArea;
3331 _OrthancPluginRegisterStorageArea params;
3332 params.create = create;
3334 params.remove = remove;
3337 params.free = ::free;
3342 context->InvokeService(context, _OrthancPluginService_RegisterStorageArea, ¶ms);
3361 _OrthancPluginRetrieveDynamicString params;
3362 params.result = &result;
3363 params.argument = NULL;
3391 _OrthancPluginRetrieveDynamicString params;
3392 params.result = &result;
3393 params.argument = NULL;
3426 _OrthancPluginRetrieveDynamicString params;
3427 params.result = &result;
3428 params.argument = NULL;
3446 } _OrthancPluginOnChangeCallback;
3472 _OrthancPluginOnChangeCallback params;
3473 params.callback = callback;
3475 context->InvokeService(context, _OrthancPluginService_RegisterOnChangeCallback, ¶ms);
3483 _OrthancPluginProperty property;
3485 } _OrthancPluginSetPluginProperty;
3507 _OrthancPluginSetPluginProperty params;
3508 params.plugin = OrthancPluginGetName();
3509 params.property = _OrthancPluginProperty_RootUri;
3512 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3533 _OrthancPluginSetPluginProperty params;
3534 params.plugin = plugin;
3535 params.property = _OrthancPluginProperty_RootUri;
3538 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3557 const char* description)
3559 _OrthancPluginSetPluginProperty params;
3560 params.plugin = OrthancPluginGetName();
3561 params.property = _OrthancPluginProperty_Description;
3562 params.value = description;
3564 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3581 const char* description)
3583 _OrthancPluginSetPluginProperty params;
3584 params.plugin = plugin;
3585 params.property = _OrthancPluginProperty_Description;
3586 params.value = description;
3588 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3607 const char* javascript)
3609 _OrthancPluginSetPluginProperty params;
3610 params.plugin = OrthancPluginGetName();
3611 params.property = _OrthancPluginProperty_OrthancExplorer;
3612 params.value = javascript;
3614 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3631 const char* javascript)
3633 _OrthancPluginSetPluginProperty params;
3634 params.plugin = plugin;
3635 params.property = _OrthancPluginProperty_OrthancExplorer;
3636 params.value = javascript;
3638 context->InvokeService(context, _OrthancPluginService_SetPluginProperty, ¶ms);
3647 } _OrthancPluginGlobalProperty;
3666 const char* defaultValue)
3670 _OrthancPluginGlobalProperty params;
3671 params.result = &result;
3672 params.property = property;
3673 params.value = defaultValue;
3707 _OrthancPluginGlobalProperty params;
3708 params.result = NULL;
3709 params.property = property;
3710 params.value = value;
3712 return context->InvokeService(context, _OrthancPluginService_SetGlobalProperty, ¶ms);
3719 int32_t *resultInt32;
3720 uint32_t *resultUint32;
3721 int64_t *resultInt64;
3722 uint64_t *resultUint64;
3723 } _OrthancPluginReturnSingleValue;
3738 _OrthancPluginReturnSingleValue params;
3739 memset(¶ms, 0,
sizeof(params));
3740 params.resultUint32 = &count;
3773 _OrthancPluginGlobalProperty params;
3774 params.result = &result;
3775 params.property = (int32_t) argument;
3776 params.value = NULL;
3804 _OrthancPluginReturnSingleValue params;
3805 memset(¶ms, 0,
sizeof(params));
3806 params.resultUint32 = &count;
3836 _OrthancPluginRetrieveDynamicString params;
3837 params.result = &result;
3838 params.argument = NULL;
3856 const char* subType;
3857 const char* contentType;
3858 } _OrthancPluginStartMultipartAnswer;
3876 const char* subType,
3877 const char* contentType)
3879 _OrthancPluginStartMultipartAnswer params;
3880 params.output = output;
3881 params.subType = subType;
3882 params.contentType = contentType;
3883 return context->InvokeService(context, _OrthancPluginService_StartMultipartAnswer, ¶ms);
3906 uint32_t answerSize)
3908 _OrthancPluginAnswerBuffer params;
3909 params.output = output;
3910 params.answer = answer;
3911 params.answerSize = answerSize;
3912 params.mimeType = NULL;
3913 return context->InvokeService(context, _OrthancPluginService_SendMultipartItem, ¶ms);
3925 } _OrthancPluginBufferCompression;
3952 _OrthancPluginBufferCompression params;
3953 params.target = target;
3954 params.source = source;
3956 params.compression = compression;
3957 params.uncompress = uncompress;
3959 return context->InvokeService(context, _OrthancPluginService_BufferCompression, ¶ms);
3968 } _OrthancPluginReadFile;
3986 _OrthancPluginReadFile params;
3987 params.target = target;
3989 return context->InvokeService(context, _OrthancPluginService_ReadFile, ¶ms);
3999 } _OrthancPluginWriteFile;
4018 _OrthancPluginWriteFile params;
4022 return context->InvokeService(context, _OrthancPluginService_WriteFile, ¶ms);
4029 const char** target;
4031 } _OrthancPluginGetErrorDescription;
4047 const char* result = NULL;
4049 _OrthancPluginGetErrorDescription params;
4050 params.target = &result;
4051 params.error = error;
4056 return "Unknown error code";
4072 } _OrthancPluginSendHttpStatus;
4103 _OrthancPluginSendHttpStatus params;
4104 params.output = output;
4105 params.status = status;
4107 params.bodySize = bodySize;
4108 context->InvokeService(context, _OrthancPluginService_SendHttpStatus, ¶ms);
4116 uint32_t* resultUint32;
4118 void** resultBuffer;
4119 } _OrthancPluginGetImageInfo;
4138 _OrthancPluginGetImageInfo params;
4139 memset(¶ms, 0,
sizeof(params));
4140 params.image = image;
4141 params.resultPixelFormat = ⌖
4171 _OrthancPluginGetImageInfo params;
4172 memset(¶ms, 0,
sizeof(params));
4173 params.image = image;
4174 params.resultUint32 = &width;
4204 _OrthancPluginGetImageInfo params;
4205 memset(¶ms, 0,
sizeof(params));
4206 params.image = image;
4207 params.resultUint32 = &height;
4239 _OrthancPluginGetImageInfo params;
4240 memset(¶ms, 0,
sizeof(params));
4241 params.image = image;
4242 params.resultUint32 = &pitch;
4271 void* target = NULL;
4273 _OrthancPluginGetImageInfo params;
4274 memset(¶ms, 0,
sizeof(params));
4275 params.resultBuffer = ⌖
4276 params.image = image;
4295 } _OrthancPluginUncompressImage;
4318 _OrthancPluginUncompressImage params;
4319 memset(¶ms, 0,
sizeof(params));
4320 params.target = ⌖
4323 params.format = format;
4341 } _OrthancPluginFreeImage;
4356 _OrthancPluginFreeImage params;
4357 params.image = image;
4359 context->InvokeService(context, _OrthancPluginService_FreeImage, ¶ms);
4375 } _OrthancPluginCompressImage;
4406 _OrthancPluginCompressImage params;
4407 memset(¶ms, 0,
sizeof(params));
4408 params.target = target;
4410 params.pixelFormat = format;
4411 params.width = width;
4412 params.height = height;
4413 params.pitch = pitch;
4414 params.buffer = buffer;
4417 return context->InvokeService(context, _OrthancPluginService_CompressImage, ¶ms);
4452 _OrthancPluginCompressImage params;
4453 memset(¶ms, 0,
sizeof(params));
4454 params.target = target;
4456 params.pixelFormat = format;
4457 params.width = width;
4458 params.height = height;
4459 params.pitch = pitch;
4460 params.buffer = buffer;
4461 params.quality = quality;
4463 return context->InvokeService(context, _OrthancPluginService_CompressImage, ¶ms);
4499 _OrthancPluginCompressAndAnswerImage params;
4500 params.output = output;
4502 params.pixelFormat = format;
4503 params.width = width;
4504 params.height = height;
4505 params.pitch = pitch;
4506 params.buffer = buffer;
4507 params.quality = quality;
4508 context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, ¶ms);
4519 const char* username;
4520 const char* password;
4523 } _OrthancPluginCallHttpClient;
4546 const char* username,
4547 const char* password)
4549 _OrthancPluginCallHttpClient params;
4550 memset(¶ms, 0,
sizeof(params));
4552 params.target = target;
4555 params.username = username;
4556 params.password = password;
4558 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms);
4586 const char* username,
4587 const char* password)
4589 _OrthancPluginCallHttpClient params;
4590 memset(¶ms, 0,
sizeof(params));
4592 params.target = target;
4596 params.bodySize = bodySize;
4597 params.username = username;
4598 params.password = password;
4600 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms);
4628 const char* username,
4629 const char* password)
4631 _OrthancPluginCallHttpClient params;
4632 memset(¶ms, 0,
sizeof(params));
4634 params.target = target;
4638 params.bodySize = bodySize;
4639 params.username = username;
4640 params.password = password;
4642 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms);
4663 const char* username,
4664 const char* password)
4666 _OrthancPluginCallHttpClient params;
4667 memset(¶ms, 0,
sizeof(params));
4671 params.username = username;
4672 params.password = password;
4674 return context->InvokeService(context, _OrthancPluginService_CallHttpClient, ¶ms);
4684 } _OrthancPluginConvertPixelFormat;
4705 _OrthancPluginConvertPixelFormat params;
4706 params.target = ⌖
4707 params.source = source;
4708 params.targetFormat = targetFormat;
4738 _OrthancPluginReturnSingleValue params;
4739 memset(¶ms, 0,
sizeof(params));
4740 params.resultUint32 = &count;
4761 } _OrthancPluginGetFontInfo;
4777 const char* result = NULL;
4779 _OrthancPluginGetFontInfo params;
4780 memset(¶ms, 0,
sizeof(params));
4781 params.name = &result;
4782 params.fontIndex = fontIndex;
4811 _OrthancPluginGetFontInfo params;
4812 memset(¶ms, 0,
sizeof(params));
4813 params.size = &result;
4814 params.fontIndex = fontIndex;
4832 const char* utf8Text;
4838 } _OrthancPluginDrawText;
4862 const char* utf8Text,
4869 _OrthancPluginDrawText params;
4870 memset(¶ms, 0,
sizeof(params));
4871 params.image = image;
4872 params.fontIndex = fontIndex;
4873 params.utf8Text = utf8Text;
4880 return context->InvokeService(context, _OrthancPluginService_DrawText, ¶ms);
4889 const void* content;
4892 } _OrthancPluginStorageAreaCreate;
4916 const void* content,
4920 _OrthancPluginStorageAreaCreate params;
4921 params.storageArea = storageArea;
4923 params.content = content;
4927 return context->InvokeService(context, _OrthancPluginService_StorageAreaCreate, ¶ms);
4937 } _OrthancPluginStorageAreaRead;
4963 _OrthancPluginStorageAreaRead params;
4964 params.target = target;
4965 params.storageArea = storageArea;
4969 return context->InvokeService(context, _OrthancPluginService_StorageAreaRead, ¶ms);
4978 } _OrthancPluginStorageAreaRemove;
5001 _OrthancPluginStorageAreaRemove params;
5002 params.storageArea = storageArea;
5006 return context->InvokeService(context, _OrthancPluginService_StorageAreaRemove, ¶ms);
5015 uint16_t httpStatus;
5016 const char* message;
5017 } _OrthancPluginRegisterErrorCode;
5037 uint16_t httpStatus,
5038 const char* message)
5042 _OrthancPluginRegisterErrorCode params;
5043 params.target = ⌖
5045 params.httpStatus = httpStatus;
5046 params.message = message;
5067 uint32_t minMultiplicity;
5068 uint32_t maxMultiplicity;
5069 } _OrthancPluginRegisterDictionaryTag;
5096 uint32_t minMultiplicity,
5097 uint32_t maxMultiplicity)
5099 _OrthancPluginRegisterDictionaryTag params;
5100 params.group = group;
5101 params.element = element;
5104 params.minMultiplicity = minMultiplicity;
5105 params.maxMultiplicity = maxMultiplicity;
5107 return context->InvokeService(context, _OrthancPluginService_RegisterDictionaryTag, ¶ms);
5118 uint32_t minMultiplicity;
5119 uint32_t maxMultiplicity;
5120 const char* privateCreator;
5121 } _OrthancPluginRegisterPrivateDictionaryTag;
5149 uint32_t minMultiplicity,
5150 uint32_t maxMultiplicity,
5151 const char* privateCreator)
5153 _OrthancPluginRegisterPrivateDictionaryTag params;
5154 params.group = group;
5155 params.element = element;
5158 params.minMultiplicity = minMultiplicity;
5159 params.maxMultiplicity = maxMultiplicity;
5160 params.privateCreator = privateCreator;
5162 return context->InvokeService(context, _OrthancPluginService_RegisterPrivateDictionaryTag, ¶ms);
5171 } _OrthancPluginReconstructMainDicomTags;
5192 _OrthancPluginReconstructMainDicomTags params;
5193 params.level = level;
5194 params.storageArea = storageArea;
5196 return context->InvokeService(context, _OrthancPluginService_ReconstructMainDicomTags, ¶ms);
5203 const char* instanceId;
5208 uint32_t maxStringLength;
5209 } _OrthancPluginDicomToJson;
5237 uint32_t maxStringLength)
5241 _OrthancPluginDicomToJson params;
5242 memset(¶ms, 0,
sizeof(params));
5243 params.result = &result;
5244 params.buffer = buffer;
5246 params.format = format;
5247 params.flags = flags;
5248 params.maxStringLength = maxStringLength;
5282 const char* instanceId,
5285 uint32_t maxStringLength)
5289 _OrthancPluginDicomToJson params;
5290 memset(¶ms, 0,
sizeof(params));
5291 params.result = &result;
5292 params.instanceId = instanceId;
5293 params.format = format;
5294 params.flags = flags;
5295 params.maxStringLength = maxStringLength;
5313 uint32_t headersCount;
5314 const char*
const* headersKeys;
5315 const char*
const* headersValues;
5316 int32_t afterPlugins;
5317 } _OrthancPluginRestApiGet2;
5342 uint32_t headersCount,
5343 const char*
const* headersKeys,
5344 const char*
const* headersValues,
5345 int32_t afterPlugins)
5347 _OrthancPluginRestApiGet2 params;
5348 params.target = target;
5350 params.headersCount = headersCount;
5351 params.headersKeys = headersKeys;
5352 params.headersValues = headersValues;
5353 params.afterPlugins = afterPlugins;
5355 return context->InvokeService(context, _OrthancPluginService_RestApiGet2, ¶ms);
5363 } _OrthancPluginWorklistCallback;
5380 _OrthancPluginWorklistCallback params;
5381 params.callback = callback;
5383 return context->InvokeService(context, _OrthancPluginService_RegisterWorklistCallback, ¶ms);
5394 } _OrthancPluginWorklistAnswersOperation;
5419 _OrthancPluginWorklistAnswersOperation params;
5420 params.answers = answers;
5421 params.query = query;
5422 params.dicom = dicom;
5425 return context->InvokeService(context, _OrthancPluginService_WorklistAddAnswer, ¶ms);
5446 _OrthancPluginWorklistAnswersOperation params;
5447 params.answers = answers;
5448 params.query = NULL;
5449 params.dicom = NULL;
5452 return context->InvokeService(context, _OrthancPluginService_WorklistMarkIncomplete, ¶ms);
5463 } _OrthancPluginWorklistQueryOperation;
5486 int32_t isMatch = 0;
5488 _OrthancPluginWorklistQueryOperation params;
5489 params.query = query;
5490 params.dicom = dicom;
5492 params.isMatch = &isMatch;
5493 params.target = NULL;
5524 _OrthancPluginWorklistQueryOperation params;
5525 params.query = query;
5526 params.dicom = NULL;
5528 params.isMatch = NULL;
5529 params.target = target;
5531 return context->InvokeService(context, _OrthancPluginService_WorklistGetDicomQuery, ¶ms);
5551 _OrthancPluginAccessDicomInstance params;
5552 memset(¶ms, 0,
sizeof(params));
5553 params.resultOrigin = &origin;
5554 params.instance = instance;
5574 } _OrthancPluginCreateDicom;
5608 _OrthancPluginCreateDicom params;
5609 params.target = target;
5611 params.pixelData = pixelData;
5612 params.flags = flags;
5614 return context->InvokeService(context, _OrthancPluginService_CreateDicom, ¶ms);
5621 } _OrthancPluginDecodeImageCallback;
5641 _OrthancPluginDecodeImageCallback params;
5642 params.callback = callback;
5644 return context->InvokeService(context, _OrthancPluginService_RegisterDecodeImageCallback, ¶ms);
5657 const void* constBuffer;
5658 uint32_t bufferSize;
5659 uint32_t frameIndex;
5660 } _OrthancPluginCreateImage;
5683 _OrthancPluginCreateImage params;
5684 memset(¶ms, 0,
sizeof(params));
5685 params.target = ⌖
5686 params.format = format;
5687 params.width = width;
5688 params.height = height;
5728 _OrthancPluginCreateImage params;
5729 memset(¶ms, 0,
sizeof(params));
5730 params.target = ⌖
5731 params.format = format;
5732 params.width = width;
5733 params.height = height;
5734 params.pitch = pitch;
5735 params.buffer = buffer;
5767 uint32_t bufferSize,
5768 uint32_t frameIndex)
5772 _OrthancPluginCreateImage params;
5773 memset(¶ms, 0,
sizeof(params));
5774 params.target = ⌖
5775 params.constBuffer = buffer;
5776 params.bufferSize = bufferSize;
5777 params.frameIndex = frameIndex;
5796 } _OrthancPluginComputeHash;
5817 _OrthancPluginComputeHash params;
5818 params.result = &result;
5819 params.buffer = buffer;
5853 _OrthancPluginComputeHash params;
5854 params.result = &result;
5855 params.buffer = buffer;
5875 } _OrthancPluginLookupDictionary;
5897 _OrthancPluginLookupDictionary params;
5898 params.target = target;
5900 return context->InvokeService(context, _OrthancPluginService_LookupDictionary, ¶ms);
5909 uint32_t answerSize;
5910 uint32_t headersCount;
5911 const char*
const* headersKeys;
5912 const char*
const* headersValues;
5913 } _OrthancPluginSendMultipartItem2;
5939 uint32_t answerSize,
5940 uint32_t headersCount,
5941 const char*
const* headersKeys,
5942 const char*
const* headersValues)
5944 _OrthancPluginSendMultipartItem2 params;
5945 params.output = output;
5946 params.answer = answer;
5947 params.answerSize = answerSize;
5948 params.headersCount = headersCount;
5949 params.headersKeys = headersKeys;
5950 params.headersValues = headersValues;
5952 return context->InvokeService(context, _OrthancPluginService_SendMultipartItem2, ¶ms);
5959 } _OrthancPluginIncomingHttpRequestFilter;
5977 _OrthancPluginIncomingHttpRequestFilter params;
5978 params.callback = callback;
5980 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter, ¶ms);
5989 uint16_t* httpStatus;
5992 uint32_t headersCount;
5993 const char*
const* headersKeys;
5994 const char*
const* headersValues;
5997 const char* username;
5998 const char* password;
6000 const char* certificateFile;
6001 const char* certificateKeyFile;
6002 const char* certificateKeyPassword;
6004 } _OrthancPluginCallHttpClient2;
6052 uint16_t* httpStatus,
6055 uint32_t headersCount,
6056 const char*
const* headersKeys,
6057 const char*
const* headersValues,
6060 const char* username,
6061 const char* password,
6063 const char* certificateFile,
6064 const char* certificateKeyFile,
6065 const char* certificateKeyPassword,
6068 _OrthancPluginCallHttpClient2 params;
6069 memset(¶ms, 0,
sizeof(params));
6071 params.answerBody = answerBody;
6072 params.answerHeaders = answerHeaders;
6073 params.httpStatus = httpStatus;
6074 params.method = method;
6076 params.headersCount = headersCount;
6077 params.headersKeys = headersKeys;
6078 params.headersValues = headersValues;
6080 params.bodySize = bodySize;
6081 params.username = username;
6082 params.password = password;
6083 params.timeout = timeout;
6084 params.certificateFile = certificateFile;
6085 params.certificateKeyFile = certificateKeyFile;
6086 params.certificateKeyPassword = certificateKeyPassword;
6087 params.pkcs11 = pkcs11;
6089 return context->InvokeService(context, _OrthancPluginService_CallHttpClient2, ¶ms);
6108 _OrthancPluginRetrieveDynamicString params;
6109 params.result = &result;
6110 params.argument = NULL;
6129 } _OrthancPluginFindCallback;
6146 _OrthancPluginFindCallback params;
6147 params.callback = callback;
6149 return context->InvokeService(context, _OrthancPluginService_RegisterFindCallback, ¶ms);
6160 uint32_t *resultUint32;
6161 uint16_t *resultGroup;
6162 uint16_t *resultElement;
6163 char **resultString;
6164 } _OrthancPluginFindOperation;
6187 _OrthancPluginFindOperation params;
6188 memset(¶ms, 0,
sizeof(params));
6189 params.answers = answers;
6190 params.dicom = dicom;
6193 return context->InvokeService(context, _OrthancPluginService_FindAddAnswer, ¶ms);
6214 _OrthancPluginFindOperation params;
6215 memset(¶ms, 0,
sizeof(params));
6216 params.answers = answers;
6218 return context->InvokeService(context, _OrthancPluginService_FindMarkIncomplete, ¶ms);
6240 _OrthancPluginFindOperation params;
6241 memset(¶ms, 0,
sizeof(params));
6242 params.query = query;
6243 params.resultUint32 = &count;
6278 _OrthancPluginFindOperation params;
6279 memset(¶ms, 0,
sizeof(params));
6280 params.query = query;
6281 params.index = index;
6282 params.resultGroup = group;
6283 params.resultElement = element;
6285 return context->InvokeService(context, _OrthancPluginService_GetFindQueryTag, ¶ms);
6309 _OrthancPluginFindOperation params;
6310 memset(¶ms, 0,
sizeof(params));
6311 params.query = query;
6312 params.index = index;
6313 params.resultString = &result;
6347 _OrthancPluginFindOperation params;
6348 memset(¶ms, 0,
sizeof(params));
6349 params.query = query;
6350 params.index = index;
6351 params.resultString = &result;
6373 } _OrthancPluginMoveCallback;
6395 _OrthancPluginMoveCallback params;
6396 params.callback = callback;
6397 params.getMoveSize = getMoveSize;
6398 params.applyMove = applyMove;
6399 params.freeMove = freeMove;
6401 return context->InvokeService(context, _OrthancPluginService_RegisterMoveCallback, ¶ms);
6411 } _OrthancPluginCreateFindMatcher;
6434 _OrthancPluginCreateFindMatcher params;
6435 memset(¶ms, 0,
sizeof(params));
6436 params.target = ⌖
6437 params.query = query;
6454 } _OrthancPluginFreeFindMatcher;
6469 _OrthancPluginFreeFindMatcher params;
6470 params.matcher = matcher;
6472 context->InvokeService(context, _OrthancPluginService_FreeFindMatcher, ¶ms);
6482 } _OrthancPluginFindMatcherIsMatch;
6504 int32_t isMatch = 0;
6506 _OrthancPluginFindMatcherIsMatch params;
6507 params.matcher = matcher;
6508 params.dicom = dicom;
6510 params.isMatch = &isMatch;
6527 } _OrthancPluginIncomingHttpRequestFilter2;
6544 _OrthancPluginIncomingHttpRequestFilter2 params;
6545 params.callback = callback;
6547 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter2, ¶ms);
6555 } _OrthancPluginGetPeers;
6573 _OrthancPluginGetPeers params;
6574 memset(¶ms, 0,
sizeof(params));
6575 params.peers = &peers;
6591 } _OrthancPluginFreePeers;
6606 _OrthancPluginFreePeers params;
6607 params.peers = peers;
6609 context->InvokeService(context, _OrthancPluginService_FreePeers, ¶ms);
6617 } _OrthancPluginGetPeersCount;
6636 uint32_t target = 0;
6638 _OrthancPluginGetPeersCount params;
6639 memset(¶ms, 0,
sizeof(params));
6640 params.target = ⌖
6641 params.peers = peers;
6657 const char** target;
6660 const char* userProperty;
6661 } _OrthancPluginGetPeerProperty;
6685 const char* target = NULL;
6687 _OrthancPluginGetPeerProperty params;
6688 memset(¶ms, 0,
sizeof(params));
6689 params.target = ⌖
6690 params.peers = peers;
6691 params.peerIndex = peerIndex;
6692 params.userProperty = NULL;
6726 const char* target = NULL;
6728 _OrthancPluginGetPeerProperty params;
6729 memset(¶ms, 0,
sizeof(params));
6730 params.target = ⌖
6731 params.peers = peers;
6732 params.peerIndex = peerIndex;
6733 params.userProperty = NULL;
6771 const char* userProperty)
6773 const char* target = NULL;
6775 _OrthancPluginGetPeerProperty params;
6776 memset(¶ms, 0,
sizeof(params));
6777 params.target = ⌖
6778 params.peers = peers;
6779 params.peerIndex = peerIndex;
6780 params.userProperty = userProperty;
6799 uint16_t* httpStatus;
6804 uint32_t additionalHeadersCount;
6805 const char*
const* additionalHeadersKeys;
6806 const char*
const* additionalHeadersValues;
6810 } _OrthancPluginCallPeerApi;
6852 uint16_t* httpStatus,
6857 uint32_t additionalHeadersCount,
6858 const char*
const* additionalHeadersKeys,
6859 const char*
const* additionalHeadersValues,
6864 _OrthancPluginCallPeerApi params;
6865 memset(¶ms, 0,
sizeof(params));
6867 params.answerBody = answerBody;
6868 params.answerHeaders = answerHeaders;
6869 params.httpStatus = httpStatus;
6870 params.peers = peers;
6871 params.peerIndex = peerIndex;
6872 params.method = method;
6874 params.additionalHeadersCount = additionalHeadersCount;
6875 params.additionalHeadersKeys = additionalHeadersKeys;
6876 params.additionalHeadersValues = additionalHeadersValues;
6878 params.bodySize = bodySize;
6879 params.timeout = timeout;
6881 return context->InvokeService(context, _OrthancPluginService_CallPeerApi, ¶ms);
6900 } _OrthancPluginCreateJob;
6948 _OrthancPluginCreateJob params;
6949 memset(¶ms, 0,
sizeof(params));
6951 params.target = ⌖
6953 params.finalize = finalize;
6955 params.getProgress = getProgress;
6956 params.getContent = getContent;
6957 params.getSerialized = getSerialized;
6960 params.reset = reset;
6987 } _OrthancPluginCreateJob2;
7034 _OrthancPluginCreateJob2 params;
7035 memset(¶ms, 0,
sizeof(params));
7037 params.target = ⌖
7039 params.finalize = finalize;
7041 params.getProgress = getProgress;
7042 params.getContent = getContent;
7043 params.getSerialized = getSerialized;
7046 params.reset = reset;
7064 } _OrthancPluginFreeJob;
7079 _OrthancPluginFreeJob params;
7082 context->InvokeService(context, _OrthancPluginService_FreeJob, ¶ms);
7092 } _OrthancPluginSubmitJob;
7112 char* resultId = NULL;
7114 _OrthancPluginSubmitJob params;
7115 memset(¶ms, 0,
sizeof(params));
7117 params.resultId = &resultId;
7119 params.priority = priority;
7138 } _OrthancPluginJobsUnserializer;
7156 _OrthancPluginJobsUnserializer params;
7157 params.unserializer = unserializer;
7159 context->InvokeService(context, _OrthancPluginService_RegisterJobsUnserializer, ¶ms);
7167 const char* details;
7169 } _OrthancPluginSetHttpErrorDetails;
7191 const char* details,
7194 _OrthancPluginSetHttpErrorDetails params;
7195 params.output = output;
7196 params.details = details;
7198 context->InvokeService(context, _OrthancPluginService_SetHttpErrorDetails, ¶ms);
7205 const char** result;
7206 const char* argument;
7207 } _OrthancPluginRetrieveStaticString;
7224 const char* result = NULL;
7226 _OrthancPluginRetrieveStaticString params;
7227 params.result = &result;
7228 params.argument = path;
7248 } _OrthancPluginSetMetricsValue;
7272 _OrthancPluginSetMetricsValue params;
7274 params.value = value;
7276 context->InvokeService(context, _OrthancPluginService_SetMetricsValue, ¶ms);
7284 } _OrthancPluginRegisterRefreshMetricsCallback;
7301 _OrthancPluginRegisterRefreshMetricsCallback params;
7302 params.callback = callback;
7303 context->InvokeService(context, _OrthancPluginService_RegisterRefreshMetricsCallback, ¶ms);
7315 } _OrthancPluginEncodeDicomWeb;
7339 char* target = NULL;
7341 _OrthancPluginEncodeDicomWeb params;
7342 params.target = ⌖
7343 params.dicom = dicom;
7344 params.dicomSize = dicomSize;
7345 params.callback = callback;
7381 char* target = NULL;
7383 _OrthancPluginEncodeDicomWeb params;
7384 params.target = ⌖
7385 params.dicom = dicom;
7386 params.dicomSize = dicomSize;
7387 params.callback = callback;
7409 } _OrthancPluginEncodeDicomWeb2;
7434 char* target = NULL;
7436 _OrthancPluginEncodeDicomWeb2 params;
7437 params.target = ⌖
7438 params.dicom = dicom;
7439 params.dicomSize = dicomSize;
7440 params.callback = callback;
7441 params.payload = payload;
7478 char* target = NULL;
7480 _OrthancPluginEncodeDicomWeb2 params;
7481 params.target = ⌖
7482 params.dicom = dicom;
7483 params.dicomSize = dicomSize;
7484 params.callback = callback;
7485 params.payload = payload;
7589 typedef const void* (*OrthancPluginChunkedClientRequestGetChunkData) (
void* request);
7613 uint16_t* httpStatus;
7616 uint32_t headersCount;
7617 const char*
const* headersKeys;
7618 const char*
const* headersValues;
7624 const char* username;
7625 const char* password;
7627 const char* certificateFile;
7628 const char* certificateKeyFile;
7629 const char* certificateKeyPassword;
7631 } _OrthancPluginChunkedHttpClient;
7689 uint16_t* httpStatus,
7692 uint32_t headersCount,
7693 const char*
const* headersKeys,
7694 const char*
const* headersValues,
7700 const char* username,
7701 const char* password,
7703 const char* certificateFile,
7704 const char* certificateKeyFile,
7705 const char* certificateKeyPassword,
7708 _OrthancPluginChunkedHttpClient params;
7709 memset(¶ms, 0,
sizeof(params));
7712 params.httpStatus = httpStatus;
7713 params.method = method;
7715 params.headersCount = headersCount;
7716 params.headersKeys = headersKeys;
7717 params.headersValues = headersValues;
7718 params.username = username;
7719 params.password = password;
7720 params.timeout = timeout;
7721 params.certificateFile = certificateFile;
7722 params.certificateKeyFile = certificateKeyFile;
7723 params.certificateKeyPassword = certificateKeyPassword;
7724 params.pkcs11 = pkcs11;
7727 params.answer = answer;
7728 params.answerAddChunk = answerAddChunk;
7729 params.answerAddHeader = answerAddHeader;
7730 params.request = request;
7731 params.requestIsDone = requestIsDone;
7732 params.requestChunkData = requestChunkData;
7733 params.requestChunkSize = requestChunkSize;
7734 params.requestNext = requestNext;
7736 return context->InvokeService(context, _OrthancPluginService_ChunkedHttpClient, ¶ms);
7826 const char* pathRegularExpression;
7834 } _OrthancPluginChunkedRestCallback;
7868 const char* pathRegularExpression,
7877 _OrthancPluginChunkedRestCallback params;
7878 params.pathRegularExpression = pathRegularExpression;
7879 params.getHandler = getHandler;
7880 params.postHandler = postHandler;
7881 params.deleteHandler = deleteHandler;
7882 params.putHandler = putHandler;
7883 params.addChunk = addChunk;
7884 params.execute = execute;
7885 params.finalize = finalize;
7887 context->InvokeService(context, _OrthancPluginService_RegisterChunkedRestCallback, ¶ms);
7899 const char* privateCreator;
7900 } _OrthancPluginGetTagName;
7921 const char* privateCreator)
7925 _OrthancPluginGetTagName params;
7926 params.result = &result;
7927 params.group = group;
7928 params.element = element;
7929 params.privateCreator = privateCreator;
7975 const char* transactionUid,
7976 const char*
const* sopClassUids,
7977 const char*
const* sopInstanceUids,
7978 uint32_t countInstances,
7979 const char* remoteAet,
7980 const char* calledAet);
8018 const char* sopClassUid,
8019 const char* sopInstanceUid);
8027 } _OrthancPluginRegisterStorageCommitmentScpCallback;
8048 _OrthancPluginRegisterStorageCommitmentScpCallback params;
8049 params.factory = factory;
8050 params.destructor = destructor;
8051 params.lookup = lookup;
8052 return context->InvokeService(context, _OrthancPluginService_RegisterStorageCommitmentScpCallback, ¶ms);
8089 } _OrthancPluginIncomingDicomInstanceFilter;
8107 _OrthancPluginIncomingDicomInstanceFilter params;
8108 params.callback = callback;
8110 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingDicomInstanceFilter, ¶ms);
8145 uint16_t* dimseStatus ,
8152 } _OrthancPluginIncomingCStoreInstanceFilter;
8170 _OrthancPluginIncomingCStoreInstanceFilter params;
8171 params.callback = callback;
8173 return context->InvokeService(context, _OrthancPluginService_RegisterIncomingCStoreInstanceFilter, ¶ms);
8213 const void* receivedDicomBuffer,
8214 uint64_t receivedDicomBufferSize,
8221 } _OrthancPluginReceivedInstanceCallback;
8247 _OrthancPluginReceivedInstanceCallback params;
8248 params.callback = callback;
8250 return context->InvokeService(context, _OrthancPluginService_RegisterReceivedInstanceCallback, ¶ms);
8272 _OrthancPluginAccessDicomInstance params;
8273 memset(¶ms, 0,
sizeof(params));
8274 params.resultStringToFree = &result;
8275 params.instance = instance;
8305 int64_t hasPixelData;
8307 _OrthancPluginAccessDicomInstance params;
8308 memset(¶ms, 0,
sizeof(params));
8309 params.resultInt64 = &hasPixelData;
8310 params.instance = instance;
8321 return (hasPixelData != 0);
8335 const char* transferSyntax;
8336 } _OrthancPluginCreateDicomInstance;
8358 _OrthancPluginCreateDicomInstance params;
8359 params.target = ⌖
8360 params.buffer = buffer;
8377 } _OrthancPluginFreeDicomInstance;
8393 _OrthancPluginFreeDicomInstance params;
8394 params.dicom = dicom;
8396 context->InvokeService(context, _OrthancPluginService_FreeDicomInstance, ¶ms);
8402 uint32_t* targetUint32;
8405 char** targetStringToFree;
8407 uint32_t frameIndex;
8410 uint32_t maxStringLength;
8412 void* dicomWebPayload;
8413 } _OrthancPluginAccessDicomInstance2;
8432 _OrthancPluginAccessDicomInstance2 params;
8433 memset(¶ms, 0,
sizeof(params));
8434 params.targetUint32 = &count;
8435 params.instance = instance;
8470 uint32_t frameIndex)
8472 _OrthancPluginAccessDicomInstance2 params;
8473 memset(¶ms, 0,
sizeof(params));
8474 params.targetBuffer = target;
8475 params.instance = instance;
8476 params.frameIndex = frameIndex;
8478 return context->InvokeService(context, _OrthancPluginService_GetInstanceRawFrame, ¶ms);
8497 uint32_t frameIndex)
8501 _OrthancPluginAccessDicomInstance2 params;
8502 memset(¶ms, 0,
sizeof(params));
8503 params.targetImage = ⌖
8504 params.instance = instance;
8505 params.frameIndex = frameIndex;
8537 const char* transferSyntax)
8541 _OrthancPluginCreateDicomInstance params;
8542 params.target = ⌖
8543 params.buffer = buffer;
8545 params.transferSyntax = transferSyntax;
8576 _OrthancPluginAccessDicomInstance2 params;
8577 memset(¶ms, 0,
sizeof(params));
8578 params.targetBuffer = target;
8579 params.instance = instance;
8581 return context->InvokeService(context, _OrthancPluginService_SerializeDicomInstance, ¶ms);
8608 uint32_t maxStringLength)
8610 char* result = NULL;
8612 _OrthancPluginAccessDicomInstance2 params;
8613 memset(¶ms, 0,
sizeof(params));
8614 params.targetStringToFree = &result;
8615 params.instance = instance;
8616 params.format = format;
8617 params.flags = flags;
8618 params.maxStringLength = maxStringLength;
8652 char* target = NULL;
8654 _OrthancPluginAccessDicomInstance2 params;
8655 params.targetStringToFree = ⌖
8656 params.instance = instance;
8657 params.dicomWebCallback = callback;
8658 params.dicomWebPayload = payload;
8692 char* target = NULL;
8694 _OrthancPluginAccessDicomInstance2 params;
8695 params.targetStringToFree = ⌖
8696 params.instance = instance;
8697 params.dicomWebCallback = callback;
8698 params.dicomWebPayload = payload;
8735 const char*
const* allowedSyntaxes,
8736 uint32_t countSyntaxes,
8737 uint8_t allowNewSopInstanceUid);
8743 } _OrthancPluginTranscoderCallback;
8762 _OrthancPluginTranscoderCallback params;
8763 params.callback = callback;
8765 return context->InvokeService(context, _OrthancPluginService_RegisterTranscoderCallback, ¶ms);
8774 } _OrthancPluginCreateMemoryBuffer;
8798 _OrthancPluginCreateMemoryBuffer params;
8799 params.target = target;
8802 return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer, ¶ms);
8836 _OrthancPluginRetrieveDynamicString params;
8837 params.result = &result;
8838 params.argument = NULL;
8840 if (context->InvokeService(context, _OrthancPluginService_GenerateRestApiAuthorizationToken,
8858 } _OrthancPluginCreateMemoryBuffer64;
8882 _OrthancPluginCreateMemoryBuffer64 params;
8883 params.target = target;
8886 return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer64, ¶ms);
8896 } _OrthancPluginRegisterStorageArea2;
8921 _OrthancPluginRegisterStorageArea2 params;
8922 params.create = create;
8923 params.readWhole = readWhole;
8924 params.readRange = readRange;
8925 params.remove = remove;
8926 context->InvokeService(context, _OrthancPluginService_RegisterStorageArea2, ¶ms);
8933 _OrthancPluginCreateDicom createDicom;
8934 const char* privateCreator;
8935 } _OrthancPluginCreateDicom2;
8967 const char* privateCreator)
8969 _OrthancPluginCreateDicom2 params;
8970 params.createDicom.target = target;
8971 params.createDicom.json = json;
8972 params.createDicom.pixelData = pixelData;
8973 params.createDicom.flags = flags;
8974 params.privateCreator = privateCreator;
8976 return context->InvokeService(context, _OrthancPluginService_CreateDicom2, ¶ms);
8988 uint16_t* httpStatus;
8991 uint32_t headersCount;
8992 const char*
const* headersKeys;
8993 const char*
const* headersValues;
8996 uint8_t afterPlugins;
8997 } _OrthancPluginCallRestApi;
9033 uint16_t* httpStatus,
9036 uint32_t headersCount,
9037 const char*
const* headersKeys,
9038 const char*
const* headersValues,
9041 uint8_t afterPlugins)
9043 _OrthancPluginCallRestApi params;
9044 memset(¶ms, 0,
sizeof(params));
9046 params.answerBody = answerBody;
9047 params.answerHeaders = answerHeaders;
9048 params.httpStatus = httpStatus;
9049 params.method = method;
9051 params.headersCount = headersCount;
9052 params.headersKeys = headersKeys;
9053 params.headersValues = headersValues;
9055 params.bodySize = bodySize;
9056 params.afterPlugins = afterPlugins;
9058 return context->InvokeService(context, _OrthancPluginService_CallRestApi, ¶ms);
9090 const char* mimeType,
9091 const char* dateTime);
9110 const char* dateTime);
9138 const char* mimeType,
9139 const char* dateTime);
9156 uint8_t* isExisting,
9158 const char*
const* pathItems,
9181 uint8_t* isExisting,
9186 const char*
const* pathItems,
9210 const char*
const* pathItems,
9230 uint8_t* isReadOnly,
9232 const char*
const* pathItems,
9252 uint8_t* isReadOnly,
9254 const char*
const* pathItems,
9272 uint8_t* isReadOnly,
9274 const char*
const* pathItems,
9288 } _OrthancPluginRegisterWebDavCollection;
9321 _OrthancPluginRegisterWebDavCollection params;
9323 params.isExistingFolder = isExistingFolder;
9324 params.listFolder = listFolder;
9325 params.retrieveFile = retrieveFile;
9326 params.storeFile = storeFile;
9327 params.createFolder = createFolder;
9328 params.deleteItem = deleteItem;
9329 params.payload = payload;
9331 return context->InvokeService(context, _OrthancPluginService_RegisterWebDavCollection, ¶ms);
9348 _OrthancPluginRetrieveStaticString params;
9349 params.result = &result;
9350 params.argument = NULL;
9373 const void* request,
9374 uint64_t requestSize);
9386 uint32_t maxDatabaseRetries;
9389 } _OrthancPluginRegisterDatabaseBackendV4;
9411 uint32_t maxDatabaseRetries,
9415 _OrthancPluginRegisterDatabaseBackendV4 params;
9416 params.backend = backend;
9417 params.maxDatabaseRetries = maxDatabaseRetries;
9418 params.operations = operations;
9419 params.finalize = finalize;
9421 return context->InvokeService(context, _OrthancPluginService_RegisterDatabaseBackendV4, ¶ms);
9428 const char* instanceId;
9430 } _OrthancPluginLoadDicomInstance;
9447 const char* instanceId,
9452 _OrthancPluginLoadDicomInstance params;
9453 params.target = ⌖
9454 params.instanceId = instanceId;
9474 } _OrthancPluginSetMetricsIntegerValue;
9497 _OrthancPluginSetMetricsIntegerValue params;
9499 params.value = value;
9501 context->InvokeService(context, _OrthancPluginService_SetMetricsIntegerValue, ¶ms);
9520 const char* threadName)
9522 return context->InvokeService(context, _OrthancPluginService_SetCurrentThreadName, threadName);
9529 const char* message;
9535 } _OrthancPluginLogMessage;
9553 const char* message,
9560 _OrthancPluginLogMessage m;
9561 m.message = message;
9565 m.category = category;
9567 context->InvokeService(context, _OrthancPluginService_LogMessage, &m);
OrthancPluginErrorCode OrthancPluginRegisterDatabaseBackendV4(OrthancPluginContext *context, void *backend, uint32_t maxDatabaseRetries, OrthancPluginCallDatabaseBackendV4 operations, OrthancPluginFinalizeDatabaseBackendV4 finalize)
Register a custom database back-end.
Definition: OrthancCPlugin.h:9408
OrthancPluginErrorCode(* OrthancPluginCallDatabaseBackendV4)(OrthancPluginMemoryBuffer64 *response, void *backend, const void *request, uint64_t requestSize)
Signature of a callback function that is triggered when the Orthanc core requests an operation from t...
Definition: OrthancCPlugin.h:9370
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:8211
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:9086
void OrthancPluginRegisterStorageArea(OrthancPluginContext *context, OrthancPluginStorageCreate create, OrthancPluginStorageRead read, OrthancPluginStorageRemove remove)
Register a custom storage area.
Definition: OrthancCPlugin.h:3325
void OrthancPluginRegisterOnStoredInstanceCallback(OrthancPluginContext *context, OrthancPluginOnStoredInstanceCallback callback)
Register a callback for received instances.
Definition: OrthancCPlugin.h:2290
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:1329
OrthancPluginErrorCode OrthancPluginRegisterDecodeImageCallback(OrthancPluginContext *context, OrthancPluginDecodeImageCallback callback)
Register a callback to handle the decoding of DICOM images.
Definition: OrthancCPlugin.h:5637
OrthancPluginChangeType
Definition: OrthancCPlugin.h:756
OrthancPluginErrorCode(* OrthancPluginStorageReadWhole)(OrthancPluginMemoryBuffer64 *target, const char *uuid, OrthancPluginContentType type)
Callback for reading a whole file from the storage area.
Definition: OrthancCPlugin.h:1395
OrthancPluginErrorCode OrthancPluginRegisterIncomingCStoreInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingCStoreInstanceFilter callback)
Register a callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition: OrthancCPlugin.h:8166
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:1307
void OrthancPluginRegisterRefreshMetricsCallback(OrthancPluginContext *context, OrthancPluginRefreshMetricsCallback callback)
Register a callback to refresh the metrics.
Definition: OrthancCPlugin.h:7297
OrthancPluginErrorCode(* OrthancPluginWebDavCreateFolderCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback to create a folder.
Definition: OrthancCPlugin.h:9251
struct _OrthancPluginWebDavCollection_t OrthancPluginWebDavCollection
Opaque structure that represents a WebDAV collection.
Definition: OrthancCPlugin.h:9067
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:1865
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:9206
int32_t(* OrthancPluginIncomingDicomInstanceFilter)(const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc.
Definition: OrthancCPlugin.h:8082
OrthancPluginErrorCode OrthancPluginStorageAreaRemove(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Remove a file from the storage area.
Definition: OrthancCPlugin.h:4995
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:8731
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter2(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter2 callback)
Register a callback to filter incoming HTTP requests.
Definition: OrthancCPlugin.h:6540
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:9134
OrthancPluginErrorCode(* OrthancPluginStorageRead)(void **content, int64_t *size, const char *uuid, OrthancPluginContentType type)
Callback for reading from the storage area.
Definition: OrthancCPlugin.h:1375
void OrthancPluginRegisterRestCallback(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback.
Definition: OrthancCPlugin.h:2212
uint32_t OrthancPluginGetExpectedDatabaseVersion(OrthancPluginContext *context)
Get the expected version of the database schema.
Definition: OrthancCPlugin.h:3799
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:8243
int32_t OrthancPluginCheckVersion(OrthancPluginContext *context)
Check the compatibility of the plugin wrt. the version of its hosting Orthanc.
Definition: OrthancCPlugin.h:2093
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:9180
struct _OrthancPluginRestOutput_t OrthancPluginRestOutput
Opaque structure that represents the HTTP connection to the client application.
Definition: OrthancCPlugin.h:1178
void OrthancPluginRegisterOnChangeCallback(OrthancPluginContext *context, OrthancPluginOnChangeCallback callback)
Register a callback to monitor changes.
Definition: OrthancCPlugin.h:3468
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:8914
OrthancPluginErrorCode(* OrthancPluginWebDavAddFolder)(OrthancPluginWebDavCollection *collection, const char *name, const char *dateTime)
Declare a subfolder while returning the content of a folder.
Definition: OrthancCPlugin.h:9107
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:9310
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:1521
OrthancPluginErrorCode(* OrthancPluginRestCallback)(OrthancPluginRestOutput *output, const char *url, const OrthancPluginHttpRequest *request)
Signature of a callback function that answers to a REST request.
Definition: OrthancCPlugin.h:1275
void(* OrthancPluginRefreshMetricsCallback)()
Callback executed to update the metrics of the plugin.
Definition: OrthancCPlugin.h:1837
OrthancPluginErrorCode OrthancPluginRegisterTranscoderCallback(OrthancPluginContext *context, OrthancPluginTranscoderCallback callback)
Register a callback to handle the transcoding of DICOM images.
Definition: OrthancCPlugin.h:8758
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:1286
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:9229
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:9271
OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, OrthancPluginResourceType level)
Reconstruct the main DICOM tags.
Definition: OrthancCPlugin.h:5187
OrthancPluginErrorCode(* OrthancPluginStorageRemove)(const char *uuid, OrthancPluginContentType type)
Callback for removing a file from the storage area.
Definition: OrthancCPlugin.h:1436
OrthancPluginErrorCode(* OrthancPluginStorageCreate)(const char *uuid, const void *content, int64_t size, OrthancPluginContentType type)
Callback for writing to the storage area.
Definition: OrthancCPlugin.h:1348
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:1903
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:1296
void(* OrthancPluginFinalizeDatabaseBackendV4)(void *backend)
Signature of a callback function that is triggered when the database plugin must be finalized.
Definition: OrthancCPlugin.h:9381
struct _OrthancPluginServerChunkedRequestReader_t OrthancPluginServerChunkedRequestReader
Opaque structure that reads the content of a HTTP request body during a chunked HTTP transfer.
Definition: OrthancCPlugin.h:7745
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:9155
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:1486
OrthancPluginJob *(* OrthancPluginJobsUnserializer)(const char *jobType, const char *serialized)
Callback executed to unserialize a custom job.
Definition: OrthancCPlugin.h:1818
void OrthancPluginRegisterJobsUnserializer(OrthancPluginContext *context, OrthancPluginJobsUnserializer unserializer)
Register an unserializer for custom jobs.
Definition: OrthancCPlugin.h:7152
void(* OrthancPluginFree)(void *buffer)
Signature of a function to free dynamic memory.
Definition: OrthancCPlugin.h:1319
void OrthancPluginRegisterRestCallbackNoLock(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback, without locking.
Definition: OrthancCPlugin.h:2252
OrthancPluginErrorCode OrthancPluginStorageAreaRead(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Read a file from the storage area.
Definition: OrthancCPlugin.h:4956
int32_t OrthancPluginCheckVersionAdvanced(OrthancPluginContext *context, int32_t expectedMajor, int32_t expectedMinor, int32_t expectedRevision)
Check that the version of the hosting Orthanc is above a given version.
Definition: OrthancCPlugin.h:1984
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:1418
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:7866
int32_t(* OrthancPluginIncomingCStoreInstanceFilter)(uint16_t *dimseStatus, const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition: OrthancCPlugin.h:8144
OrthancPluginErrorCode OrthancPluginRegisterIncomingDicomInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingDicomInstanceFilter callback)
Register a callback to filter incoming DICOM instances.
Definition: OrthancCPlugin.h:8103
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter callback)
Register a callback to filter incoming HTTP requests.
Definition: OrthancCPlugin.h:5973
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:4912
@ OrthancPluginChangeType_OrthancStopped
Definition: OrthancCPlugin.h:768
@ OrthancPluginChangeType_OrthancStarted
Definition: OrthancCPlugin.h:767
@ OrthancPluginChangeType_Deleted
Definition: OrthancCPlugin.h:758
@ OrthancPluginChangeType_JobFailure
Definition: OrthancCPlugin.h:775
@ OrthancPluginChangeType_NewInstance
Definition: OrthancCPlugin.h:760
@ OrthancPluginChangeType_NewPatient
Definition: OrthancCPlugin.h:761
@ OrthancPluginChangeType_JobSubmitted
Definition: OrthancCPlugin.h:773
@ OrthancPluginChangeType_NewSeries
Definition: OrthancCPlugin.h:762
@ OrthancPluginChangeType_StablePatient
Definition: OrthancCPlugin.h:764
@ OrthancPluginChangeType_UpdatedPeers
Definition: OrthancCPlugin.h:771
@ OrthancPluginChangeType_StableStudy
Definition: OrthancCPlugin.h:766
@ OrthancPluginChangeType_CompletedSeries
Definition: OrthancCPlugin.h:757
@ OrthancPluginChangeType_NewChildInstance
Definition: OrthancCPlugin.h:759
@ OrthancPluginChangeType_UpdatedAttachment
Definition: OrthancCPlugin.h:769
@ OrthancPluginChangeType_UpdatedMetadata
Definition: OrthancCPlugin.h:770
@ OrthancPluginChangeType_StableSeries
Definition: OrthancCPlugin.h:765
@ OrthancPluginChangeType_UpdatedModalities
Definition: OrthancCPlugin.h:772
@ OrthancPluginChangeType_JobSuccess
Definition: OrthancCPlugin.h:774
@ OrthancPluginChangeType_NewStudy
Definition: OrthancCPlugin.h:763
uint32_t OrthancPluginGetFindQuerySize(OrthancPluginContext *context, const OrthancPluginFindQuery *query)
Get the number of tags in a C-Find query.
Definition: OrthancCPlugin.h:6234
struct _OrthancPluginFindQuery_t OrthancPluginFindQuery
Opaque structure to an object that represents a C-Find query.
Definition: OrthancCPlugin.h:1226
OrthancPluginErrorCode(* OrthancPluginApplyMove)(void *moveDriver)
Callback to apply one C-Move suboperation.
Definition: OrthancCPlugin.h:1631
OrthancPluginErrorCode OrthancPluginFindMarkIncomplete(OrthancPluginContext *context, OrthancPluginFindAnswers *answers)
Mark the set of C-Find answers as incomplete.
Definition: OrthancCPlugin.h:6210
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:6302
void(* OrthancPluginStorageCommitmentDestructor)(void *handler)
Callback to free one storage commitment SCP handler.
Definition: OrthancCPlugin.h:7994
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:1455
OrthancPluginErrorCode OrthancPluginRegisterMoveCallback(OrthancPluginContext *context, OrthancPluginMoveCallback callback, OrthancPluginGetMoveSize getMoveSize, OrthancPluginApplyMove applyMove, OrthancPluginFreeMove freeMove)
Register a callback to handle C-Move requests.
Definition: OrthancCPlugin.h:6388
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:7972
OrthancPluginErrorCode OrthancPluginRegisterFindCallback(OrthancPluginContext *context, OrthancPluginFindCallback callback)
Register a callback to handle C-Find requests.
Definition: OrthancCPlugin.h:6142
OrthancPluginErrorCode OrthancPluginWorklistGetDicomQuery(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginWorklistQuery *query)
Retrieve the worklist query as a DICOM file.
Definition: OrthancCPlugin.h:5519
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:8015
int32_t OrthancPluginWorklistIsMatch(OrthancPluginContext *context, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size)
Test whether a worklist matches the query.
Definition: OrthancCPlugin.h:5480
OrthancPluginErrorCode OrthancPluginFindAddAnswer(OrthancPluginContext *context, OrthancPluginFindAnswers *answers, const void *dicom, uint32_t size)
Add one answer to some C-Find request.
Definition: OrthancCPlugin.h:6181
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:1591
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:8042
struct _OrthancPluginFindAnswers_t OrthancPluginFindAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition: OrthancCPlugin.h:1234
struct _OrthancPluginWorklistAnswers_t OrthancPluginWorklistAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition: OrthancCPlugin.h:1218
OrthancPluginErrorCode(* OrthancPluginFindCallback)(OrthancPluginFindAnswers *answers, const OrthancPluginFindQuery *query, const char *issuerAet, const char *calledAet)
Callback to handle incoming C-Find SCP requests.
Definition: OrthancCPlugin.h:1548
uint32_t(* OrthancPluginGetMoveSize)(void *moveDriver)
Callback to read the size of a C-Move driver.
Definition: OrthancCPlugin.h:1616
OrthancPluginErrorCode OrthancPluginRegisterWorklistCallback(OrthancPluginContext *context, OrthancPluginWorklistCallback callback)
Register a callback to handle modality worklists requests.
Definition: OrthancCPlugin.h:5376
OrthancPluginErrorCode OrthancPluginWorklistMarkIncomplete(OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers)
Mark the set of worklist answers as incomplete.
Definition: OrthancCPlugin.h:5442
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:6340
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:6271
void(* OrthancPluginFreeMove)(void *moveDriver)
Callback to free one C-Move driver.
Definition: OrthancCPlugin.h:1645
struct _OrthancPluginWorklistQuery_t OrthancPluginWorklistQuery
Opaque structure to an object that represents a C-Find query for worklists.
Definition: OrthancCPlugin.h:1210
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:5412
int32_t OrthancPluginHasInstancePixelData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Check whether the DICOM file has pixel data.
Definition: OrthancCPlugin.h:8301
char * OrthancPluginGetInstanceDicomWebXml(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb XML.
Definition: OrthancCPlugin.h:8686
struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance
Opaque structure that represents a DICOM instance that is managed by the Orthanc core.
Definition: OrthancCPlugin.h:1186
char * OrthancPluginGetInstanceTransferSyntaxUid(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the transfer syntax of a DICOM file.
Definition: OrthancCPlugin.h:8266
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:8466
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:8603
const void * OrthancPluginGetInstanceData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the data of a DICOM file.
Definition: OrthancCPlugin.h:3122
OrthancPluginDicomInstance * OrthancPluginCreateDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size)
Parse a DICOM instance.
Definition: OrthancCPlugin.h:8351
int32_t OrthancPluginHasInstanceMetadata(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, const char *metadata)
Check whether a DICOM instance is associated with some metadata.
Definition: OrthancCPlugin.h:3235
uint32_t OrthancPluginGetInstanceFramesCount(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the number of frames in a DICOM instance.
Definition: OrthancCPlugin.h:8426
OrthancPluginImage * OrthancPluginGetInstanceDecodedFrame(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition: OrthancCPlugin.h:8494
OrthancPluginDicomInstance * OrthancPluginLoadDicomInstance(OrthancPluginContext *context, const char *instanceId, OrthancPluginLoadDicomInstanceMode mode)
Load a DICOM instance from the Orthanc server.
Definition: OrthancCPlugin.h:9445
OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the origin of a DICOM file.
Definition: OrthancCPlugin.h:5545
int64_t OrthancPluginGetInstanceSize(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the size of a DICOM file.
Definition: OrthancCPlugin.h:3089
char * OrthancPluginGetInstanceDicomWebJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb JSON.
Definition: OrthancCPlugin.h:8646
char * OrthancPluginGetInstanceSimplifiedJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file (with simplification).
Definition: OrthancCPlugin.h:3196
char * OrthancPluginGetInstanceJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file.
Definition: OrthancCPlugin.h:3158
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:3276
void OrthancPluginFreeDicomInstance(OrthancPluginContext *context, OrthancPluginDicomInstance *dicom)
Free a DICOM instance.
Definition: OrthancCPlugin.h:8389
OrthancPluginErrorCode OrthancPluginSerializeDicomInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginDicomInstance *instance)
Writes a DICOM instance to a memory buffer.
Definition: OrthancCPlugin.h:8571
OrthancPluginDicomInstance * OrthancPluginTranscodeDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size, const char *transferSyntax)
Parse and transcode a DICOM instance.
Definition: OrthancCPlugin.h:8533
const char * OrthancPluginGetInstanceRemoteAet(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the AET of a DICOM instance.
Definition: OrthancCPlugin.h:3056
OrthancPluginPixelFormat
Definition: OrthancCPlugin.h:631
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:4858
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:4442
uint32_t OrthancPluginGetImagePitch(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pitch of an image.
Definition: OrthancCPlugin.h:4233
OrthancPluginImage * OrthancPluginConvertPixelFormat(OrthancPluginContext *context, const OrthancPluginImage *source, OrthancPluginPixelFormat targetFormat)
Change the pixel format of an image.
Definition: OrthancCPlugin.h:4698
OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pixel format of an image.
Definition: OrthancCPlugin.h:4132
uint32_t OrthancPluginGetFontsCount(OrthancPluginContext *context)
Return the number of available fonts.
Definition: OrthancCPlugin.h:4733
uint32_t OrthancPluginGetImageHeight(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the height of an image.
Definition: OrthancCPlugin.h:4198
void OrthancPluginFreeImage(OrthancPluginContext *context, OrthancPluginImage *image)
Free an image.
Definition: OrthancCPlugin.h:4352
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:4397
OrthancPluginImage * OrthancPluginCreateImage(OrthancPluginContext *context, OrthancPluginPixelFormat format, uint32_t width, uint32_t height)
Create an image.
Definition: OrthancCPlugin.h:5675
OrthancPluginImage * OrthancPluginUncompressImage(OrthancPluginContext *context, const void *data, uint32_t size, OrthancPluginImageFormat format)
Decode a compressed image.
Definition: OrthancCPlugin.h:4310
const char * OrthancPluginGetFontName(OrthancPluginContext *context, uint32_t fontIndex)
Return the name of a font.
Definition: OrthancCPlugin.h:4773
void * OrthancPluginGetImageBuffer(OrthancPluginContext *context, const OrthancPluginImage *image)
Return a pointer to the content of an image.
Definition: OrthancCPlugin.h:4267
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:5718
OrthancPluginImageFormat
Definition: OrthancCPlugin.h:801
struct _OrthancPluginStorageArea_t OrthancPluginStorageArea
Opaque structure that represents the storage area that is actually used by Orthanc.
Definition: OrthancCPlugin.h:1202
OrthancPluginCompressionType
Definition: OrthancCPlugin.h:786
uint32_t OrthancPluginGetImageWidth(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the width of an image.
Definition: OrthancCPlugin.h:4165
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:3944
OrthancPluginImage * OrthancPluginDecodeDicomImage(OrthancPluginContext *context, const void *buffer, uint32_t bufferSize, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition: OrthancCPlugin.h:5764
uint32_t OrthancPluginGetFontSize(OrthancPluginContext *context, uint32_t fontIndex)
Return the size of a font.
Definition: OrthancCPlugin.h:4805
struct _OrthancPluginImage_t OrthancPluginImage
Opaque structure that represents an image that is uncompressed in memory.
Definition: OrthancCPlugin.h:1194
@ OrthancPluginPixelFormat_RGBA32
Color image in RGBA32 format.
Definition: OrthancCPlugin.h:670
@ OrthancPluginPixelFormat_RGB48
Color image in RGB48 format.
Definition: OrthancCPlugin.h:680
@ OrthancPluginPixelFormat_Grayscale8
Graylevel 8bpp image.
Definition: OrthancCPlugin.h:638
@ OrthancPluginPixelFormat_SignedGrayscale16
Graylevel, signed 16bpp image.
Definition: OrthancCPlugin.h:654
@ OrthancPluginPixelFormat_Float32
Graylevel, floating-point 32bpp image.
Definition: OrthancCPlugin.h:696
@ OrthancPluginPixelFormat_RGB24
Color image in RGB24 format.
Definition: OrthancCPlugin.h:662
@ OrthancPluginPixelFormat_BGRA32
Color image in BGRA32 format.
Definition: OrthancCPlugin.h:704
@ OrthancPluginPixelFormat_Unknown
Definition: OrthancCPlugin.h:672
@ OrthancPluginPixelFormat_Grayscale64
Graylevel, unsigned 64bpp image.
Definition: OrthancCPlugin.h:712
@ OrthancPluginPixelFormat_Grayscale32
Graylevel, unsigned 32bpp image.
Definition: OrthancCPlugin.h:688
@ OrthancPluginPixelFormat_Grayscale16
Graylevel, unsigned 16bpp image.
Definition: OrthancCPlugin.h:646
@ OrthancPluginImageFormat_Png
Definition: OrthancCPlugin.h:802
@ OrthancPluginImageFormat_Jpeg
Definition: OrthancCPlugin.h:803
@ OrthancPluginImageFormat_Dicom
Definition: OrthancCPlugin.h:804
@ OrthancPluginCompressionType_Gzip
Definition: OrthancCPlugin.h:789
@ OrthancPluginCompressionType_ZlibWithSize
Definition: OrthancCPlugin.h:788
@ OrthancPluginCompressionType_Zlib
Definition: OrthancCPlugin.h:787
@ OrthancPluginCompressionType_GzipWithSize
Definition: OrthancCPlugin.h:790
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:2520
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:2555
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:2668
char * OrthancPluginLookupStudy(OrthancPluginContext *context, const char *studyUID)
Look for a study.
Definition: OrthancCPlugin.h:2769
OrthancPluginErrorCode OrthancPluginSetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *value)
Set the value of a global property.
Definition: OrthancCPlugin.h:3702
char * OrthancPluginGetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *defaultValue)
Get the value of a global property.
Definition: OrthancCPlugin.h:3663
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:2632
char * OrthancPluginLookupSeries(OrthancPluginContext *context, const char *seriesUID)
Look for a series.
Definition: OrthancCPlugin.h:2839
char * OrthancPluginLookupStudyWithAccessionNumber(OrthancPluginContext *context, const char *accessionNumber)
Look for a study, using the accession number.
Definition: OrthancCPlugin.h:2804
char * OrthancPluginGenerateRestApiAuthorizationToken(OrthancPluginContext *context)
Generate a token to grant full access to the REST API of Orthanc.
Definition: OrthancCPlugin.h:8831
OrthancPluginErrorCode OrthancPluginRestApiGet(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri)
Make a GET call to the built-in Orthanc REST API.
Definition: OrthancCPlugin.h:2453
char * OrthancPluginLookupInstance(OrthancPluginContext *context, const char *sopInstanceUID)
Look for an instance.
Definition: OrthancCPlugin.h:2874
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:2483
char * OrthancPluginLookupPatient(OrthancPluginContext *context, const char *patientID)
Look for a patient.
Definition: OrthancCPlugin.h:2734
OrthancPluginErrorCode OrthancPluginRestApiDelete(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the built-in Orthanc REST API.
Definition: OrthancCPlugin.h:2584
OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the REST API, as tainted by the plugins.
Definition: OrthancCPlugin.h:2607
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:9029
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:5338
OrthancPluginErrorCode OrthancPluginGetDicomForInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *instanceId)
Retrieve a DICOM instance using its Orthanc identifier.
Definition: OrthancCPlugin.h:2420
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:2379
void OrthancPluginSendUnauthorized(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *realm)
Signal that a REST request is not authorized.
Definition: OrthancCPlugin.h:2942
void OrthancPluginSetHttpErrorDetails(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *details, uint8_t log)
Provide a detailed description for an HTTP error.
Definition: OrthancCPlugin.h:7188
void OrthancPluginSendMethodNotAllowed(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *allowedMethods)
Signal that this URI does not support this HTTP method.
Definition: OrthancCPlugin.h:2965
void OrthancPluginAnswerBuffer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize, const char *mimeType)
Answer to a REST request.
Definition: OrthancCPlugin.h:2322
void OrthancPluginSendHttpStatusCode(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status)
Send a HTTP status code.
Definition: OrthancCPlugin.h:2919
void OrthancPluginSetHttpHeader(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *key, const char *value)
Set some HTTP header.
Definition: OrthancCPlugin.h:3020
void OrthancPluginSetCookie(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *cookie, const char *value)
Set a cookie.
Definition: OrthancCPlugin.h:2995
void OrthancPluginRedirect(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *redirection)
Redirect a REST request.
Definition: OrthancCPlugin.h:2702
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:4489
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:3902
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:5935
void OrthancPluginSendHttpStatus(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status, const void *body, uint32_t bodySize)
Send a HTTP status, with a custom body.
Definition: OrthancCPlugin.h:4096
OrthancPluginErrorCode OrthancPluginStartMultipartAnswer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *subType, const char *contentType)
Start an HTTP multipart answer.
Definition: OrthancCPlugin.h:3873
An entry in the dictionary of DICOM tags.
Definition: OrthancCPlugin.h:1936
uint32_t minMultiplicity
Definition: OrthancCPlugin.h:1940
uint32_t maxMultiplicity
Definition: OrthancCPlugin.h:1941
OrthancPluginValueRepresentation vr
Definition: OrthancCPlugin.h:1939
uint16_t element
Definition: OrthancCPlugin.h:1938
uint16_t group
Definition: OrthancCPlugin.h:1937
The parameters of a REST request.
Definition: OrthancCPlugin.h:359
const char *const * getValues
For a GET request, the values of the GET parameters.
Definition: OrthancCPlugin.h:388
const char *const * groups
The matched values for the groups of the regular expression.
Definition: OrthancCPlugin.h:373
uint32_t bodySize
For a PUT or POST request, the number of bytes of the body.
Definition: OrthancCPlugin.h:398
uint32_t groupsCount
The number of groups of the regular expression.
Definition: OrthancCPlugin.h:368
const char *const * headersKeys
The keys of the HTTP headers (always converted to low-case).
Definition: OrthancCPlugin.h:413
const void * body
For a PUT or POST request, the content of the body.
Definition: OrthancCPlugin.h:393
const char *const * getKeys
For a GET request, the keys of the GET parameters.
Definition: OrthancCPlugin.h:383
uint32_t headersCount
The number of HTTP headers.
Definition: OrthancCPlugin.h:408
OrthancPluginHttpMethod method
The HTTP method.
Definition: OrthancCPlugin.h:363
uint32_t getCount
For a GET request, the number of GET parameters.
Definition: OrthancCPlugin.h:378
const char *const * headersValues
The values of the HTTP headers.
Definition: OrthancCPlugin.h:418
A 64-bit memory buffer allocated by the core system of Orthanc.
Definition: OrthancCPlugin.h:1159
uint64_t size
The number of bytes in the buffer.
Definition: OrthancCPlugin.h:1168
void * data
The content of the buffer.
Definition: OrthancCPlugin.h:1163
A 32-bit memory buffer allocated by the core system of Orthanc.
Definition: OrthancCPlugin.h:1137
uint32_t size
The number of bytes in the buffer.
Definition: OrthancCPlugin.h:1146
void * data
The content of the buffer.
Definition: OrthancCPlugin.h:1141