OrthancCPlugin.h
#pragma once
#include <stdio.h>
#include <string.h>
#ifdef WIN32
# define ORTHANC_PLUGINS_API __declspec(dllexport)
#elif __GNUC__ >= 4
# define ORTHANC_PLUGINS_API __attribute__ ((visibility ("default")))
#else
# define ORTHANC_PLUGINS_API
#endif
#define ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER 1
#define ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER 11
#define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 1
#if !defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)
#define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \
(ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major || \
(ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major && \
(ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor || \
(ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor && \
ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision))))
#endif
/********************************************************************
** Check that function inlining is properly supported. The use of
** inlining is required, to avoid the duplication of object code
** between two compilation modules that would use the Orthanc Plugin
** API.
********************************************************************/
/* If the auto-detection of the "inline" keyword below does not work
automatically and that your compiler is known to properly support
inlining, uncomment the following #define and adapt the definition
of "static inline". */
/* #define ORTHANC_PLUGIN_INLINE static inline */
#ifndef ORTHANC_PLUGIN_INLINE
# if __STDC_VERSION__ >= 199901L
/* This is C99 or above: http://predef.sourceforge.net/prestd.html */
# define ORTHANC_PLUGIN_INLINE static inline
# elif defined(__cplusplus)
/* This is C++ */
# define ORTHANC_PLUGIN_INLINE static inline
# elif defined(__GNUC__)
/* This is GCC running in C89 mode */
# define ORTHANC_PLUGIN_INLINE static __inline
# elif defined(_MSC_VER)
/* This is Visual Studio running in C89 mode */
# define ORTHANC_PLUGIN_INLINE static __inline
# else
# error Your compiler is not known to support the "inline" keyword
# endif
#endif
/********************************************************************
** Inclusion of standard libraries.
********************************************************************/
#include <stdint.h>
#include <stdlib.h>
/********************************************************************
** Definition of the Orthanc Plugin API.
********************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
typedef enum
{
OrthancPluginErrorCode_InternalError = -1 ,
OrthancPluginErrorCode_Success = 0 ,
OrthancPluginErrorCode_Plugin = 1 ,
OrthancPluginErrorCode_NotImplemented = 2 ,
OrthancPluginErrorCode_ParameterOutOfRange = 3 ,
OrthancPluginErrorCode_NotEnoughMemory = 4 ,
OrthancPluginErrorCode_BadParameterType = 5 ,
OrthancPluginErrorCode_BadSequenceOfCalls = 6 ,
OrthancPluginErrorCode_InexistentItem = 7 ,
OrthancPluginErrorCode_BadRequest = 8 ,
OrthancPluginErrorCode_NetworkProtocol = 9 ,
OrthancPluginErrorCode_SystemCommand = 10 ,
OrthancPluginErrorCode_Database = 11 ,
OrthancPluginErrorCode_UriSyntax = 12 ,
OrthancPluginErrorCode_InexistentFile = 13 ,
OrthancPluginErrorCode_CannotWriteFile = 14 ,
OrthancPluginErrorCode_BadFileFormat = 15 ,
OrthancPluginErrorCode_Timeout = 16 ,
OrthancPluginErrorCode_UnknownResource = 17 ,
OrthancPluginErrorCode_IncompatibleDatabaseVersion = 18 ,
OrthancPluginErrorCode_FullStorage = 19 ,
OrthancPluginErrorCode_CorruptedFile = 20 ,
OrthancPluginErrorCode_InexistentTag = 21 ,
OrthancPluginErrorCode_ReadOnly = 22 ,
OrthancPluginErrorCode_IncompatibleImageFormat = 23 ,
OrthancPluginErrorCode_IncompatibleImageSize = 24 ,
OrthancPluginErrorCode_SharedLibrary = 25 ,
OrthancPluginErrorCode_UnknownPluginService = 26 ,
OrthancPluginErrorCode_UnknownDicomTag = 27 ,
OrthancPluginErrorCode_BadJson = 28 ,
OrthancPluginErrorCode_Unauthorized = 29 ,
OrthancPluginErrorCode_BadFont = 30 ,
OrthancPluginErrorCode_DatabasePlugin = 31 ,
OrthancPluginErrorCode_StorageAreaPlugin = 32 ,
OrthancPluginErrorCode_EmptyRequest = 33 ,
OrthancPluginErrorCode_NotAcceptable = 34 ,
OrthancPluginErrorCode_NullPointer = 35 ,
OrthancPluginErrorCode_DatabaseUnavailable = 36 ,
OrthancPluginErrorCode_CanceledJob = 37 ,
OrthancPluginErrorCode_BadGeometry = 38 ,
OrthancPluginErrorCode_SslInitialization = 39 ,
OrthancPluginErrorCode_DiscontinuedAbi = 40 ,
OrthancPluginErrorCode_BadRange = 41 ,
OrthancPluginErrorCode_DatabaseCannotSerialize = 42 ,
OrthancPluginErrorCode_Revision = 43 ,
OrthancPluginErrorCode_MainDicomTagsMultiplyDefined = 44 ,
OrthancPluginErrorCode_SQLiteNotOpened = 1000 ,
OrthancPluginErrorCode_SQLiteAlreadyOpened = 1001 ,
OrthancPluginErrorCode_SQLiteCannotOpen = 1002 ,
OrthancPluginErrorCode_SQLiteStatementAlreadyUsed = 1003 ,
OrthancPluginErrorCode_SQLiteExecute = 1004 ,
OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction = 1005 ,
OrthancPluginErrorCode_SQLiteCommitWithoutTransaction = 1006 ,
OrthancPluginErrorCode_SQLiteRegisterFunction = 1007 ,
OrthancPluginErrorCode_SQLiteFlush = 1008 ,
OrthancPluginErrorCode_SQLiteCannotRun = 1009 ,
OrthancPluginErrorCode_SQLiteCannotStep = 1010 ,
OrthancPluginErrorCode_SQLiteBindOutOfRange = 1011 ,
OrthancPluginErrorCode_SQLitePrepareStatement = 1012 ,
OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted = 1013 ,
OrthancPluginErrorCode_SQLiteTransactionCommit = 1014 ,
OrthancPluginErrorCode_SQLiteTransactionBegin = 1015 ,
OrthancPluginErrorCode_DirectoryOverFile = 2000 ,
OrthancPluginErrorCode_FileStorageCannotWrite = 2001 ,
OrthancPluginErrorCode_DirectoryExpected = 2002 ,
OrthancPluginErrorCode_HttpPortInUse = 2003 ,
OrthancPluginErrorCode_DicomPortInUse = 2004 ,
OrthancPluginErrorCode_BadHttpStatusInRest = 2005 ,
OrthancPluginErrorCode_RegularFileExpected = 2006 ,
OrthancPluginErrorCode_PathToExecutable = 2007 ,
OrthancPluginErrorCode_MakeDirectory = 2008 ,
OrthancPluginErrorCode_BadApplicationEntityTitle = 2009 ,
OrthancPluginErrorCode_NoCFindHandler = 2010 ,
OrthancPluginErrorCode_NoCMoveHandler = 2011 ,
OrthancPluginErrorCode_NoCStoreHandler = 2012 ,
OrthancPluginErrorCode_NoApplicationEntityFilter = 2013 ,
OrthancPluginErrorCode_NoSopClassOrInstance = 2014 ,
OrthancPluginErrorCode_NoPresentationContext = 2015 ,
OrthancPluginErrorCode_DicomFindUnavailable = 2016 ,
OrthancPluginErrorCode_DicomMoveUnavailable = 2017 ,
OrthancPluginErrorCode_CannotStoreInstance = 2018 ,
OrthancPluginErrorCode_CreateDicomNotString = 2019 ,
OrthancPluginErrorCode_CreateDicomOverrideTag = 2020 ,
OrthancPluginErrorCode_CreateDicomUseContent = 2021 ,
OrthancPluginErrorCode_CreateDicomNoPayload = 2022 ,
OrthancPluginErrorCode_CreateDicomUseDataUriScheme = 2023 ,
OrthancPluginErrorCode_CreateDicomBadParent = 2024 ,
OrthancPluginErrorCode_CreateDicomParentIsInstance = 2025 ,
OrthancPluginErrorCode_CreateDicomParentEncoding = 2026 ,
OrthancPluginErrorCode_UnknownModality = 2027 ,
OrthancPluginErrorCode_BadJobOrdering = 2028 ,
OrthancPluginErrorCode_JsonToLuaTable = 2029 ,
OrthancPluginErrorCode_CannotCreateLua = 2030 ,
OrthancPluginErrorCode_CannotExecuteLua = 2031 ,
OrthancPluginErrorCode_LuaAlreadyExecuted = 2032 ,
OrthancPluginErrorCode_LuaBadOutput = 2033 ,
OrthancPluginErrorCode_NotLuaPredicate = 2034 ,
OrthancPluginErrorCode_LuaReturnsNoString = 2035 ,
OrthancPluginErrorCode_StorageAreaAlreadyRegistered = 2036 ,
OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered = 2037 ,
OrthancPluginErrorCode_DatabaseNotInitialized = 2038 ,
OrthancPluginErrorCode_SslDisabled = 2039 ,
OrthancPluginErrorCode_CannotOrderSlices = 2040 ,
OrthancPluginErrorCode_NoWorklistHandler = 2041 ,
OrthancPluginErrorCode_AlreadyExistingTag = 2042 ,
OrthancPluginErrorCode_NoStorageCommitmentHandler = 2043 ,
OrthancPluginErrorCode_NoCGetHandler = 2044 ,
OrthancPluginErrorCode_UnsupportedMediaType = 3000 ,
_OrthancPluginErrorCode_INTERNAL = 0x7fffffff
} OrthancPluginErrorCode;
ORTHANC_PLUGINS_API const char* OrthancPluginGetName();
typedef enum
{
OrthancPluginHttpMethod_Get = 1,
OrthancPluginHttpMethod_Post = 2,
OrthancPluginHttpMethod_Put = 3,
OrthancPluginHttpMethod_Delete = 4,
_OrthancPluginHttpMethod_INTERNAL = 0x7fffffff
} OrthancPluginHttpMethod;
typedef struct
{
OrthancPluginHttpMethod method;
uint32_t groupsCount;
const char* const* groups;
uint32_t getCount;
const char* const* getKeys;
const char* const* getValues;
const void* body;
uint32_t bodySize;
/* --------------------------------------------------
New in version 0.8.1
-------------------------------------------------- */
uint32_t headersCount;
const char* const* headersKeys;
const char* const* headersValues;
} OrthancPluginHttpRequest;
typedef enum
{
/* Generic services */
_OrthancPluginService_LogInfo = 1,
_OrthancPluginService_LogWarning = 2,
_OrthancPluginService_LogError = 3,
_OrthancPluginService_GetOrthancPath = 4,
_OrthancPluginService_GetOrthancDirectory = 5,
_OrthancPluginService_GetConfigurationPath = 6,
_OrthancPluginService_SetPluginProperty = 7,
_OrthancPluginService_GetGlobalProperty = 8,
_OrthancPluginService_SetGlobalProperty = 9,
_OrthancPluginService_GetCommandLineArgumentsCount = 10,
_OrthancPluginService_GetCommandLineArgument = 11,
_OrthancPluginService_GetExpectedDatabaseVersion = 12,
_OrthancPluginService_GetConfiguration = 13,
_OrthancPluginService_BufferCompression = 14,
_OrthancPluginService_ReadFile = 15,
_OrthancPluginService_WriteFile = 16,
_OrthancPluginService_GetErrorDescription = 17,
_OrthancPluginService_CallHttpClient = 18,
_OrthancPluginService_RegisterErrorCode = 19,
_OrthancPluginService_RegisterDictionaryTag = 20,
_OrthancPluginService_DicomBufferToJson = 21,
_OrthancPluginService_DicomInstanceToJson = 22,
_OrthancPluginService_CreateDicom = 23,
_OrthancPluginService_ComputeMd5 = 24,
_OrthancPluginService_ComputeSha1 = 25,
_OrthancPluginService_LookupDictionary = 26,
_OrthancPluginService_CallHttpClient2 = 27,
_OrthancPluginService_GenerateUuid = 28,
_OrthancPluginService_RegisterPrivateDictionaryTag = 29,
_OrthancPluginService_AutodetectMimeType = 30,
_OrthancPluginService_SetMetricsValue = 31,
_OrthancPluginService_EncodeDicomWebJson = 32,
_OrthancPluginService_EncodeDicomWebXml = 33,
_OrthancPluginService_ChunkedHttpClient = 34, /* New in Orthanc 1.5.7 */
_OrthancPluginService_GetTagName = 35, /* New in Orthanc 1.5.7 */
_OrthancPluginService_EncodeDicomWebJson2 = 36, /* New in Orthanc 1.7.0 */
_OrthancPluginService_EncodeDicomWebXml2 = 37, /* New in Orthanc 1.7.0 */
_OrthancPluginService_CreateMemoryBuffer = 38, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GenerateRestApiAuthorizationToken = 39, /* New in Orthanc 1.8.1 */
_OrthancPluginService_CreateMemoryBuffer64 = 40, /* New in Orthanc 1.9.0 */
_OrthancPluginService_CreateDicom2 = 41, /* New in Orthanc 1.9.0 */
_OrthancPluginService_GetDatabaseServerIdentifier = 42, /* New in Orthanc 1.11.1 */
/* Registration of callbacks */
_OrthancPluginService_RegisterRestCallback = 1000,
_OrthancPluginService_RegisterOnStoredInstanceCallback = 1001,
_OrthancPluginService_RegisterStorageArea = 1002,
_OrthancPluginService_RegisterOnChangeCallback = 1003,
_OrthancPluginService_RegisterRestCallbackNoLock = 1004,
_OrthancPluginService_RegisterWorklistCallback = 1005,
_OrthancPluginService_RegisterDecodeImageCallback = 1006,
_OrthancPluginService_RegisterIncomingHttpRequestFilter = 1007,
_OrthancPluginService_RegisterFindCallback = 1008,
_OrthancPluginService_RegisterMoveCallback = 1009,
_OrthancPluginService_RegisterIncomingHttpRequestFilter2 = 1010,
_OrthancPluginService_RegisterRefreshMetricsCallback = 1011,
_OrthancPluginService_RegisterChunkedRestCallback = 1012, /* New in Orthanc 1.5.7 */
_OrthancPluginService_RegisterStorageCommitmentScpCallback = 1013,
_OrthancPluginService_RegisterIncomingDicomInstanceFilter = 1014,
_OrthancPluginService_RegisterTranscoderCallback = 1015, /* New in Orthanc 1.7.0 */
_OrthancPluginService_RegisterStorageArea2 = 1016, /* New in Orthanc 1.9.0 */
_OrthancPluginService_RegisterIncomingCStoreInstanceFilter = 1017, /* New in Orthanc 1.10.0 */
_OrthancPluginService_RegisterReceivedInstanceCallback = 1018, /* New in Orthanc 1.10.0 */
_OrthancPluginService_RegisterWebDavCollection = 1019, /* New in Orthanc 1.10.1 */
/* Sending answers to REST calls */
_OrthancPluginService_AnswerBuffer = 2000,
_OrthancPluginService_CompressAndAnswerPngImage = 2001, /* Unused as of Orthanc 0.9.4 */
_OrthancPluginService_Redirect = 2002,
_OrthancPluginService_SendHttpStatusCode = 2003,
_OrthancPluginService_SendUnauthorized = 2004,
_OrthancPluginService_SendMethodNotAllowed = 2005,
_OrthancPluginService_SetCookie = 2006,
_OrthancPluginService_SetHttpHeader = 2007,
_OrthancPluginService_StartMultipartAnswer = 2008,
_OrthancPluginService_SendMultipartItem = 2009,
_OrthancPluginService_SendHttpStatus = 2010,
_OrthancPluginService_CompressAndAnswerImage = 2011,
_OrthancPluginService_SendMultipartItem2 = 2012,
_OrthancPluginService_SetHttpErrorDetails = 2013,
/* Access to the Orthanc database and API */
_OrthancPluginService_GetDicomForInstance = 3000,
_OrthancPluginService_RestApiGet = 3001,
_OrthancPluginService_RestApiPost = 3002,
_OrthancPluginService_RestApiDelete = 3003,
_OrthancPluginService_RestApiPut = 3004,
_OrthancPluginService_LookupPatient = 3005,
_OrthancPluginService_LookupStudy = 3006,
_OrthancPluginService_LookupSeries = 3007,
_OrthancPluginService_LookupInstance = 3008,
_OrthancPluginService_LookupStudyWithAccessionNumber = 3009,
_OrthancPluginService_RestApiGetAfterPlugins = 3010,
_OrthancPluginService_RestApiPostAfterPlugins = 3011,
_OrthancPluginService_RestApiDeleteAfterPlugins = 3012,
_OrthancPluginService_RestApiPutAfterPlugins = 3013,
_OrthancPluginService_ReconstructMainDicomTags = 3014,
_OrthancPluginService_RestApiGet2 = 3015,
_OrthancPluginService_CallRestApi = 3016, /* New in Orthanc 1.9.2 */
/* Access to DICOM instances */
_OrthancPluginService_GetInstanceRemoteAet = 4000,
_OrthancPluginService_GetInstanceSize = 4001,
_OrthancPluginService_GetInstanceData = 4002,
_OrthancPluginService_GetInstanceJson = 4003,
_OrthancPluginService_GetInstanceSimplifiedJson = 4004,
_OrthancPluginService_HasInstanceMetadata = 4005,
_OrthancPluginService_GetInstanceMetadata = 4006,
_OrthancPluginService_GetInstanceOrigin = 4007,
_OrthancPluginService_GetInstanceTransferSyntaxUid = 4008,
_OrthancPluginService_HasInstancePixelData = 4009,
_OrthancPluginService_CreateDicomInstance = 4010, /* New in Orthanc 1.7.0 */
_OrthancPluginService_FreeDicomInstance = 4011, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceFramesCount = 4012, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceRawFrame = 4013, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceDecodedFrame = 4014, /* New in Orthanc 1.7.0 */
_OrthancPluginService_TranscodeDicomInstance = 4015, /* New in Orthanc 1.7.0 */
_OrthancPluginService_SerializeDicomInstance = 4016, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceAdvancedJson = 4017, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceDicomWebJson = 4018, /* New in Orthanc 1.7.0 */
_OrthancPluginService_GetInstanceDicomWebXml = 4019, /* New in Orthanc 1.7.0 */
/* Services for plugins implementing a database back-end */
_OrthancPluginService_RegisterDatabaseBackend = 5000, /* New in Orthanc 0.8.6 */
_OrthancPluginService_DatabaseAnswer = 5001,
_OrthancPluginService_RegisterDatabaseBackendV2 = 5002, /* New in Orthanc 0.9.4 */
_OrthancPluginService_StorageAreaCreate = 5003,
_OrthancPluginService_StorageAreaRead = 5004,
_OrthancPluginService_StorageAreaRemove = 5005,
_OrthancPluginService_RegisterDatabaseBackendV3 = 5006, /* New in Orthanc 1.9.2 */
/* Primitives for handling images */
_OrthancPluginService_GetImagePixelFormat = 6000,
_OrthancPluginService_GetImageWidth = 6001,
_OrthancPluginService_GetImageHeight = 6002,
_OrthancPluginService_GetImagePitch = 6003,
_OrthancPluginService_GetImageBuffer = 6004,
_OrthancPluginService_UncompressImage = 6005,
_OrthancPluginService_FreeImage = 6006,
_OrthancPluginService_CompressImage = 6007,
_OrthancPluginService_ConvertPixelFormat = 6008,
_OrthancPluginService_GetFontsCount = 6009,
_OrthancPluginService_GetFontInfo = 6010,
_OrthancPluginService_DrawText = 6011,
_OrthancPluginService_CreateImage = 6012,
_OrthancPluginService_CreateImageAccessor = 6013,
_OrthancPluginService_DecodeDicomImage = 6014,
/* Primitives for handling C-Find, C-Move and worklists */
_OrthancPluginService_WorklistAddAnswer = 7000,
_OrthancPluginService_WorklistMarkIncomplete = 7001,
_OrthancPluginService_WorklistIsMatch = 7002,
_OrthancPluginService_WorklistGetDicomQuery = 7003,
_OrthancPluginService_FindAddAnswer = 7004,
_OrthancPluginService_FindMarkIncomplete = 7005,
_OrthancPluginService_GetFindQuerySize = 7006,
_OrthancPluginService_GetFindQueryTag = 7007,
_OrthancPluginService_GetFindQueryTagName = 7008,
_OrthancPluginService_GetFindQueryValue = 7009,
_OrthancPluginService_CreateFindMatcher = 7010,
_OrthancPluginService_FreeFindMatcher = 7011,
_OrthancPluginService_FindMatcherIsMatch = 7012,
/* Primitives for accessing Orthanc Peers (new in 1.4.2) */
_OrthancPluginService_GetPeers = 8000,
_OrthancPluginService_FreePeers = 8001,
_OrthancPluginService_GetPeersCount = 8003,
_OrthancPluginService_GetPeerName = 8004,
_OrthancPluginService_GetPeerUrl = 8005,
_OrthancPluginService_CallPeerApi = 8006,
_OrthancPluginService_GetPeerUserProperty = 8007,
/* Primitives for handling jobs (new in 1.4.2) */
_OrthancPluginService_CreateJob = 9000,
_OrthancPluginService_FreeJob = 9001,
_OrthancPluginService_SubmitJob = 9002,
_OrthancPluginService_RegisterJobsUnserializer = 9003,
_OrthancPluginService_INTERNAL = 0x7fffffff
} _OrthancPluginService;
typedef enum
{
_OrthancPluginProperty_Description = 1,
_OrthancPluginProperty_RootUri = 2,
_OrthancPluginProperty_OrthancExplorer = 3,
_OrthancPluginProperty_INTERNAL = 0x7fffffff
} _OrthancPluginProperty;
typedef enum
{
OrthancPluginPixelFormat_Grayscale8 = 1,
OrthancPluginPixelFormat_Grayscale16 = 2,
OrthancPluginPixelFormat_SignedGrayscale16 = 3,
OrthancPluginPixelFormat_RGB24 = 4,
OrthancPluginPixelFormat_RGBA32 = 5,
OrthancPluginPixelFormat_Unknown = 6,
OrthancPluginPixelFormat_RGB48 = 7,
OrthancPluginPixelFormat_Grayscale32 = 8,
OrthancPluginPixelFormat_Float32 = 9,
OrthancPluginPixelFormat_BGRA32 = 10,
OrthancPluginPixelFormat_Grayscale64 = 11,
_OrthancPluginPixelFormat_INTERNAL = 0x7fffffff
} OrthancPluginPixelFormat;
typedef enum
{
OrthancPluginContentType_Unknown = 0,
OrthancPluginContentType_Dicom = 1,
OrthancPluginContentType_DicomAsJson = 2,
OrthancPluginContentType_DicomUntilPixelData = 3,
_OrthancPluginContentType_INTERNAL = 0x7fffffff
} OrthancPluginContentType;
typedef enum
{
OrthancPluginResourceType_Patient = 0,
OrthancPluginResourceType_Study = 1,
OrthancPluginResourceType_Series = 2,
OrthancPluginResourceType_Instance = 3,
OrthancPluginResourceType_None = 4,
_OrthancPluginResourceType_INTERNAL = 0x7fffffff
} OrthancPluginResourceType;
typedef enum
{
OrthancPluginChangeType_CompletedSeries = 0,
OrthancPluginChangeType_Deleted = 1,
OrthancPluginChangeType_NewChildInstance = 2,
OrthancPluginChangeType_NewInstance = 3,
OrthancPluginChangeType_NewPatient = 4,
OrthancPluginChangeType_NewSeries = 5,
OrthancPluginChangeType_NewStudy = 6,
OrthancPluginChangeType_StablePatient = 7,
OrthancPluginChangeType_StableSeries = 8,
OrthancPluginChangeType_StableStudy = 9,
OrthancPluginChangeType_OrthancStarted = 10,
OrthancPluginChangeType_OrthancStopped = 11,
OrthancPluginChangeType_UpdatedAttachment = 12,
OrthancPluginChangeType_UpdatedMetadata = 13,
OrthancPluginChangeType_UpdatedPeers = 14,
OrthancPluginChangeType_UpdatedModalities = 15,
OrthancPluginChangeType_JobSubmitted = 16,
OrthancPluginChangeType_JobSuccess = 17,
OrthancPluginChangeType_JobFailure = 18,
_OrthancPluginChangeType_INTERNAL = 0x7fffffff
} OrthancPluginChangeType;
typedef enum
{
OrthancPluginCompressionType_Zlib = 0,
OrthancPluginCompressionType_ZlibWithSize = 1,
OrthancPluginCompressionType_Gzip = 2,
OrthancPluginCompressionType_GzipWithSize = 3,
_OrthancPluginCompressionType_INTERNAL = 0x7fffffff
} OrthancPluginCompressionType;
typedef enum
{
OrthancPluginImageFormat_Png = 0,
OrthancPluginImageFormat_Jpeg = 1,
OrthancPluginImageFormat_Dicom = 2,
_OrthancPluginImageFormat_INTERNAL = 0x7fffffff
} OrthancPluginImageFormat;
typedef enum
{
OrthancPluginValueRepresentation_AE = 1,
OrthancPluginValueRepresentation_AS = 2,
OrthancPluginValueRepresentation_AT = 3,
OrthancPluginValueRepresentation_CS = 4,
OrthancPluginValueRepresentation_DA = 5,
OrthancPluginValueRepresentation_DS = 6,
OrthancPluginValueRepresentation_DT = 7,
OrthancPluginValueRepresentation_FD = 8,
OrthancPluginValueRepresentation_FL = 9,
OrthancPluginValueRepresentation_IS = 10,
OrthancPluginValueRepresentation_LO = 11,
OrthancPluginValueRepresentation_LT = 12,
OrthancPluginValueRepresentation_OB = 13,
OrthancPluginValueRepresentation_OF = 14,
OrthancPluginValueRepresentation_OW = 15,
OrthancPluginValueRepresentation_PN = 16,
OrthancPluginValueRepresentation_SH = 17,
OrthancPluginValueRepresentation_SL = 18,
OrthancPluginValueRepresentation_SQ = 19,
OrthancPluginValueRepresentation_SS = 20,
OrthancPluginValueRepresentation_ST = 21,
OrthancPluginValueRepresentation_TM = 22,
OrthancPluginValueRepresentation_UI = 23,
OrthancPluginValueRepresentation_UL = 24,
OrthancPluginValueRepresentation_UN = 25,
OrthancPluginValueRepresentation_US = 26,
OrthancPluginValueRepresentation_UT = 27,
_OrthancPluginValueRepresentation_INTERNAL = 0x7fffffff
} OrthancPluginValueRepresentation;
typedef enum
{
OrthancPluginDicomToJsonFormat_Full = 1,
OrthancPluginDicomToJsonFormat_Short = 2,
OrthancPluginDicomToJsonFormat_Human = 3,
_OrthancPluginDicomToJsonFormat_INTERNAL = 0x7fffffff
} OrthancPluginDicomToJsonFormat;
typedef enum
{
OrthancPluginDicomToJsonFlags_None = 0,
OrthancPluginDicomToJsonFlags_IncludeBinary = (1 << 0),
OrthancPluginDicomToJsonFlags_IncludePrivateTags = (1 << 1),
OrthancPluginDicomToJsonFlags_IncludeUnknownTags = (1 << 2),
OrthancPluginDicomToJsonFlags_IncludePixelData = (1 << 3),
OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii = (1 << 4),
OrthancPluginDicomToJsonFlags_ConvertBinaryToNull = (1 << 5),
OrthancPluginDicomToJsonFlags_StopAfterPixelData = (1 << 6),
OrthancPluginDicomToJsonFlags_SkipGroupLengths = (1 << 7),
_OrthancPluginDicomToJsonFlags_INTERNAL = 0x7fffffff
} OrthancPluginDicomToJsonFlags;
typedef enum
{
OrthancPluginCreateDicomFlags_None = 0,
OrthancPluginCreateDicomFlags_DecodeDataUriScheme = (1 << 0),
OrthancPluginCreateDicomFlags_GenerateIdentifiers = (1 << 1),
_OrthancPluginCreateDicomFlags_INTERNAL = 0x7fffffff
} OrthancPluginCreateDicomFlags;
typedef enum
{
OrthancPluginIdentifierConstraint_Equal = 1,
OrthancPluginIdentifierConstraint_SmallerOrEqual = 2,
OrthancPluginIdentifierConstraint_GreaterOrEqual = 3,
OrthancPluginIdentifierConstraint_Wildcard = 4,
_OrthancPluginIdentifierConstraint_INTERNAL = 0x7fffffff
} OrthancPluginIdentifierConstraint;
typedef enum
{
OrthancPluginConstraintType_Equal = 1,
OrthancPluginConstraintType_SmallerOrEqual = 2,
OrthancPluginConstraintType_GreaterOrEqual = 3,
OrthancPluginConstraintType_Wildcard = 4,
OrthancPluginConstraintType_List = 5,
_OrthancPluginConstraintType_INTERNAL = 0x7fffffff
} OrthancPluginConstraintType;
typedef enum
{
OrthancPluginInstanceOrigin_Unknown = 1,
OrthancPluginInstanceOrigin_DicomProtocol = 2,
OrthancPluginInstanceOrigin_RestApi = 3,
OrthancPluginInstanceOrigin_Plugin = 4,
OrthancPluginInstanceOrigin_Lua = 5,
OrthancPluginInstanceOrigin_WebDav = 6,
_OrthancPluginInstanceOrigin_INTERNAL = 0x7fffffff
} OrthancPluginInstanceOrigin;
typedef enum
{
OrthancPluginJobStepStatus_Success = 1,
OrthancPluginJobStepStatus_Failure = 2,
OrthancPluginJobStepStatus_Continue = 3
} OrthancPluginJobStepStatus;
typedef enum
{
OrthancPluginJobStopReason_Success = 1,
OrthancPluginJobStopReason_Paused = 2,
OrthancPluginJobStopReason_Failure = 3,
OrthancPluginJobStopReason_Canceled = 4
} OrthancPluginJobStopReason;
typedef enum
{
OrthancPluginMetricsType_Default = 0,
OrthancPluginMetricsType_Timer = 1
} OrthancPluginMetricsType;
typedef enum
{
OrthancPluginDicomWebBinaryMode_Ignore = 0,
OrthancPluginDicomWebBinaryMode_InlineBinary = 1,
OrthancPluginDicomWebBinaryMode_BulkDataUri = 2
} OrthancPluginDicomWebBinaryMode;
typedef enum
{
OrthancPluginStorageCommitmentFailureReason_Success = 0,
OrthancPluginStorageCommitmentFailureReason_ProcessingFailure = 1,
OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance = 2,
OrthancPluginStorageCommitmentFailureReason_ResourceLimitation = 3,
OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported = 4,
OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict = 5,
OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID = 6
} OrthancPluginStorageCommitmentFailureReason;
typedef enum
{
OrthancPluginReceivedInstanceAction_KeepAsIs = 1,
OrthancPluginReceivedInstanceAction_Modify = 2,
OrthancPluginReceivedInstanceAction_Discard = 3,
_OrthancPluginReceivedInstanceAction_INTERNAL = 0x7fffffff
} OrthancPluginReceivedInstanceAction;
typedef struct
{
void* data;
uint32_t size;
} OrthancPluginMemoryBuffer;
typedef struct
{
void* data;
uint64_t size;
} OrthancPluginMemoryBuffer64;
typedef struct _OrthancPluginRestOutput_t OrthancPluginRestOutput;
typedef struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance;
typedef struct _OrthancPluginImage_t OrthancPluginImage;
typedef struct _OrthancPluginStorageArea_t OrthancPluginStorageArea;
typedef struct _OrthancPluginWorklistQuery_t OrthancPluginWorklistQuery;
typedef struct _OrthancPluginWorklistAnswers_t OrthancPluginWorklistAnswers;
typedef struct _OrthancPluginFindQuery_t OrthancPluginFindQuery;
typedef struct _OrthancPluginFindAnswers_t OrthancPluginFindAnswers;
typedef struct _OrthancPluginFindMatcher_t OrthancPluginFindMatcher;
typedef struct _OrthancPluginPeers_t OrthancPluginPeers;
typedef struct _OrthancPluginJob_t OrthancPluginJob;
typedef struct _OrthancPluginDicomWebNode_t OrthancPluginDicomWebNode;
typedef OrthancPluginErrorCode (*OrthancPluginRestCallback) (
OrthancPluginRestOutput* output,
const char* url,
const OrthancPluginHttpRequest* request);
typedef OrthancPluginErrorCode (*OrthancPluginOnStoredInstanceCallback) (
const OrthancPluginDicomInstance* instance,
const char* instanceId);
typedef OrthancPluginErrorCode (*OrthancPluginOnChangeCallback) (
OrthancPluginChangeType changeType,
OrthancPluginResourceType resourceType,
const char* resourceId);
typedef OrthancPluginErrorCode (*OrthancPluginDecodeImageCallback) (
OrthancPluginImage** target,
const void* dicom,
const uint32_t size,
uint32_t frameIndex);
typedef void (*OrthancPluginFree) (void* buffer);
typedef void (*OrthancPluginDicomWebSetBinaryNode) (
OrthancPluginDicomWebNode* node,
OrthancPluginDicomWebBinaryMode mode,
const char* bulkDataUri);
typedef OrthancPluginErrorCode (*OrthancPluginStorageCreate) (
const char* uuid,
const void* content,
int64_t size,
OrthancPluginContentType type);
typedef OrthancPluginErrorCode (*OrthancPluginStorageRead) (
void** content,
int64_t* size,
const char* uuid,
OrthancPluginContentType type);
typedef OrthancPluginErrorCode (*OrthancPluginStorageReadWhole) (
OrthancPluginMemoryBuffer64* target,
const char* uuid,
OrthancPluginContentType type);
typedef OrthancPluginErrorCode (*OrthancPluginStorageReadRange) (
OrthancPluginMemoryBuffer64* target,
const char* uuid,
OrthancPluginContentType type,
uint64_t rangeStart);
typedef OrthancPluginErrorCode (*OrthancPluginStorageRemove) (
const char* uuid,
OrthancPluginContentType type);
typedef OrthancPluginErrorCode (*OrthancPluginWorklistCallback) (
OrthancPluginWorklistAnswers* answers,
const OrthancPluginWorklistQuery* query,
const char* issuerAet,
const char* calledAet);
typedef int32_t (*OrthancPluginIncomingHttpRequestFilter) (
OrthancPluginHttpMethod method,
const char* uri,
const char* ip,
uint32_t headersCount,
const char* const* headersKeys,
const char* const* headersValues);
typedef 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);
typedef OrthancPluginErrorCode (*OrthancPluginFindCallback) (
OrthancPluginFindAnswers* answers,
const OrthancPluginFindQuery* query,
const char* issuerAet,
const char* calledAet);
typedef 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);
typedef uint32_t (*OrthancPluginGetMoveSize) (void* moveDriver);
typedef OrthancPluginErrorCode (*OrthancPluginApplyMove) (void* moveDriver);
typedef void (*OrthancPluginFreeMove) (void* moveDriver);
typedef void (*OrthancPluginJobFinalize) (void* job);
typedef float (*OrthancPluginJobGetProgress) (void* job);
typedef const char* (*OrthancPluginJobGetContent) (void* job);
typedef const char* (*OrthancPluginJobGetSerialized) (void* job);
typedef OrthancPluginJobStepStatus (*OrthancPluginJobStep) (void* job);
typedef OrthancPluginErrorCode (*OrthancPluginJobStop) (void* job,
OrthancPluginJobStopReason reason);
typedef OrthancPluginErrorCode (*OrthancPluginJobReset) (void* job);
typedef OrthancPluginJob* (*OrthancPluginJobsUnserializer) (const char* jobType,
const char* serialized);
typedef void (*OrthancPluginRefreshMetricsCallback) ();
typedef 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);
typedef 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);
typedef struct _OrthancPluginContext_t
{
void* pluginsManager;
const char* orthancVersion;
OrthancPluginFree Free;
OrthancPluginErrorCode (*InvokeService) (struct _OrthancPluginContext_t* context,
_OrthancPluginService service,
const void* params);
} OrthancPluginContext;
typedef struct
{
uint16_t group;
uint16_t element;
OrthancPluginValueRepresentation vr;
uint32_t minMultiplicity;
uint32_t maxMultiplicity;
} OrthancPluginDictionaryEntry;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeString(
OrthancPluginContext* context,
char* str)
{
if (str != NULL)
{
context->Free(str);
}
}
ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersionAdvanced(
OrthancPluginContext* context,
int expectedMajor,
int expectedMinor,
int expectedRevision)
{
int major, minor, revision;
if (sizeof(int32_t) != sizeof(OrthancPluginErrorCode) ||
sizeof(int32_t) != sizeof(OrthancPluginHttpMethod) ||
sizeof(int32_t) != sizeof(_OrthancPluginService) ||
sizeof(int32_t) != sizeof(_OrthancPluginProperty) ||
sizeof(int32_t) != sizeof(OrthancPluginPixelFormat) ||
sizeof(int32_t) != sizeof(OrthancPluginContentType) ||
sizeof(int32_t) != sizeof(OrthancPluginResourceType) ||
sizeof(int32_t) != sizeof(OrthancPluginChangeType) ||
sizeof(int32_t) != sizeof(OrthancPluginCompressionType) ||
sizeof(int32_t) != sizeof(OrthancPluginImageFormat) ||
sizeof(int32_t) != sizeof(OrthancPluginValueRepresentation) ||
sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFormat) ||
sizeof(int32_t) != sizeof(OrthancPluginDicomToJsonFlags) ||
sizeof(int32_t) != sizeof(OrthancPluginCreateDicomFlags) ||
sizeof(int32_t) != sizeof(OrthancPluginIdentifierConstraint) ||
sizeof(int32_t) != sizeof(OrthancPluginInstanceOrigin) ||
sizeof(int32_t) != sizeof(OrthancPluginJobStepStatus) ||
sizeof(int32_t) != sizeof(OrthancPluginConstraintType) ||
sizeof(int32_t) != sizeof(OrthancPluginMetricsType) ||
sizeof(int32_t) != sizeof(OrthancPluginDicomWebBinaryMode) ||
sizeof(int32_t) != sizeof(OrthancPluginStorageCommitmentFailureReason) ||
sizeof(int32_t) != sizeof(OrthancPluginReceivedInstanceAction))
{
/* Mismatch in the size of the enumerations */
return 0;
}
/* Assume compatibility with the mainline */
if (!strcmp(context->orthancVersion, "mainline"))
{
return 1;
}
/* Parse the version of the Orthanc core */
if (
#ifdef _MSC_VER
sscanf_s
#else
sscanf
#endif
(context->orthancVersion, "%4d.%4d.%4d", &major, &minor, &revision) != 3)
{
return 0;
}
/* Check the major number of the version */
if (major > expectedMajor)
{
return 1;
}
if (major < expectedMajor)
{
return 0;
}
/* Check the minor number of the version */
if (minor > expectedMinor)
{
return 1;
}
if (minor < expectedMinor)
{
return 0;
}
/* Check the revision number of the version */
if (revision >= expectedRevision)
{
return 1;
}
else
{
return 0;
}
}
ORTHANC_PLUGIN_INLINE int OrthancPluginCheckVersion(
OrthancPluginContext* context)
{
return OrthancPluginCheckVersionAdvanced(
context,
ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER,
ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER,
ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeMemoryBuffer(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* buffer)
{
context->Free(buffer->data);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeMemoryBuffer64(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer64* buffer)
{
context->Free(buffer->data);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginLogError(
OrthancPluginContext* context,
const char* message)
{
context->InvokeService(context, _OrthancPluginService_LogError, message);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginLogWarning(
OrthancPluginContext* context,
const char* message)
{
context->InvokeService(context, _OrthancPluginService_LogWarning, message);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginLogInfo(
OrthancPluginContext* context,
const char* message)
{
context->InvokeService(context, _OrthancPluginService_LogInfo, message);
}
typedef struct
{
const char* pathRegularExpression;
OrthancPluginRestCallback callback;
} _OrthancPluginRestCallback;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallback(
OrthancPluginContext* context,
const char* pathRegularExpression,
OrthancPluginRestCallback callback)
{
_OrthancPluginRestCallback params;
params.pathRegularExpression = pathRegularExpression;
params.callback = callback;
context->InvokeService(context, _OrthancPluginService_RegisterRestCallback, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRestCallbackNoLock(
OrthancPluginContext* context,
const char* pathRegularExpression,
OrthancPluginRestCallback callback)
{
_OrthancPluginRestCallback params;
params.pathRegularExpression = pathRegularExpression;
params.callback = callback;
context->InvokeService(context, _OrthancPluginService_RegisterRestCallbackNoLock, &params);
}
typedef struct
{
OrthancPluginOnStoredInstanceCallback callback;
} _OrthancPluginOnStoredInstanceCallback;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnStoredInstanceCallback(
OrthancPluginContext* context,
OrthancPluginOnStoredInstanceCallback callback)
{
_OrthancPluginOnStoredInstanceCallback params;
params.callback = callback;
context->InvokeService(context, _OrthancPluginService_RegisterOnStoredInstanceCallback, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
const void* answer;
uint32_t answerSize;
const char* mimeType;
} _OrthancPluginAnswerBuffer;
ORTHANC_PLUGIN_INLINE void OrthancPluginAnswerBuffer(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const void* answer,
uint32_t answerSize,
const char* mimeType)
{
_OrthancPluginAnswerBuffer params;
params.output = output;
params.answer = answer;
params.answerSize = answerSize;
params.mimeType = mimeType;
context->InvokeService(context, _OrthancPluginService_AnswerBuffer, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
OrthancPluginPixelFormat format;
uint32_t width;
uint32_t height;
uint32_t pitch;
const void* buffer;
} _OrthancPluginCompressAndAnswerPngImage;
typedef struct
{
OrthancPluginRestOutput* output;
OrthancPluginImageFormat imageFormat;
OrthancPluginPixelFormat pixelFormat;
uint32_t width;
uint32_t height;
uint32_t pitch;
const void* buffer;
uint8_t quality;
} _OrthancPluginCompressAndAnswerImage;
ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerPngImage(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height,
uint32_t pitch,
const void* buffer)
{
_OrthancPluginCompressAndAnswerImage params;
params.output = output;
params.imageFormat = OrthancPluginImageFormat_Png;
params.pixelFormat = format;
params.width = width;
params.height = height;
params.pitch = pitch;
params.buffer = buffer;
params.quality = 0; /* No quality for PNG */
context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* instanceId;
} _OrthancPluginGetDicomForInstance;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetDicomForInstance(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* instanceId)
{
_OrthancPluginGetDicomForInstance params;
params.target = target;
params.instanceId = instanceId;
return context->InvokeService(context, _OrthancPluginService_GetDicomForInstance, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* uri;
} _OrthancPluginRestApiGet;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGet(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri)
{
_OrthancPluginRestApiGet params;
params.target = target;
params.uri = uri;
return context->InvokeService(context, _OrthancPluginService_RestApiGet, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGetAfterPlugins(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri)
{
_OrthancPluginRestApiGet params;
params.target = target;
params.uri = uri;
return context->InvokeService(context, _OrthancPluginService_RestApiGetAfterPlugins, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* uri;
const void* body;
uint32_t bodySize;
} _OrthancPluginRestApiPostPut;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPost(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri,
const void* body,
uint32_t bodySize)
{
_OrthancPluginRestApiPostPut params;
params.target = target;
params.uri = uri;
params.body = body;
params.bodySize = bodySize;
return context->InvokeService(context, _OrthancPluginService_RestApiPost, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPostAfterPlugins(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri,
const void* body,
uint32_t bodySize)
{
_OrthancPluginRestApiPostPut params;
params.target = target;
params.uri = uri;
params.body = body;
params.bodySize = bodySize;
return context->InvokeService(context, _OrthancPluginService_RestApiPostAfterPlugins, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDelete(
OrthancPluginContext* context,
const char* uri)
{
return context->InvokeService(context, _OrthancPluginService_RestApiDelete, uri);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins(
OrthancPluginContext* context,
const char* uri)
{
return context->InvokeService(context, _OrthancPluginService_RestApiDeleteAfterPlugins, uri);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPut(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri,
const void* body,
uint32_t bodySize)
{
_OrthancPluginRestApiPostPut params;
params.target = target;
params.uri = uri;
params.body = body;
params.bodySize = bodySize;
return context->InvokeService(context, _OrthancPluginService_RestApiPut, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiPutAfterPlugins(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri,
const void* body,
uint32_t bodySize)
{
_OrthancPluginRestApiPostPut params;
params.target = target;
params.uri = uri;
params.body = body;
params.bodySize = bodySize;
return context->InvokeService(context, _OrthancPluginService_RestApiPutAfterPlugins, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
const char* argument;
} _OrthancPluginOutputPlusArgument;
ORTHANC_PLUGIN_INLINE void OrthancPluginRedirect(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* redirection)
{
_OrthancPluginOutputPlusArgument params;
params.output = output;
params.argument = redirection;
context->InvokeService(context, _OrthancPluginService_Redirect, &params);
}
typedef struct
{
char** result;
const char* argument;
} _OrthancPluginRetrieveDynamicString;
ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupPatient(
OrthancPluginContext* context,
const char* patientID)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = patientID;
if (context->InvokeService(context, _OrthancPluginService_LookupPatient, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudy(
OrthancPluginContext* context,
const char* studyUID)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = studyUID;
if (context->InvokeService(context, _OrthancPluginService_LookupStudy, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudyWithAccessionNumber(
OrthancPluginContext* context,
const char* accessionNumber)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = accessionNumber;
if (context->InvokeService(context, _OrthancPluginService_LookupStudyWithAccessionNumber, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupSeries(
OrthancPluginContext* context,
const char* seriesUID)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = seriesUID;
if (context->InvokeService(context, _OrthancPluginService_LookupSeries, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupInstance(
OrthancPluginContext* context,
const char* sopInstanceUID)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = sopInstanceUID;
if (context->InvokeService(context, _OrthancPluginService_LookupInstance, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginRestOutput* output;
uint16_t status;
} _OrthancPluginSendHttpStatusCode;
ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatusCode(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
uint16_t status)
{
_OrthancPluginSendHttpStatusCode params;
params.output = output;
params.status = status;
context->InvokeService(context, _OrthancPluginService_SendHttpStatusCode, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginSendUnauthorized(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* realm)
{
_OrthancPluginOutputPlusArgument params;
params.output = output;
params.argument = realm;
context->InvokeService(context, _OrthancPluginService_SendUnauthorized, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginSendMethodNotAllowed(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* allowedMethods)
{
_OrthancPluginOutputPlusArgument params;
params.output = output;
params.argument = allowedMethods;
context->InvokeService(context, _OrthancPluginService_SendMethodNotAllowed, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
const char* key;
const char* value;
} _OrthancPluginSetHttpHeader;
ORTHANC_PLUGIN_INLINE void OrthancPluginSetCookie(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* cookie,
const char* value)
{
_OrthancPluginSetHttpHeader params;
params.output = output;
params.key = cookie;
params.value = value;
context->InvokeService(context, _OrthancPluginService_SetCookie, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginSetHttpHeader(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* key,
const char* value)
{
_OrthancPluginSetHttpHeader params;
params.output = output;
params.key = key;
params.value = value;
context->InvokeService(context, _OrthancPluginService_SetHttpHeader, &params);
}
typedef struct
{
char** resultStringToFree;
const char** resultString;
int64_t* resultInt64;
const char* key;
const OrthancPluginDicomInstance* instance;
OrthancPluginInstanceOrigin* resultOrigin; /* New in Orthanc 0.9.5 SDK */
} _OrthancPluginAccessDicomInstance;
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceRemoteAet(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
const char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultString = &result;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceRemoteAet, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE int64_t OrthancPluginGetInstanceSize(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
int64_t size;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultInt64 = &size;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceSize, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return -1;
}
else
{
return size;
}
}
ORTHANC_PLUGIN_INLINE const void* OrthancPluginGetInstanceData(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
const char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultString = &result;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceData, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceJson(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultStringToFree = &result;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceSimplifiedJson(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultStringToFree = &result;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceSimplifiedJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE int OrthancPluginHasInstanceMetadata(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
const char* metadata)
{
int64_t result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultInt64 = &result;
params.instance = instance;
params.key = metadata;
if (context->InvokeService(context, _OrthancPluginService_HasInstanceMetadata, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return -1;
}
else
{
return (result != 0);
}
}
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetInstanceMetadata(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
const char* metadata)
{
const char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultString = &result;
params.instance = instance;
params.key = metadata;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceMetadata, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginStorageCreate create;
OrthancPluginStorageRead read;
OrthancPluginStorageRemove remove;
OrthancPluginFree free;
} _OrthancPluginRegisterStorageArea;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterStorageArea(
OrthancPluginContext* context,
OrthancPluginStorageCreate create,
OrthancPluginStorageRead read,
OrthancPluginStorageRemove remove)
{
_OrthancPluginRegisterStorageArea params;
params.create = create;
params.read = read;
params.remove = remove;
#ifdef __cplusplus
params.free = ::free;
#else
params.free = free;
#endif
context->InvokeService(context, _OrthancPluginService_RegisterStorageArea, &params);
}
ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancPath(OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetOrthancPath, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char *OrthancPluginGetOrthancDirectory(OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetOrthancDirectory, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfigurationPath(OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetConfigurationPath, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginOnChangeCallback callback;
} _OrthancPluginOnChangeCallback;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterOnChangeCallback(
OrthancPluginContext* context,
OrthancPluginOnChangeCallback callback)
{
_OrthancPluginOnChangeCallback params;
params.callback = callback;
context->InvokeService(context, _OrthancPluginService_RegisterOnChangeCallback, &params);
}
typedef struct
{
const char* plugin;
_OrthancPluginProperty property;
const char* value;
} _OrthancPluginSetPluginProperty;
ORTHANC_PLUGIN_INLINE void OrthancPluginSetRootUri(
OrthancPluginContext* context,
const char* uri)
{
_OrthancPluginSetPluginProperty params;
params.plugin = OrthancPluginGetName();
params.property = _OrthancPluginProperty_RootUri;
params.value = uri;
context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginSetDescription(
OrthancPluginContext* context,
const char* description)
{
_OrthancPluginSetPluginProperty params;
params.plugin = OrthancPluginGetName();
params.property = _OrthancPluginProperty_Description;
params.value = description;
context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginExtendOrthancExplorer(
OrthancPluginContext* context,
const char* javascript)
{
_OrthancPluginSetPluginProperty params;
params.plugin = OrthancPluginGetName();
params.property = _OrthancPluginProperty_OrthancExplorer;
params.value = javascript;
context->InvokeService(context, _OrthancPluginService_SetPluginProperty, &params);
}
typedef struct
{
char** result;
int32_t property;
const char* value;
} _OrthancPluginGlobalProperty;
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetGlobalProperty(
OrthancPluginContext* context,
int32_t property,
const char* defaultValue)
{
char* result;
_OrthancPluginGlobalProperty params;
params.result = &result;
params.property = property;
params.value = defaultValue;
if (context->InvokeService(context, _OrthancPluginService_GetGlobalProperty, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSetGlobalProperty(
OrthancPluginContext* context,
int32_t property,
const char* value)
{
_OrthancPluginGlobalProperty params;
params.result = NULL;
params.property = property;
params.value = value;
return context->InvokeService(context, _OrthancPluginService_SetGlobalProperty, &params);
}
typedef struct
{
int32_t *resultInt32;
uint32_t *resultUint32;
int64_t *resultInt64;
uint64_t *resultUint64;
} _OrthancPluginReturnSingleValue;
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetCommandLineArgumentsCount(
OrthancPluginContext* context)
{
uint32_t count = 0;
_OrthancPluginReturnSingleValue params;
memset(&params, 0, sizeof(params));
params.resultUint32 = &count;
if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgumentsCount, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return count;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetCommandLineArgument(
OrthancPluginContext* context,
uint32_t argument)
{
char* result;
_OrthancPluginGlobalProperty params;
params.result = &result;
params.property = (int32_t) argument;
params.value = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetCommandLineArgument, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetExpectedDatabaseVersion(
OrthancPluginContext* context)
{
uint32_t count = 0;
_OrthancPluginReturnSingleValue params;
memset(&params, 0, sizeof(params));
params.resultUint32 = &count;
if (context->InvokeService(context, _OrthancPluginService_GetExpectedDatabaseVersion, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return count;
}
}
ORTHANC_PLUGIN_INLINE char *OrthancPluginGetConfiguration(OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetConfiguration, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginRestOutput* output;
const char* subType;
const char* contentType;
} _OrthancPluginStartMultipartAnswer;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStartMultipartAnswer(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* subType,
const char* contentType)
{
_OrthancPluginStartMultipartAnswer params;
params.output = output;
params.subType = subType;
params.contentType = contentType;
return context->InvokeService(context, _OrthancPluginService_StartMultipartAnswer, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSendMultipartItem(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const void* answer,
uint32_t answerSize)
{
_OrthancPluginAnswerBuffer params;
params.output = output;
params.answer = answer;
params.answerSize = answerSize;
params.mimeType = NULL;
return context->InvokeService(context, _OrthancPluginService_SendMultipartItem, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const void* source;
uint32_t size;
OrthancPluginCompressionType compression;
uint8_t uncompress;
} _OrthancPluginBufferCompression;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginBufferCompression(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const void* source,
uint32_t size,
OrthancPluginCompressionType compression,
uint8_t uncompress)
{
_OrthancPluginBufferCompression params;
params.target = target;
params.source = source;
params.size = size;
params.compression = compression;
params.uncompress = uncompress;
return context->InvokeService(context, _OrthancPluginService_BufferCompression, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* path;
} _OrthancPluginReadFile;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReadFile(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* path)
{
_OrthancPluginReadFile params;
params.target = target;
params.path = path;
return context->InvokeService(context, _OrthancPluginService_ReadFile, &params);
}
typedef struct
{
const char* path;
const void* data;
uint32_t size;
} _OrthancPluginWriteFile;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWriteFile(
OrthancPluginContext* context,
const char* path,
const void* data,
uint32_t size)
{
_OrthancPluginWriteFile params;
params.path = path;
params.data = data;
params.size = size;
return context->InvokeService(context, _OrthancPluginService_WriteFile, &params);
}
typedef struct
{
const char** target;
OrthancPluginErrorCode error;
} _OrthancPluginGetErrorDescription;
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetErrorDescription(
OrthancPluginContext* context,
OrthancPluginErrorCode error)
{
const char* result = NULL;
_OrthancPluginGetErrorDescription params;
params.target = &result;
params.error = error;
if (context->InvokeService(context, _OrthancPluginService_GetErrorDescription, &params) != OrthancPluginErrorCode_Success ||
result == NULL)
{
return "Unknown error code";
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginRestOutput* output;
uint16_t status;
const char* body;
uint32_t bodySize;
} _OrthancPluginSendHttpStatus;
ORTHANC_PLUGIN_INLINE void OrthancPluginSendHttpStatus(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
uint16_t status,
const char* body,
uint32_t bodySize)
{
_OrthancPluginSendHttpStatus params;
params.output = output;
params.status = status;
params.body = body;
params.bodySize = bodySize;
context->InvokeService(context, _OrthancPluginService_SendHttpStatus, &params);
}
typedef struct
{
const OrthancPluginImage* image;
uint32_t* resultUint32;
OrthancPluginPixelFormat* resultPixelFormat;
void** resultBuffer;
} _OrthancPluginGetImageInfo;
ORTHANC_PLUGIN_INLINE OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat(
OrthancPluginContext* context,
const OrthancPluginImage* image)
{
OrthancPluginPixelFormat target;
_OrthancPluginGetImageInfo params;
memset(&params, 0, sizeof(params));
params.image = image;
params.resultPixelFormat = &target;
if (context->InvokeService(context, _OrthancPluginService_GetImagePixelFormat, &params) != OrthancPluginErrorCode_Success)
{
return OrthancPluginPixelFormat_Unknown;
}
else
{
return (OrthancPluginPixelFormat) target;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageWidth(
OrthancPluginContext* context,
const OrthancPluginImage* image)
{
uint32_t width;
_OrthancPluginGetImageInfo params;
memset(&params, 0, sizeof(params));
params.image = image;
params.resultUint32 = &width;
if (context->InvokeService(context, _OrthancPluginService_GetImageWidth, &params) != OrthancPluginErrorCode_Success)
{
return 0;
}
else
{
return width;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImageHeight(
OrthancPluginContext* context,
const OrthancPluginImage* image)
{
uint32_t height;
_OrthancPluginGetImageInfo params;
memset(&params, 0, sizeof(params));
params.image = image;
params.resultUint32 = &height;
if (context->InvokeService(context, _OrthancPluginService_GetImageHeight, &params) != OrthancPluginErrorCode_Success)
{
return 0;
}
else
{
return height;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetImagePitch(
OrthancPluginContext* context,
const OrthancPluginImage* image)
{
uint32_t pitch;
_OrthancPluginGetImageInfo params;
memset(&params, 0, sizeof(params));
params.image = image;
params.resultUint32 = &pitch;
if (context->InvokeService(context, _OrthancPluginService_GetImagePitch, &params) != OrthancPluginErrorCode_Success)
{
return 0;
}
else
{
return pitch;
}
}
ORTHANC_PLUGIN_INLINE void* OrthancPluginGetImageBuffer(
OrthancPluginContext* context,
const OrthancPluginImage* image)
{
void* target = NULL;
_OrthancPluginGetImageInfo params;
memset(&params, 0, sizeof(params));
params.resultBuffer = &target;
params.image = image;
if (context->InvokeService(context, _OrthancPluginService_GetImageBuffer, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginImage** target;
const void* data;
uint32_t size;
OrthancPluginImageFormat format;
} _OrthancPluginUncompressImage;
ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginUncompressImage(
OrthancPluginContext* context,
const void* data,
uint32_t size,
OrthancPluginImageFormat format)
{
OrthancPluginImage* target = NULL;
_OrthancPluginUncompressImage params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.data = data;
params.size = size;
params.format = format;
if (context->InvokeService(context, _OrthancPluginService_UncompressImage, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginImage* image;
} _OrthancPluginFreeImage;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeImage(
OrthancPluginContext* context,
OrthancPluginImage* image)
{
_OrthancPluginFreeImage params;
params.image = image;
context->InvokeService(context, _OrthancPluginService_FreeImage, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
OrthancPluginImageFormat imageFormat;
OrthancPluginPixelFormat pixelFormat;
uint32_t width;
uint32_t height;
uint32_t pitch;
const void* buffer;
uint8_t quality;
} _OrthancPluginCompressImage;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressPngImage(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height,
uint32_t pitch,
const void* buffer)
{
_OrthancPluginCompressImage params;
memset(&params, 0, sizeof(params));
params.target = target;
params.imageFormat = OrthancPluginImageFormat_Png;
params.pixelFormat = format;
params.width = width;
params.height = height;
params.pitch = pitch;
params.buffer = buffer;
params.quality = 0; /* Unused for PNG */
return context->InvokeService(context, _OrthancPluginService_CompressImage, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCompressJpegImage(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height,
uint32_t pitch,
const void* buffer,
uint8_t quality)
{
_OrthancPluginCompressImage params;
memset(&params, 0, sizeof(params));
params.target = target;
params.imageFormat = OrthancPluginImageFormat_Jpeg;
params.pixelFormat = format;
params.width = width;
params.height = height;
params.pitch = pitch;
params.buffer = buffer;
params.quality = quality;
return context->InvokeService(context, _OrthancPluginService_CompressImage, &params);
}
ORTHANC_PLUGIN_INLINE void OrthancPluginCompressAndAnswerJpegImage(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height,
uint32_t pitch,
const void* buffer,
uint8_t quality)
{
_OrthancPluginCompressAndAnswerImage params;
params.output = output;
params.imageFormat = OrthancPluginImageFormat_Jpeg;
params.pixelFormat = format;
params.width = width;
params.height = height;
params.pitch = pitch;
params.buffer = buffer;
params.quality = quality;
context->InvokeService(context, _OrthancPluginService_CompressAndAnswerImage, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
OrthancPluginHttpMethod method;
const char* url;
const char* username;
const char* password;
const void* body;
uint32_t bodySize;
} _OrthancPluginCallHttpClient;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpGet(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* url,
const char* username,
const char* password)
{
_OrthancPluginCallHttpClient params;
memset(&params, 0, sizeof(params));
params.target = target;
params.method = OrthancPluginHttpMethod_Get;
params.url = url;
params.username = username;
params.password = password;
return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPost(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* url,
const void* body,
uint32_t bodySize,
const char* username,
const char* password)
{
_OrthancPluginCallHttpClient params;
memset(&params, 0, sizeof(params));
params.target = target;
params.method = OrthancPluginHttpMethod_Post;
params.url = url;
params.body = body;
params.bodySize = bodySize;
params.username = username;
params.password = password;
return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpPut(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* url,
const void* body,
uint32_t bodySize,
const char* username,
const char* password)
{
_OrthancPluginCallHttpClient params;
memset(&params, 0, sizeof(params));
params.target = target;
params.method = OrthancPluginHttpMethod_Put;
params.url = url;
params.body = body;
params.bodySize = bodySize;
params.username = username;
params.password = password;
return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpDelete(
OrthancPluginContext* context,
const char* url,
const char* username,
const char* password)
{
_OrthancPluginCallHttpClient params;
memset(&params, 0, sizeof(params));
params.method = OrthancPluginHttpMethod_Delete;
params.url = url;
params.username = username;
params.password = password;
return context->InvokeService(context, _OrthancPluginService_CallHttpClient, &params);
}
typedef struct
{
OrthancPluginImage** target;
const OrthancPluginImage* source;
OrthancPluginPixelFormat targetFormat;
} _OrthancPluginConvertPixelFormat;
ORTHANC_PLUGIN_INLINE OrthancPluginImage *OrthancPluginConvertPixelFormat(
OrthancPluginContext* context,
const OrthancPluginImage* source,
OrthancPluginPixelFormat targetFormat)
{
OrthancPluginImage* target = NULL;
_OrthancPluginConvertPixelFormat params;
params.target = &target;
params.source = source;
params.targetFormat = targetFormat;
if (context->InvokeService(context, _OrthancPluginService_ConvertPixelFormat, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontsCount(
OrthancPluginContext* context)
{
uint32_t count = 0;
_OrthancPluginReturnSingleValue params;
memset(&params, 0, sizeof(params));
params.resultUint32 = &count;
if (context->InvokeService(context, _OrthancPluginService_GetFontsCount, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return count;
}
}
typedef struct
{
uint32_t fontIndex; /* in */
const char** name; /* out */
uint32_t* size; /* out */
} _OrthancPluginGetFontInfo;
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetFontName(
OrthancPluginContext* context,
uint32_t fontIndex)
{
const char* result = NULL;
_OrthancPluginGetFontInfo params;
memset(&params, 0, sizeof(params));
params.name = &result;
params.fontIndex = fontIndex;
if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFontSize(
OrthancPluginContext* context,
uint32_t fontIndex)
{
uint32_t result;
_OrthancPluginGetFontInfo params;
memset(&params, 0, sizeof(params));
params.size = &result;
params.fontIndex = fontIndex;
if (context->InvokeService(context, _OrthancPluginService_GetFontInfo, &params) != OrthancPluginErrorCode_Success)
{
return 0;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginImage* image;
uint32_t fontIndex;
const char* utf8Text;
int32_t x;
int32_t y;
uint8_t r;
uint8_t g;
uint8_t b;
} _OrthancPluginDrawText;
ORTHANC_PLUGIN_INLINE 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)
{
_OrthancPluginDrawText params;
memset(&params, 0, sizeof(params));
params.image = image;
params.fontIndex = fontIndex;
params.utf8Text = utf8Text;
params.x = x;
params.y = y;
params.r = r;
params.g = g;
params.b = b;
return context->InvokeService(context, _OrthancPluginService_DrawText, &params);
}
typedef struct
{
OrthancPluginStorageArea* storageArea;
const char* uuid;
const void* content;
uint64_t size;
OrthancPluginContentType type;
} _OrthancPluginStorageAreaCreate;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaCreate(
OrthancPluginContext* context,
OrthancPluginStorageArea* storageArea,
const char* uuid,
const void* content,
uint64_t size,
OrthancPluginContentType type)
{
_OrthancPluginStorageAreaCreate params;
params.storageArea = storageArea;
params.uuid = uuid;
params.content = content;
params.size = size;
params.type = type;
return context->InvokeService(context, _OrthancPluginService_StorageAreaCreate, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
OrthancPluginStorageArea* storageArea;
const char* uuid;
OrthancPluginContentType type;
} _OrthancPluginStorageAreaRead;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRead(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
OrthancPluginStorageArea* storageArea,
const char* uuid,
OrthancPluginContentType type)
{
_OrthancPluginStorageAreaRead params;
params.target = target;
params.storageArea = storageArea;
params.uuid = uuid;
params.type = type;
return context->InvokeService(context, _OrthancPluginService_StorageAreaRead, &params);
}
typedef struct
{
OrthancPluginStorageArea* storageArea;
const char* uuid;
OrthancPluginContentType type;
} _OrthancPluginStorageAreaRemove;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginStorageAreaRemove(
OrthancPluginContext* context,
OrthancPluginStorageArea* storageArea,
const char* uuid,
OrthancPluginContentType type)
{
_OrthancPluginStorageAreaRemove params;
params.storageArea = storageArea;
params.uuid = uuid;
params.type = type;
return context->InvokeService(context, _OrthancPluginService_StorageAreaRemove, &params);
}
typedef struct
{
OrthancPluginErrorCode* target;
int32_t code;
uint16_t httpStatus;
const char* message;
} _OrthancPluginRegisterErrorCode;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterErrorCode(
OrthancPluginContext* context,
int32_t code,
uint16_t httpStatus,
const char* message)
{
OrthancPluginErrorCode target;
_OrthancPluginRegisterErrorCode params;
params.target = &target;
params.code = code;
params.httpStatus = httpStatus;
params.message = message;
if (context->InvokeService(context, _OrthancPluginService_RegisterErrorCode, &params) == OrthancPluginErrorCode_Success)
{
return target;
}
else
{
/* There was an error while assigned the error. Use a generic code. */
return OrthancPluginErrorCode_Plugin;
}
}
typedef struct
{
uint16_t group;
uint16_t element;
OrthancPluginValueRepresentation vr;
const char* name;
uint32_t minMultiplicity;
uint32_t maxMultiplicity;
} _OrthancPluginRegisterDictionaryTag;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterDictionaryTag(
OrthancPluginContext* context,
uint16_t group,
uint16_t element,
OrthancPluginValueRepresentation vr,
const char* name,
uint32_t minMultiplicity,
uint32_t maxMultiplicity)
{
_OrthancPluginRegisterDictionaryTag params;
params.group = group;
params.element = element;
params.vr = vr;
params.name = name;
params.minMultiplicity = minMultiplicity;
params.maxMultiplicity = maxMultiplicity;
return context->InvokeService(context, _OrthancPluginService_RegisterDictionaryTag, &params);
}
typedef struct
{
uint16_t group;
uint16_t element;
OrthancPluginValueRepresentation vr;
const char* name;
uint32_t minMultiplicity;
uint32_t maxMultiplicity;
const char* privateCreator;
} _OrthancPluginRegisterPrivateDictionaryTag;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterPrivateDictionaryTag(
OrthancPluginContext* context,
uint16_t group,
uint16_t element,
OrthancPluginValueRepresentation vr,
const char* name,
uint32_t minMultiplicity,
uint32_t maxMultiplicity,
const char* privateCreator)
{
_OrthancPluginRegisterPrivateDictionaryTag params;
params.group = group;
params.element = element;
params.vr = vr;
params.name = name;
params.minMultiplicity = minMultiplicity;
params.maxMultiplicity = maxMultiplicity;
params.privateCreator = privateCreator;
return context->InvokeService(context, _OrthancPluginService_RegisterPrivateDictionaryTag, &params);
}
typedef struct
{
OrthancPluginStorageArea* storageArea;
OrthancPluginResourceType level;
} _OrthancPluginReconstructMainDicomTags;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags(
OrthancPluginContext* context,
OrthancPluginStorageArea* storageArea,
OrthancPluginResourceType level)
{
_OrthancPluginReconstructMainDicomTags params;
params.level = level;
params.storageArea = storageArea;
return context->InvokeService(context, _OrthancPluginService_ReconstructMainDicomTags, &params);
}
typedef struct
{
char** result;
const char* instanceId;
const void* buffer;
uint32_t size;
OrthancPluginDicomToJsonFormat format;
OrthancPluginDicomToJsonFlags flags;
uint32_t maxStringLength;
} _OrthancPluginDicomToJson;
ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomBufferToJson(
OrthancPluginContext* context,
const void* buffer,
uint32_t size,
OrthancPluginDicomToJsonFormat format,
OrthancPluginDicomToJsonFlags flags,
uint32_t maxStringLength)
{
char* result;
_OrthancPluginDicomToJson params;
memset(&params, 0, sizeof(params));
params.result = &result;
params.buffer = buffer;
params.size = size;
params.format = format;
params.flags = flags;
params.maxStringLength = maxStringLength;
if (context->InvokeService(context, _OrthancPluginService_DicomBufferToJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginDicomInstanceToJson(
OrthancPluginContext* context,
const char* instanceId,
OrthancPluginDicomToJsonFormat format,
OrthancPluginDicomToJsonFlags flags,
uint32_t maxStringLength)
{
char* result;
_OrthancPluginDicomToJson params;
memset(&params, 0, sizeof(params));
params.result = &result;
params.instanceId = instanceId;
params.format = format;
params.flags = flags;
params.maxStringLength = maxStringLength;
if (context->InvokeService(context, _OrthancPluginService_DicomInstanceToJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* uri;
uint32_t headersCount;
const char* const* headersKeys;
const char* const* headersValues;
int32_t afterPlugins;
} _OrthancPluginRestApiGet2;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRestApiGet2(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* uri,
uint32_t headersCount,
const char* const* headersKeys,
const char* const* headersValues,
int32_t afterPlugins)
{
_OrthancPluginRestApiGet2 params;
params.target = target;
params.uri = uri;
params.headersCount = headersCount;
params.headersKeys = headersKeys;
params.headersValues = headersValues;
params.afterPlugins = afterPlugins;
return context->InvokeService(context, _OrthancPluginService_RestApiGet2, &params);
}
typedef struct
{
OrthancPluginWorklistCallback callback;
} _OrthancPluginWorklistCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterWorklistCallback(
OrthancPluginContext* context,
OrthancPluginWorklistCallback callback)
{
_OrthancPluginWorklistCallback params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterWorklistCallback, &params);
}
typedef struct
{
OrthancPluginWorklistAnswers* answers;
const OrthancPluginWorklistQuery* query;
const void* dicom;
uint32_t size;
} _OrthancPluginWorklistAnswersOperation;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistAddAnswer(
OrthancPluginContext* context,
OrthancPluginWorklistAnswers* answers,
const OrthancPluginWorklistQuery* query,
const void* dicom,
uint32_t size)
{
_OrthancPluginWorklistAnswersOperation params;
params.answers = answers;
params.query = query;
params.dicom = dicom;
params.size = size;
return context->InvokeService(context, _OrthancPluginService_WorklistAddAnswer, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistMarkIncomplete(
OrthancPluginContext* context,
OrthancPluginWorklistAnswers* answers)
{
_OrthancPluginWorklistAnswersOperation params;
params.answers = answers;
params.query = NULL;
params.dicom = NULL;
params.size = 0;
return context->InvokeService(context, _OrthancPluginService_WorklistMarkIncomplete, &params);
}
typedef struct
{
const OrthancPluginWorklistQuery* query;
const void* dicom;
uint32_t size;
int32_t* isMatch;
OrthancPluginMemoryBuffer* target;
} _OrthancPluginWorklistQueryOperation;
ORTHANC_PLUGIN_INLINE int32_t OrthancPluginWorklistIsMatch(
OrthancPluginContext* context,
const OrthancPluginWorklistQuery* query,
const void* dicom,
uint32_t size)
{
int32_t isMatch = 0;
_OrthancPluginWorklistQueryOperation params;
params.query = query;
params.dicom = dicom;
params.size = size;
params.isMatch = &isMatch;
params.target = NULL;
if (context->InvokeService(context, _OrthancPluginService_WorklistIsMatch, &params) == OrthancPluginErrorCode_Success)
{
return isMatch;
}
else
{
/* Error: Assume non-match */
return 0;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginWorklistGetDicomQuery(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const OrthancPluginWorklistQuery* query)
{
_OrthancPluginWorklistQueryOperation params;
params.query = query;
params.dicom = NULL;
params.size = 0;
params.isMatch = NULL;
params.target = target;
return context->InvokeService(context, _OrthancPluginService_WorklistGetDicomQuery, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
OrthancPluginInstanceOrigin origin;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultOrigin = &origin;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceOrigin, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return OrthancPluginInstanceOrigin_Unknown;
}
else
{
return origin;
}
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
const char* json;
const OrthancPluginImage* pixelData;
OrthancPluginCreateDicomFlags flags;
} _OrthancPluginCreateDicom;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateDicom(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* json,
const OrthancPluginImage* pixelData,
OrthancPluginCreateDicomFlags flags)
{
_OrthancPluginCreateDicom params;
params.target = target;
params.json = json;
params.pixelData = pixelData;
params.flags = flags;
return context->InvokeService(context, _OrthancPluginService_CreateDicom, &params);
}
typedef struct
{
OrthancPluginDecodeImageCallback callback;
} _OrthancPluginDecodeImageCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterDecodeImageCallback(
OrthancPluginContext* context,
OrthancPluginDecodeImageCallback callback)
{
_OrthancPluginDecodeImageCallback params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterDecodeImageCallback, &params);
}
typedef struct
{
OrthancPluginImage** target;
OrthancPluginPixelFormat format;
uint32_t width;
uint32_t height;
uint32_t pitch;
void* buffer;
const void* constBuffer;
uint32_t bufferSize;
uint32_t frameIndex;
} _OrthancPluginCreateImage;
ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginCreateImage(
OrthancPluginContext* context,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height)
{
OrthancPluginImage* target = NULL;
_OrthancPluginCreateImage params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.format = format;
params.width = width;
params.height = height;
if (context->InvokeService(context, _OrthancPluginService_CreateImage, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginCreateImageAccessor(
OrthancPluginContext* context,
OrthancPluginPixelFormat format,
uint32_t width,
uint32_t height,
uint32_t pitch,
void* buffer)
{
OrthancPluginImage* target = NULL;
_OrthancPluginCreateImage params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.format = format;
params.width = width;
params.height = height;
params.pitch = pitch;
params.buffer = buffer;
if (context->InvokeService(context, _OrthancPluginService_CreateImageAccessor, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginDecodeDicomImage(
OrthancPluginContext* context,
const void* buffer,
uint32_t bufferSize,
uint32_t frameIndex)
{
OrthancPluginImage* target = NULL;
_OrthancPluginCreateImage params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.constBuffer = buffer;
params.bufferSize = bufferSize;
params.frameIndex = frameIndex;
if (context->InvokeService(context, _OrthancPluginService_DecodeDicomImage, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
typedef struct
{
char** result;
const void* buffer;
uint32_t size;
} _OrthancPluginComputeHash;
ORTHANC_PLUGIN_INLINE char* OrthancPluginComputeMd5(
OrthancPluginContext* context,
const void* buffer,
uint32_t size)
{
char* result;
_OrthancPluginComputeHash params;
params.result = &result;
params.buffer = buffer;
params.size = size;
if (context->InvokeService(context, _OrthancPluginService_ComputeMd5, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginComputeSha1(
OrthancPluginContext* context,
const void* buffer,
uint32_t size)
{
char* result;
_OrthancPluginComputeHash params;
params.result = &result;
params.buffer = buffer;
params.size = size;
if (context->InvokeService(context, _OrthancPluginService_ComputeSha1, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginDictionaryEntry* target;
const char* name;
} _OrthancPluginLookupDictionary;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginLookupDictionary(
OrthancPluginContext* context,
OrthancPluginDictionaryEntry* target,
const char* name)
{
_OrthancPluginLookupDictionary params;
params.target = target;
params.name = name;
return context->InvokeService(context, _OrthancPluginService_LookupDictionary, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
const void* answer;
uint32_t answerSize;
uint32_t headersCount;
const char* const* headersKeys;
const char* const* headersValues;
} _OrthancPluginSendMultipartItem2;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSendMultipartItem2(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const void* answer,
uint32_t answerSize,
uint32_t headersCount,
const char* const* headersKeys,
const char* const* headersValues)
{
_OrthancPluginSendMultipartItem2 params;
params.output = output;
params.answer = answer;
params.answerSize = answerSize;
params.headersCount = headersCount;
params.headersKeys = headersKeys;
params.headersValues = headersValues;
return context->InvokeService(context, _OrthancPluginService_SendMultipartItem2, &params);
}
typedef struct
{
OrthancPluginIncomingHttpRequestFilter callback;
} _OrthancPluginIncomingHttpRequestFilter;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter(
OrthancPluginContext* context,
OrthancPluginIncomingHttpRequestFilter callback)
{
_OrthancPluginIncomingHttpRequestFilter params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* answerBody;
OrthancPluginMemoryBuffer* answerHeaders;
uint16_t* httpStatus;
OrthancPluginHttpMethod method;
const char* url;
uint32_t headersCount;
const char* const* headersKeys;
const char* const* headersValues;
const void* body;
uint32_t bodySize;
const char* username;
const char* password;
uint32_t timeout;
const char* certificateFile;
const char* certificateKeyFile;
const char* certificateKeyPassword;
uint8_t pkcs11;
} _OrthancPluginCallHttpClient2;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginHttpClient(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* answerBody,
OrthancPluginMemoryBuffer* answerHeaders,
uint16_t* httpStatus,
OrthancPluginHttpMethod method,
const char* url,
uint32_t headersCount,
const char* const* headersKeys,
const char* const* headersValues,
const void* body,
uint32_t bodySize,
const char* username,
const char* password,
uint32_t timeout,
const char* certificateFile,
const char* certificateKeyFile,
const char* certificateKeyPassword,
uint8_t pkcs11)
{
_OrthancPluginCallHttpClient2 params;
memset(&params, 0, sizeof(params));
params.answerBody = answerBody;
params.answerHeaders = answerHeaders;
params.httpStatus = httpStatus;
params.method = method;
params.url = url;
params.headersCount = headersCount;
params.headersKeys = headersKeys;
params.headersValues = headersValues;
params.body = body;
params.bodySize = bodySize;
params.username = username;
params.password = password;
params.timeout = timeout;
params.certificateFile = certificateFile;
params.certificateKeyFile = certificateKeyFile;
params.certificateKeyPassword = certificateKeyPassword;
params.pkcs11 = pkcs11;
return context->InvokeService(context, _OrthancPluginService_CallHttpClient2, &params);
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGenerateUuid(
OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GenerateUuid, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginFindCallback callback;
} _OrthancPluginFindCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterFindCallback(
OrthancPluginContext* context,
OrthancPluginFindCallback callback)
{
_OrthancPluginFindCallback params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterFindCallback, &params);
}
typedef struct
{
OrthancPluginFindAnswers *answers;
const OrthancPluginFindQuery *query;
const void *dicom;
uint32_t size;
uint32_t index;
uint32_t *resultUint32;
uint16_t *resultGroup;
uint16_t *resultElement;
char **resultString;
} _OrthancPluginFindOperation;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginFindAddAnswer(
OrthancPluginContext* context,
OrthancPluginFindAnswers* answers,
const void* dicom,
uint32_t size)
{
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.answers = answers;
params.dicom = dicom;
params.size = size;
return context->InvokeService(context, _OrthancPluginService_FindAddAnswer, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginFindMarkIncomplete(
OrthancPluginContext* context,
OrthancPluginFindAnswers* answers)
{
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.answers = answers;
return context->InvokeService(context, _OrthancPluginService_FindMarkIncomplete, &params);
}
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetFindQuerySize(
OrthancPluginContext* context,
const OrthancPluginFindQuery* query)
{
uint32_t count = 0;
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.query = query;
params.resultUint32 = &count;
if (context->InvokeService(context, _OrthancPluginService_GetFindQuerySize, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return count;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetFindQueryTag(
OrthancPluginContext* context,
uint16_t* group,
uint16_t* element,
const OrthancPluginFindQuery* query,
uint32_t index)
{
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.query = query;
params.index = index;
params.resultGroup = group;
params.resultElement = element;
return context->InvokeService(context, _OrthancPluginService_GetFindQueryTag, &params);
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetFindQueryTagName(
OrthancPluginContext* context,
const OrthancPluginFindQuery* query,
uint32_t index)
{
char* result;
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.query = query;
params.index = index;
params.resultString = &result;
if (context->InvokeService(context, _OrthancPluginService_GetFindQueryTagName, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetFindQueryValue(
OrthancPluginContext* context,
const OrthancPluginFindQuery* query,
uint32_t index)
{
char* result;
_OrthancPluginFindOperation params;
memset(&params, 0, sizeof(params));
params.query = query;
params.index = index;
params.resultString = &result;
if (context->InvokeService(context, _OrthancPluginService_GetFindQueryValue, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginMoveCallback callback;
OrthancPluginGetMoveSize getMoveSize;
OrthancPluginApplyMove applyMove;
OrthancPluginFreeMove freeMove;
} _OrthancPluginMoveCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterMoveCallback(
OrthancPluginContext* context,
OrthancPluginMoveCallback callback,
OrthancPluginGetMoveSize getMoveSize,
OrthancPluginApplyMove applyMove,
OrthancPluginFreeMove freeMove)
{
_OrthancPluginMoveCallback params;
params.callback = callback;
params.getMoveSize = getMoveSize;
params.applyMove = applyMove;
params.freeMove = freeMove;
return context->InvokeService(context, _OrthancPluginService_RegisterMoveCallback, &params);
}
typedef struct
{
OrthancPluginFindMatcher** target;
const void* query;
uint32_t size;
} _OrthancPluginCreateFindMatcher;
ORTHANC_PLUGIN_INLINE OrthancPluginFindMatcher* OrthancPluginCreateFindMatcher(
OrthancPluginContext* context,
const void* query,
uint32_t size)
{
OrthancPluginFindMatcher* target = NULL;
_OrthancPluginCreateFindMatcher params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.query = query;
params.size = size;
if (context->InvokeService(context, _OrthancPluginService_CreateFindMatcher, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginFindMatcher* matcher;
} _OrthancPluginFreeFindMatcher;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeFindMatcher(
OrthancPluginContext* context,
OrthancPluginFindMatcher* matcher)
{
_OrthancPluginFreeFindMatcher params;
params.matcher = matcher;
context->InvokeService(context, _OrthancPluginService_FreeFindMatcher, &params);
}
typedef struct
{
const OrthancPluginFindMatcher* matcher;
const void* dicom;
uint32_t size;
int32_t* isMatch;
} _OrthancPluginFindMatcherIsMatch;
ORTHANC_PLUGIN_INLINE int32_t OrthancPluginFindMatcherIsMatch(
OrthancPluginContext* context,
const OrthancPluginFindMatcher* matcher,
const void* dicom,
uint32_t size)
{
int32_t isMatch = 0;
_OrthancPluginFindMatcherIsMatch params;
params.matcher = matcher;
params.dicom = dicom;
params.size = size;
params.isMatch = &isMatch;
if (context->InvokeService(context, _OrthancPluginService_FindMatcherIsMatch, &params) == OrthancPluginErrorCode_Success)
{
return isMatch;
}
else
{
/* Error: Assume non-match */
return 0;
}
}
typedef struct
{
OrthancPluginIncomingHttpRequestFilter2 callback;
} _OrthancPluginIncomingHttpRequestFilter2;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter2(
OrthancPluginContext* context,
OrthancPluginIncomingHttpRequestFilter2 callback)
{
_OrthancPluginIncomingHttpRequestFilter2 params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterIncomingHttpRequestFilter2, &params);
}
typedef struct
{
OrthancPluginPeers** peers;
} _OrthancPluginGetPeers;
ORTHANC_PLUGIN_INLINE OrthancPluginPeers* OrthancPluginGetPeers(
OrthancPluginContext* context)
{
OrthancPluginPeers* peers = NULL;
_OrthancPluginGetPeers params;
memset(&params, 0, sizeof(params));
params.peers = &peers;
if (context->InvokeService(context, _OrthancPluginService_GetPeers, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return peers;
}
}
typedef struct
{
OrthancPluginPeers* peers;
} _OrthancPluginFreePeers;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreePeers(
OrthancPluginContext* context,
OrthancPluginPeers* peers)
{
_OrthancPluginFreePeers params;
params.peers = peers;
context->InvokeService(context, _OrthancPluginService_FreePeers, &params);
}
typedef struct
{
uint32_t* target;
const OrthancPluginPeers* peers;
} _OrthancPluginGetPeersCount;
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetPeersCount(
OrthancPluginContext* context,
const OrthancPluginPeers* peers)
{
uint32_t target = 0;
_OrthancPluginGetPeersCount params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.peers = peers;
if (context->InvokeService(context, _OrthancPluginService_GetPeersCount, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return target;
}
}
typedef struct
{
const char** target;
const OrthancPluginPeers* peers;
uint32_t peerIndex;
const char* userProperty;
} _OrthancPluginGetPeerProperty;
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerName(
OrthancPluginContext* context,
const OrthancPluginPeers* peers,
uint32_t peerIndex)
{
const char* target = NULL;
_OrthancPluginGetPeerProperty params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.peers = peers;
params.peerIndex = peerIndex;
params.userProperty = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetPeerName, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerUrl(
OrthancPluginContext* context,
const OrthancPluginPeers* peers,
uint32_t peerIndex)
{
const char* target = NULL;
_OrthancPluginGetPeerProperty params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.peers = peers;
params.peerIndex = peerIndex;
params.userProperty = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetPeerUrl, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetPeerUserProperty(
OrthancPluginContext* context,
const OrthancPluginPeers* peers,
uint32_t peerIndex,
const char* userProperty)
{
const char* target = NULL;
_OrthancPluginGetPeerProperty params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.peers = peers;
params.peerIndex = peerIndex;
params.userProperty = userProperty;
if (context->InvokeService(context, _OrthancPluginService_GetPeerUserProperty, &params) != OrthancPluginErrorCode_Success)
{
/* No such user property */
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginMemoryBuffer* answerBody;
OrthancPluginMemoryBuffer* answerHeaders;
uint16_t* httpStatus;
const OrthancPluginPeers* peers;
uint32_t peerIndex;
OrthancPluginHttpMethod method;
const char* uri;
uint32_t additionalHeadersCount;
const char* const* additionalHeadersKeys;
const char* const* additionalHeadersValues;
const void* body;
uint32_t bodySize;
uint32_t timeout;
} _OrthancPluginCallPeerApi;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCallPeerApi(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* answerBody,
OrthancPluginMemoryBuffer* answerHeaders,
uint16_t* httpStatus,
const OrthancPluginPeers* peers,
uint32_t peerIndex,
OrthancPluginHttpMethod method,
const char* uri,
uint32_t additionalHeadersCount,
const char* const* additionalHeadersKeys,
const char* const* additionalHeadersValues,
const void* body,
uint32_t bodySize,
uint32_t timeout)
{
_OrthancPluginCallPeerApi params;
memset(&params, 0, sizeof(params));
params.answerBody = answerBody;
params.answerHeaders = answerHeaders;
params.httpStatus = httpStatus;
params.peers = peers;
params.peerIndex = peerIndex;
params.method = method;
params.uri = uri;
params.additionalHeadersCount = additionalHeadersCount;
params.additionalHeadersKeys = additionalHeadersKeys;
params.additionalHeadersValues = additionalHeadersValues;
params.body = body;
params.bodySize = bodySize;
params.timeout = timeout;
return context->InvokeService(context, _OrthancPluginService_CallPeerApi, &params);
}
typedef struct
{
OrthancPluginJob** target;
void *job;
OrthancPluginJobFinalize finalize;
const char *type;
OrthancPluginJobGetProgress getProgress;
OrthancPluginJobGetContent getContent;
OrthancPluginJobGetSerialized getSerialized;
OrthancPluginJobStep step;
OrthancPluginJobStop stop;
OrthancPluginJobReset reset;
} _OrthancPluginCreateJob;
ORTHANC_PLUGIN_INLINE OrthancPluginJob *OrthancPluginCreateJob(
OrthancPluginContext *context,
void *job,
OrthancPluginJobFinalize finalize,
const char *type,
OrthancPluginJobGetProgress getProgress,
OrthancPluginJobGetContent getContent,
OrthancPluginJobGetSerialized getSerialized,
OrthancPluginJobStep step,
OrthancPluginJobStop stop,
OrthancPluginJobReset reset)
{
OrthancPluginJob* target = NULL;
_OrthancPluginCreateJob params;
memset(&params, 0, sizeof(params));
params.target = &target;
params.job = job;
params.finalize = finalize;
params.type = type;
params.getProgress = getProgress;
params.getContent = getContent;
params.getSerialized = getSerialized;
params.step = step;
params.stop = stop;
params.reset = reset;
if (context->InvokeService(context, _OrthancPluginService_CreateJob, &params) != OrthancPluginErrorCode_Success ||
target == NULL)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginJob* job;
} _OrthancPluginFreeJob;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeJob(
OrthancPluginContext* context,
OrthancPluginJob* job)
{
_OrthancPluginFreeJob params;
params.job = job;
context->InvokeService(context, _OrthancPluginService_FreeJob, &params);
}
typedef struct
{
char** resultId;
OrthancPluginJob *job;
int priority;
} _OrthancPluginSubmitJob;
ORTHANC_PLUGIN_INLINE char *OrthancPluginSubmitJob(
OrthancPluginContext *context,
OrthancPluginJob *job,
int priority)
{
char* resultId = NULL;
_OrthancPluginSubmitJob params;
memset(&params, 0, sizeof(params));
params.resultId = &resultId;
params.job = job;
params.priority = priority;
if (context->InvokeService(context, _OrthancPluginService_SubmitJob, &params) != OrthancPluginErrorCode_Success ||
resultId == NULL)
{
/* Error */
return NULL;
}
else
{
return resultId;
}
}
typedef struct
{
OrthancPluginJobsUnserializer unserializer;
} _OrthancPluginJobsUnserializer;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterJobsUnserializer(
OrthancPluginContext* context,
OrthancPluginJobsUnserializer unserializer)
{
_OrthancPluginJobsUnserializer params;
params.unserializer = unserializer;
context->InvokeService(context, _OrthancPluginService_RegisterJobsUnserializer, &params);
}
typedef struct
{
OrthancPluginRestOutput* output;
const char* details;
uint8_t log;
} _OrthancPluginSetHttpErrorDetails;
ORTHANC_PLUGIN_INLINE void OrthancPluginSetHttpErrorDetails(
OrthancPluginContext* context,
OrthancPluginRestOutput* output,
const char* details,
uint8_t log)
{
_OrthancPluginSetHttpErrorDetails params;
params.output = output;
params.details = details;
params.log = log;
context->InvokeService(context, _OrthancPluginService_SetHttpErrorDetails, &params);
}
typedef struct
{
const char** result;
const char* argument;
} _OrthancPluginRetrieveStaticString;
ORTHANC_PLUGIN_INLINE const char* OrthancPluginAutodetectMimeType(
OrthancPluginContext* context,
const char* path)
{
const char* result = NULL;
_OrthancPluginRetrieveStaticString params;
params.result = &result;
params.argument = path;
if (context->InvokeService(context, _OrthancPluginService_AutodetectMimeType, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
const char* name;
float value;
OrthancPluginMetricsType type;
} _OrthancPluginSetMetricsValue;
ORTHANC_PLUGIN_INLINE void OrthancPluginSetMetricsValue(
OrthancPluginContext* context,
const char* name,
float value,
OrthancPluginMetricsType type)
{
_OrthancPluginSetMetricsValue params;
params.name = name;
params.value = value;
params.type = type;
context->InvokeService(context, _OrthancPluginService_SetMetricsValue, &params);
}
typedef struct
{
OrthancPluginRefreshMetricsCallback callback;
} _OrthancPluginRegisterRefreshMetricsCallback;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterRefreshMetricsCallback(
OrthancPluginContext* context,
OrthancPluginRefreshMetricsCallback callback)
{
_OrthancPluginRegisterRefreshMetricsCallback params;
params.callback = callback;
context->InvokeService(context, _OrthancPluginService_RegisterRefreshMetricsCallback, &params);
}
typedef struct
{
char** target;
const void* dicom;
uint32_t dicomSize;
OrthancPluginDicomWebBinaryCallback callback;
} _OrthancPluginEncodeDicomWeb;
ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebJson(
OrthancPluginContext* context,
const void* dicom,
uint32_t dicomSize,
OrthancPluginDicomWebBinaryCallback callback)
{
char* target = NULL;
_OrthancPluginEncodeDicomWeb params;
params.target = &target;
params.dicom = dicom;
params.dicomSize = dicomSize;
params.callback = callback;
if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebXml(
OrthancPluginContext* context,
const void* dicom,
uint32_t dicomSize,
OrthancPluginDicomWebBinaryCallback callback)
{
char* target = NULL;
_OrthancPluginEncodeDicomWeb params;
params.target = &target;
params.dicom = dicom;
params.dicomSize = dicomSize;
params.callback = callback;
if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebXml, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
typedef struct
{
char** target;
const void* dicom;
uint32_t dicomSize;
OrthancPluginDicomWebBinaryCallback2 callback;
void* payload;
} _OrthancPluginEncodeDicomWeb2;
ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebJson2(
OrthancPluginContext* context,
const void* dicom,
uint32_t dicomSize,
OrthancPluginDicomWebBinaryCallback2 callback,
void* payload)
{
char* target = NULL;
_OrthancPluginEncodeDicomWeb2 params;
params.target = &target;
params.dicom = dicom;
params.dicomSize = dicomSize;
params.callback = callback;
params.payload = payload;
if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebJson2, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginEncodeDicomWebXml2(
OrthancPluginContext* context,
const void* dicom,
uint32_t dicomSize,
OrthancPluginDicomWebBinaryCallback2 callback,
void* payload)
{
char* target = NULL;
_OrthancPluginEncodeDicomWeb2 params;
params.target = &target;
params.dicom = dicom;
params.dicomSize = dicomSize;
params.callback = callback;
params.payload = payload;
if (context->InvokeService(context, _OrthancPluginService_EncodeDicomWebXml2, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientAnswerAddHeader) (
void* answer,
const char* key,
const char* value);
typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientAnswerAddChunk) (
void* answer,
const void* data,
uint32_t size);
typedef uint8_t (*OrthancPluginChunkedClientRequestIsDone) (void* request);
typedef OrthancPluginErrorCode (*OrthancPluginChunkedClientRequestNext) (void* request);
typedef const void* (*OrthancPluginChunkedClientRequestGetChunkData) (void* request);
typedef uint32_t (*OrthancPluginChunkedClientRequestGetChunkSize) (void* request);
typedef struct
{
void* answer;
OrthancPluginChunkedClientAnswerAddChunk answerAddChunk;
OrthancPluginChunkedClientAnswerAddHeader answerAddHeader;
uint16_t* httpStatus;
OrthancPluginHttpMethod method;
const char* url;
uint32_t headersCount;
const char* const* headersKeys;
const char* const* headersValues;
void* request;
OrthancPluginChunkedClientRequestIsDone requestIsDone;
OrthancPluginChunkedClientRequestGetChunkData requestChunkData;
OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize;
OrthancPluginChunkedClientRequestNext requestNext;
const char* username;
const char* password;
uint32_t timeout;
const char* certificateFile;
const char* certificateKeyFile;
const char* certificateKeyPassword;
uint8_t pkcs11;
} _OrthancPluginChunkedHttpClient;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginChunkedHttpClient(
OrthancPluginContext* context,
void* answer,
OrthancPluginChunkedClientAnswerAddChunk answerAddChunk,
OrthancPluginChunkedClientAnswerAddHeader answerAddHeader,
uint16_t* httpStatus,
OrthancPluginHttpMethod method,
const char* url,
uint32_t headersCount,
const char* const* headersKeys,
const char* const* headersValues,
void* request,
OrthancPluginChunkedClientRequestIsDone requestIsDone,
OrthancPluginChunkedClientRequestGetChunkData requestChunkData,
OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize,
OrthancPluginChunkedClientRequestNext requestNext,
const char* username,
const char* password,
uint32_t timeout,
const char* certificateFile,
const char* certificateKeyFile,
const char* certificateKeyPassword,
uint8_t pkcs11)
{
_OrthancPluginChunkedHttpClient params;
memset(&params, 0, sizeof(params));
/* In common with OrthancPluginHttpClient() */
params.httpStatus = httpStatus;
params.method = method;
params.url = url;
params.headersCount = headersCount;
params.headersKeys = headersKeys;
params.headersValues = headersValues;
params.username = username;
params.password = password;
params.timeout = timeout;
params.certificateFile = certificateFile;
params.certificateKeyFile = certificateKeyFile;
params.certificateKeyPassword = certificateKeyPassword;
params.pkcs11 = pkcs11;
/* For chunked body/answer */
params.answer = answer;
params.answerAddChunk = answerAddChunk;
params.answerAddHeader = answerAddHeader;
params.request = request;
params.requestIsDone = requestIsDone;
params.requestChunkData = requestChunkData;
params.requestChunkSize = requestChunkSize;
params.requestNext = requestNext;
return context->InvokeService(context, _OrthancPluginService_ChunkedHttpClient, &params);
}
typedef struct _OrthancPluginServerChunkedRequestReader_t OrthancPluginServerChunkedRequestReader;
typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderFactory) (
OrthancPluginServerChunkedRequestReader** reader,
const char* url,
const OrthancPluginHttpRequest* request);
typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderAddChunk) (
OrthancPluginServerChunkedRequestReader* reader,
const void* data,
uint32_t size);
typedef OrthancPluginErrorCode (*OrthancPluginServerChunkedRequestReaderExecute) (
OrthancPluginServerChunkedRequestReader* reader,
OrthancPluginRestOutput* output);
typedef void (*OrthancPluginServerChunkedRequestReaderFinalize) (
OrthancPluginServerChunkedRequestReader* reader);
typedef struct
{
const char* pathRegularExpression;
OrthancPluginRestCallback getHandler;
OrthancPluginServerChunkedRequestReaderFactory postHandler;
OrthancPluginRestCallback deleteHandler;
OrthancPluginServerChunkedRequestReaderFactory putHandler;
OrthancPluginServerChunkedRequestReaderAddChunk addChunk;
OrthancPluginServerChunkedRequestReaderExecute execute;
OrthancPluginServerChunkedRequestReaderFinalize finalize;
} _OrthancPluginChunkedRestCallback;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterChunkedRestCallback(
OrthancPluginContext* context,
const char* pathRegularExpression,
OrthancPluginRestCallback getHandler,
OrthancPluginServerChunkedRequestReaderFactory postHandler,
OrthancPluginRestCallback deleteHandler,
OrthancPluginServerChunkedRequestReaderFactory putHandler,
OrthancPluginServerChunkedRequestReaderAddChunk addChunk,
OrthancPluginServerChunkedRequestReaderExecute execute,
OrthancPluginServerChunkedRequestReaderFinalize finalize)
{
_OrthancPluginChunkedRestCallback params;
params.pathRegularExpression = pathRegularExpression;
params.getHandler = getHandler;
params.postHandler = postHandler;
params.deleteHandler = deleteHandler;
params.putHandler = putHandler;
params.addChunk = addChunk;
params.execute = execute;
params.finalize = finalize;
context->InvokeService(context, _OrthancPluginService_RegisterChunkedRestCallback, &params);
}
typedef struct
{
char** result;
uint16_t group;
uint16_t element;
const char* privateCreator;
} _OrthancPluginGetTagName;
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetTagName(
OrthancPluginContext* context,
uint16_t group,
uint16_t element,
const char* privateCreator)
{
char* result;
_OrthancPluginGetTagName params;
params.result = &result;
params.group = group;
params.element = element;
params.privateCreator = privateCreator;
if (context->InvokeService(context, _OrthancPluginService_GetTagName, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef OrthancPluginErrorCode (*OrthancPluginStorageCommitmentFactory) (
void** handler /* out */,
const char* jobId,
const char* transactionUid,
const char* const* sopClassUids,
const char* const* sopInstanceUids,
uint32_t countInstances,
const char* remoteAet,
const char* calledAet);
typedef void (*OrthancPluginStorageCommitmentDestructor) (void* handler);
typedef OrthancPluginErrorCode (*OrthancPluginStorageCommitmentLookup) (
OrthancPluginStorageCommitmentFailureReason* target,
void* handler,
const char* sopClassUid,
const char* sopInstanceUid);
typedef struct
{
OrthancPluginStorageCommitmentFactory factory;
OrthancPluginStorageCommitmentDestructor destructor;
OrthancPluginStorageCommitmentLookup lookup;
} _OrthancPluginRegisterStorageCommitmentScpCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterStorageCommitmentScpCallback(
OrthancPluginContext* context,
OrthancPluginStorageCommitmentFactory factory,
OrthancPluginStorageCommitmentDestructor destructor,
OrthancPluginStorageCommitmentLookup lookup)
{
_OrthancPluginRegisterStorageCommitmentScpCallback params;
params.factory = factory;
params.destructor = destructor;
params.lookup = lookup;
return context->InvokeService(context, _OrthancPluginService_RegisterStorageCommitmentScpCallback, &params);
}
typedef int32_t (*OrthancPluginIncomingDicomInstanceFilter) (
const OrthancPluginDicomInstance* instance);
typedef struct
{
OrthancPluginIncomingDicomInstanceFilter callback;
} _OrthancPluginIncomingDicomInstanceFilter;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingDicomInstanceFilter(
OrthancPluginContext* context,
OrthancPluginIncomingDicomInstanceFilter callback)
{
_OrthancPluginIncomingDicomInstanceFilter params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterIncomingDicomInstanceFilter, &params);
}
typedef int32_t (*OrthancPluginIncomingCStoreInstanceFilter) (
uint16_t* dimseStatus /* out */,
const OrthancPluginDicomInstance* instance);
typedef struct
{
OrthancPluginIncomingCStoreInstanceFilter callback;
} _OrthancPluginIncomingCStoreInstanceFilter;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterIncomingCStoreInstanceFilter(
OrthancPluginContext* context,
OrthancPluginIncomingCStoreInstanceFilter callback)
{
_OrthancPluginIncomingCStoreInstanceFilter params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterIncomingCStoreInstanceFilter, &params);
}
typedef OrthancPluginReceivedInstanceAction (*OrthancPluginReceivedInstanceCallback) (
OrthancPluginMemoryBuffer64* modifiedDicomBuffer,
const void* receivedDicomBuffer,
uint64_t receivedDicomBufferSize,
OrthancPluginInstanceOrigin origin);
typedef struct
{
OrthancPluginReceivedInstanceCallback callback;
} _OrthancPluginReceivedInstanceCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterReceivedInstanceCallback(
OrthancPluginContext* context,
OrthancPluginReceivedInstanceCallback callback)
{
_OrthancPluginReceivedInstanceCallback params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterReceivedInstanceCallback, &params);
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceTransferSyntaxUid(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
char* result;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultStringToFree = &result;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceTransferSyntaxUid, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE int32_t OrthancPluginHasInstancePixelData(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
int64_t hasPixelData;
_OrthancPluginAccessDicomInstance params;
memset(&params, 0, sizeof(params));
params.resultInt64 = &hasPixelData;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_HasInstancePixelData, &params) != OrthancPluginErrorCode_Success ||
hasPixelData < 0 ||
hasPixelData > 1)
{
/* Error */
return -1;
}
else
{
return (hasPixelData != 0);
}
}
typedef struct
{
OrthancPluginDicomInstance** target;
const void* buffer;
uint32_t size;
const char* transferSyntax;
} _OrthancPluginCreateDicomInstance;
ORTHANC_PLUGIN_INLINE OrthancPluginDicomInstance* OrthancPluginCreateDicomInstance(
OrthancPluginContext* context,
const void* buffer,
uint32_t size)
{
OrthancPluginDicomInstance* target = NULL;
_OrthancPluginCreateDicomInstance params;
params.target = &target;
params.buffer = buffer;
params.size = size;
if (context->InvokeService(context, _OrthancPluginService_CreateDicomInstance, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
typedef struct
{
OrthancPluginDicomInstance* dicom;
} _OrthancPluginFreeDicomInstance;
ORTHANC_PLUGIN_INLINE void OrthancPluginFreeDicomInstance(
OrthancPluginContext* context,
OrthancPluginDicomInstance* dicom)
{
_OrthancPluginFreeDicomInstance params;
params.dicom = dicom;
context->InvokeService(context, _OrthancPluginService_FreeDicomInstance, &params);
}
typedef struct
{
uint32_t* targetUint32;
OrthancPluginMemoryBuffer* targetBuffer;
OrthancPluginImage** targetImage;
char** targetStringToFree;
const OrthancPluginDicomInstance* instance;
uint32_t frameIndex;
OrthancPluginDicomToJsonFormat format;
OrthancPluginDicomToJsonFlags flags;
uint32_t maxStringLength;
OrthancPluginDicomWebBinaryCallback2 dicomWebCallback;
void* dicomWebPayload;
} _OrthancPluginAccessDicomInstance2;
ORTHANC_PLUGIN_INLINE uint32_t OrthancPluginGetInstanceFramesCount(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance)
{
uint32_t count;
_OrthancPluginAccessDicomInstance2 params;
memset(&params, 0, sizeof(params));
params.targetUint32 = &count;
params.instance = instance;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceFramesCount, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return 0;
}
else
{
return count;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginGetInstanceRawFrame(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const OrthancPluginDicomInstance* instance,
uint32_t frameIndex)
{
_OrthancPluginAccessDicomInstance2 params;
memset(&params, 0, sizeof(params));
params.targetBuffer = target;
params.instance = instance;
params.frameIndex = frameIndex;
return context->InvokeService(context, _OrthancPluginService_GetInstanceRawFrame, &params);
}
ORTHANC_PLUGIN_INLINE OrthancPluginImage* OrthancPluginGetInstanceDecodedFrame(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
uint32_t frameIndex)
{
OrthancPluginImage* target = NULL;
_OrthancPluginAccessDicomInstance2 params;
memset(&params, 0, sizeof(params));
params.targetImage = &target;
params.instance = instance;
params.frameIndex = frameIndex;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceDecodedFrame, &params) != OrthancPluginErrorCode_Success)
{
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginDicomInstance* OrthancPluginTranscodeDicomInstance(
OrthancPluginContext* context,
const void* buffer,
uint32_t size,
const char* transferSyntax)
{
OrthancPluginDicomInstance* target = NULL;
_OrthancPluginCreateDicomInstance params;
params.target = &target;
params.buffer = buffer;
params.size = size;
params.transferSyntax = transferSyntax;
if (context->InvokeService(context, _OrthancPluginService_TranscodeDicomInstance, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginSerializeDicomInstance(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const OrthancPluginDicomInstance* instance)
{
_OrthancPluginAccessDicomInstance2 params;
memset(&params, 0, sizeof(params));
params.targetBuffer = target;
params.instance = instance;
return context->InvokeService(context, _OrthancPluginService_SerializeDicomInstance, &params);
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceAdvancedJson(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
OrthancPluginDicomToJsonFormat format,
OrthancPluginDicomToJsonFlags flags,
uint32_t maxStringLength)
{
char* result = NULL;
_OrthancPluginAccessDicomInstance2 params;
memset(&params, 0, sizeof(params));
params.targetStringToFree = &result;
params.instance = instance;
params.format = format;
params.flags = flags;
params.maxStringLength = maxStringLength;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceAdvancedJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceDicomWebJson(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
OrthancPluginDicomWebBinaryCallback2 callback,
void* payload)
{
char* target = NULL;
_OrthancPluginAccessDicomInstance2 params;
params.targetStringToFree = &target;
params.instance = instance;
params.dicomWebCallback = callback;
params.dicomWebPayload = payload;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceDicomWebJson, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGetInstanceDicomWebXml(
OrthancPluginContext* context,
const OrthancPluginDicomInstance* instance,
OrthancPluginDicomWebBinaryCallback2 callback,
void* payload)
{
char* target = NULL;
_OrthancPluginAccessDicomInstance2 params;
params.targetStringToFree = &target;
params.instance = instance;
params.dicomWebCallback = callback;
params.dicomWebPayload = payload;
if (context->InvokeService(context, _OrthancPluginService_GetInstanceDicomWebXml, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return target;
}
}
typedef OrthancPluginErrorCode (*OrthancPluginTranscoderCallback) (
OrthancPluginMemoryBuffer* transcoded /* out */,
const void* buffer,
uint64_t size,
const char* const* allowedSyntaxes,
uint32_t countSyntaxes,
uint8_t allowNewSopInstanceUid);
typedef struct
{
OrthancPluginTranscoderCallback callback;
} _OrthancPluginTranscoderCallback;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterTranscoderCallback(
OrthancPluginContext* context,
OrthancPluginTranscoderCallback callback)
{
_OrthancPluginTranscoderCallback params;
params.callback = callback;
return context->InvokeService(context, _OrthancPluginService_RegisterTranscoderCallback, &params);
}
typedef struct
{
OrthancPluginMemoryBuffer* target;
uint32_t size;
} _OrthancPluginCreateMemoryBuffer;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
uint32_t size)
{
_OrthancPluginCreateMemoryBuffer params;
params.target = target;
params.size = size;
return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer, &params);
}
ORTHANC_PLUGIN_INLINE char* OrthancPluginGenerateRestApiAuthorizationToken(
OrthancPluginContext* context)
{
char* result;
_OrthancPluginRetrieveDynamicString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GenerateRestApiAuthorizationToken,
&params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
typedef struct
{
OrthancPluginMemoryBuffer64* target;
uint64_t size;
} _OrthancPluginCreateMemoryBuffer64;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer64(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer64* target,
uint64_t size)
{
_OrthancPluginCreateMemoryBuffer64 params;
params.target = target;
params.size = size;
return context->InvokeService(context, _OrthancPluginService_CreateMemoryBuffer64, &params);
}
typedef struct
{
OrthancPluginStorageCreate create;
OrthancPluginStorageReadWhole readWhole;
OrthancPluginStorageReadRange readRange;
OrthancPluginStorageRemove remove;
} _OrthancPluginRegisterStorageArea2;
ORTHANC_PLUGIN_INLINE void OrthancPluginRegisterStorageArea2(
OrthancPluginContext* context,
OrthancPluginStorageCreate create,
OrthancPluginStorageReadWhole readWhole,
OrthancPluginStorageReadRange readRange,
OrthancPluginStorageRemove remove)
{
_OrthancPluginRegisterStorageArea2 params;
params.create = create;
params.readWhole = readWhole;
params.readRange = readRange;
params.remove = remove;
context->InvokeService(context, _OrthancPluginService_RegisterStorageArea2, &params);
}
typedef struct
{
_OrthancPluginCreateDicom createDicom;
const char* privateCreator;
} _OrthancPluginCreateDicom2;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginCreateDicom2(
OrthancPluginContext* context,
OrthancPluginMemoryBuffer* target,
const char* json,
const OrthancPluginImage* pixelData,
OrthancPluginCreateDicomFlags flags,
const char* privateCreator)
{
_OrthancPluginCreateDicom2 params;
params.createDicom.target = target;
params.createDicom.json = json;
params.createDicom.pixelData = pixelData;
params.createDicom.flags = flags;
params.privateCreator = privateCreator;
return context->InvokeService(context, _OrthancPluginService_CreateDicom2, &params);
}
typedef struct
{
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;
} _OrthancPluginCallRestApi;
ORTHANC_PLUGIN_INLINE 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)
{
_OrthancPluginCallRestApi params;
memset(&params, 0, sizeof(params));
params.answerBody = answerBody;
params.answerHeaders = answerHeaders;
params.httpStatus = httpStatus;
params.method = method;
params.uri = uri;
params.headersCount = headersCount;
params.headersKeys = headersKeys;
params.headersValues = headersValues;
params.body = body;
params.bodySize = bodySize;
params.afterPlugins = afterPlugins;
return context->InvokeService(context, _OrthancPluginService_CallRestApi, &params);
}
typedef struct _OrthancPluginWebDavCollection_t OrthancPluginWebDavCollection;
typedef OrthancPluginErrorCode (*OrthancPluginWebDavAddFile) (
OrthancPluginWebDavCollection* collection,
const char* name,
uint64_t size,
const char* mimeType,
const char* dateTime);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavAddFolder) (
OrthancPluginWebDavCollection* collection,
const char* name,
const char* dateTime);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavRetrieveFile) (
OrthancPluginWebDavCollection* collection,
const void* data,
uint64_t size,
const char* mimeType,
const char* dateTime);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavIsExistingFolderCallback) (
uint8_t* isExisting, /* out */
uint32_t pathSize,
const char* const* pathItems,
void* payload);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavListFolderCallback) (
uint8_t* isExisting, /* out */
OrthancPluginWebDavCollection* collection,
OrthancPluginWebDavAddFile addFile,
OrthancPluginWebDavAddFolder addFolder,
uint32_t pathSize,
const char* const* pathItems,
void* payload);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavRetrieveFileCallback) (
OrthancPluginWebDavCollection* collection,
OrthancPluginWebDavRetrieveFile retrieveFile,
uint32_t pathSize,
const char* const* pathItems,
void* payload);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavStoreFileCallback) (
uint8_t* isReadOnly, /* out */
uint32_t pathSize,
const char* const* pathItems,
const void* data,
uint64_t size,
void* payload);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavCreateFolderCallback) (
uint8_t* isReadOnly, /* out */
uint32_t pathSize,
const char* const* pathItems,
void* payload);
typedef OrthancPluginErrorCode (*OrthancPluginWebDavDeleteItemCallback) (
uint8_t* isReadOnly, /* out */
uint32_t pathSize,
const char* const* pathItems,
void* payload);
typedef struct
{
const char* uri;
OrthancPluginWebDavIsExistingFolderCallback isExistingFolder;
OrthancPluginWebDavListFolderCallback listFolder;
OrthancPluginWebDavRetrieveFileCallback retrieveFile;
OrthancPluginWebDavStoreFileCallback storeFile;
OrthancPluginWebDavCreateFolderCallback createFolder;
OrthancPluginWebDavDeleteItemCallback deleteItem;
void* payload;
} _OrthancPluginRegisterWebDavCollection;
ORTHANC_PLUGIN_INLINE OrthancPluginErrorCode OrthancPluginRegisterWebDavCollection(
OrthancPluginContext* context,
const char* uri,
OrthancPluginWebDavIsExistingFolderCallback isExistingFolder,
OrthancPluginWebDavListFolderCallback listFolder,
OrthancPluginWebDavRetrieveFileCallback retrieveFile,
OrthancPluginWebDavStoreFileCallback storeFile,
OrthancPluginWebDavCreateFolderCallback createFolder,
OrthancPluginWebDavDeleteItemCallback deleteItem,
void* payload)
{
_OrthancPluginRegisterWebDavCollection params;
params.uri = uri;
params.isExistingFolder = isExistingFolder;
params.listFolder = listFolder;
params.retrieveFile = retrieveFile;
params.storeFile = storeFile;
params.createFolder = createFolder;
params.deleteItem = deleteItem;
params.payload = payload;
return context->InvokeService(context, _OrthancPluginService_RegisterWebDavCollection, &params);
}
ORTHANC_PLUGIN_INLINE const char* OrthancPluginGetDatabaseServerIdentifier(
OrthancPluginContext* context)
{
const char* result;
_OrthancPluginRetrieveStaticString params;
params.result = &result;
params.argument = NULL;
if (context->InvokeService(context, _OrthancPluginService_GetDatabaseServerIdentifier, &params) != OrthancPluginErrorCode_Success)
{
/* Error */
return NULL;
}
else
{
return result;
}
}
#ifdef __cplusplus
}
#endif
OrthancPluginReceivedInstanceCallback
OrthancPluginReceivedInstanceAction(* OrthancPluginReceivedInstanceCallback)(OrthancPluginMemoryBuffer64 *modifiedDicomBuffer, const void *receivedDicomBuffer, uint64_t receivedDicomBufferSize, OrthancPluginInstanceOrigin origin)
Callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-STORE or REST...
Definition OrthancCPlugin.h:7884
OrthancPluginWebDavAddFile
OrthancPluginErrorCode(* OrthancPluginWebDavAddFile)(OrthancPluginWebDavCollection *collection, const char *name, uint64_t size, const char *mimeType, const char *dateTime)
Declare a file while returning the content of a folder.
Definition OrthancCPlugin.h:8759
OrthancPluginCheckVersionAdvanced
int OrthancPluginCheckVersionAdvanced(OrthancPluginContext *context, int expectedMajor, int expectedMinor, int expectedRevision)
Check that the version of the hosting Orthanc is above a given version.
Definition OrthancCPlugin.h:1836
OrthancPluginRegisterStorageArea
void OrthancPluginRegisterStorageArea(OrthancPluginContext *context, OrthancPluginStorageCreate create, OrthancPluginStorageRead read, OrthancPluginStorageRemove remove)
Register a custom storage area.
Definition OrthancCPlugin.h:3174
OrthancPluginRegisterOnStoredInstanceCallback
void OrthancPluginRegisterOnStoredInstanceCallback(OrthancPluginContext *context, OrthancPluginOnStoredInstanceCallback callback)
Register a callback for received instances.
Definition OrthancCPlugin.h:2139
OrthancPluginDicomWebSetBinaryNode
void(* OrthancPluginDicomWebSetBinaryNode)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebBinaryMode mode, const char *bulkDataUri)
Signature of a function to set the content of a node encoding a binary DICOM tag, into a JSON or XML ...
Definition OrthancCPlugin.h:1224
OrthancPluginRegisterDecodeImageCallback
OrthancPluginErrorCode OrthancPluginRegisterDecodeImageCallback(OrthancPluginContext *context, OrthancPluginDecodeImageCallback callback)
Register a callback to handle the decoding of DICOM images.
Definition OrthancCPlugin.h:5400
OrthancPluginChangeType
OrthancPluginChangeType
Definition OrthancCPlugin.h:730
OrthancPluginStorageReadWhole
OrthancPluginErrorCode(* OrthancPluginStorageReadWhole)(OrthancPluginMemoryBuffer64 *target, const char *uuid, OrthancPluginContentType type)
Callback for reading a whole file from the storage area.
Definition OrthancCPlugin.h:1290
OrthancPluginRegisterIncomingCStoreInstanceFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingCStoreInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingCStoreInstanceFilter callback)
Register a callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition OrthancCPlugin.h:7839
OrthancPluginCheckVersion
int OrthancPluginCheckVersion(OrthancPluginContext *context)
Check the compatibility of the plugin wrt. the version of its hosting Orthanc.
Definition OrthancCPlugin.h:1942
OrthancPluginDecodeImageCallback
OrthancPluginErrorCode(* OrthancPluginDecodeImageCallback)(OrthancPluginImage **target, const void *dicom, const uint32_t size, uint32_t frameIndex)
Signature of a callback function to decode a DICOM instance as an image.
Definition OrthancCPlugin.h:1202
OrthancPluginRegisterRefreshMetricsCallback
void OrthancPluginRegisterRefreshMetricsCallback(OrthancPluginContext *context, OrthancPluginRefreshMetricsCallback callback)
Register a callback to refresh the metrics.
Definition OrthancCPlugin.h:6970
OrthancPluginWebDavCreateFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavCreateFolderCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback to create a folder.
Definition OrthancCPlugin.h:8924
OrthancPluginWebDavCollection
struct _OrthancPluginWebDavCollection_t OrthancPluginWebDavCollection
Opaque structure that represents a WebDAV collection.
Definition OrthancCPlugin.h:8740
OrthancPluginDicomWebBinaryCallback
void(* OrthancPluginDicomWebBinaryCallback)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebSetBinaryNode setter, uint32_t levelDepth, const uint16_t *levelTagGroup, const uint16_t *levelTagElement, const uint32_t *levelIndex, uint16_t tagGroup, uint16_t tagElement, OrthancPluginValueRepresentation vr)
Callback executed to encode a binary tag in DICOMweb.
Definition OrthancCPlugin.h:1717
OrthancPluginWebDavRetrieveFileCallback
OrthancPluginErrorCode(* OrthancPluginWebDavRetrieveFileCallback)(OrthancPluginWebDavCollection *collection, OrthancPluginWebDavRetrieveFile retrieveFile, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for retrieving the content of a file.
Definition OrthancCPlugin.h:8879
OrthancPluginIncomingDicomInstanceFilter
int32_t(* OrthancPluginIncomingDicomInstanceFilter)(const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc.
Definition OrthancCPlugin.h:7755
OrthancPluginStorageAreaRemove
OrthancPluginErrorCode OrthancPluginStorageAreaRemove(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Remove a file from the storage area.
Definition OrthancCPlugin.h:4758
OrthancPluginTranscoderCallback
OrthancPluginErrorCode(* OrthancPluginTranscoderCallback)(OrthancPluginMemoryBuffer *transcoded, const void *buffer, uint64_t size, const char *const *allowedSyntaxes, uint32_t countSyntaxes, uint8_t allowNewSopInstanceUid)
Signature of a callback function to transcode a DICOM instance.
Definition OrthancCPlugin.h:8404
OrthancPluginRegisterIncomingHttpRequestFilter2
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter2(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter2 callback)
Register a callback to filter incoming HTTP requests.
Definition OrthancCPlugin.h:6303
OrthancPluginWebDavRetrieveFile
OrthancPluginErrorCode(* OrthancPluginWebDavRetrieveFile)(OrthancPluginWebDavCollection *collection, const void *data, uint64_t size, const char *mimeType, const char *dateTime)
Retrieve the content of a file.
Definition OrthancCPlugin.h:8807
OrthancPluginStorageRead
OrthancPluginErrorCode(* OrthancPluginStorageRead)(void **content, int64_t *size, const char *uuid, OrthancPluginContentType type)
Callback for reading from the storage area.
Definition OrthancCPlugin.h:1270
OrthancPluginRegisterRestCallback
void OrthancPluginRegisterRestCallback(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback.
Definition OrthancCPlugin.h:2061
OrthancPluginGetExpectedDatabaseVersion
uint32_t OrthancPluginGetExpectedDatabaseVersion(OrthancPluginContext *context)
Get the expected version of the database schema.
Definition OrthancCPlugin.h:3562
OrthancPluginRegisterReceivedInstanceCallback
OrthancPluginErrorCode OrthancPluginRegisterReceivedInstanceCallback(OrthancPluginContext *context, OrthancPluginReceivedInstanceCallback callback)
Register a callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-ST...
Definition OrthancCPlugin.h:7916
OrthancPluginWebDavListFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavListFolderCallback)(uint8_t *isExisting, OrthancPluginWebDavCollection *collection, OrthancPluginWebDavAddFile addFile, OrthancPluginWebDavAddFolder addFolder, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for listing the content of a folder.
Definition OrthancCPlugin.h:8853
OrthancPluginJobsUnserializer
OrthancPluginJob *(* OrthancPluginJobsUnserializer)(const char *jobType, const char *serialized)
Callback executed to unserialize a custom job.
Definition OrthancCPlugin.h:1671
OrthancPluginRestOutput
struct _OrthancPluginRestOutput_t OrthancPluginRestOutput
Opaque structure that represents the HTTP connection to the client application.
Definition OrthancCPlugin.h:1073
OrthancPluginRegisterOnChangeCallback
void OrthancPluginRegisterOnChangeCallback(OrthancPluginContext *context, OrthancPluginOnChangeCallback callback)
Register a callback to monitor changes.
Definition OrthancCPlugin.h:3317
OrthancPluginRegisterStorageArea2
void OrthancPluginRegisterStorageArea2(OrthancPluginContext *context, OrthancPluginStorageCreate create, OrthancPluginStorageReadWhole readWhole, OrthancPluginStorageReadRange readRange, OrthancPluginStorageRemove remove)
Register a custom storage area, with support for range request.
Definition OrthancCPlugin.h:8587
OrthancPluginWebDavAddFolder
OrthancPluginErrorCode(* OrthancPluginWebDavAddFolder)(OrthancPluginWebDavCollection *collection, const char *name, const char *dateTime)
Declare a subfolder while returning the content of a folder.
Definition OrthancCPlugin.h:8780
OrthancPluginRegisterWebDavCollection
OrthancPluginErrorCode OrthancPluginRegisterWebDavCollection(OrthancPluginContext *context, const char *uri, OrthancPluginWebDavIsExistingFolderCallback isExistingFolder, OrthancPluginWebDavListFolderCallback listFolder, OrthancPluginWebDavRetrieveFileCallback retrieveFile, OrthancPluginWebDavStoreFileCallback storeFile, OrthancPluginWebDavCreateFolderCallback createFolder, OrthancPluginWebDavDeleteItemCallback deleteItem, void *payload)
Register a WebDAV virtual filesystem.
Definition OrthancCPlugin.h:8983
OrthancPluginIncomingHttpRequestFilter2
int32_t(* OrthancPluginIncomingHttpRequestFilter2)(OrthancPluginHttpMethod method, const char *uri, const char *ip, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, uint32_t getArgumentsCount, const char *const *getArgumentsKeys, const char *const *getArgumentsValues)
Callback to filter incoming HTTP requests received by Orthanc.
Definition OrthancCPlugin.h:1416
OrthancPluginRestCallback
OrthancPluginErrorCode(* OrthancPluginRestCallback)(OrthancPluginRestOutput *output, const char *url, const OrthancPluginHttpRequest *request)
Signature of a callback function that answers to a REST request.
Definition OrthancCPlugin.h:1170
OrthancPluginRefreshMetricsCallback
void(* OrthancPluginRefreshMetricsCallback)()
Callback executed to update the metrics of the plugin.
Definition OrthancCPlugin.h:1689
OrthancPluginRegisterTranscoderCallback
OrthancPluginErrorCode OrthancPluginRegisterTranscoderCallback(OrthancPluginContext *context, OrthancPluginTranscoderCallback callback)
Register a callback to handle the transcoding of DICOM images.
Definition OrthancCPlugin.h:8431
OrthancPluginOnStoredInstanceCallback
OrthancPluginErrorCode(* OrthancPluginOnStoredInstanceCallback)(const OrthancPluginDicomInstance *instance, const char *instanceId)
Signature of a callback function that is triggered when Orthanc stores a new DICOM instance.
Definition OrthancCPlugin.h:1181
OrthancPluginWebDavStoreFileCallback
OrthancPluginErrorCode(* OrthancPluginWebDavStoreFileCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, const void *data, uint64_t size, void *payload)
Callback to store a file.
Definition OrthancCPlugin.h:8902
OrthancPluginWebDavDeleteItemCallback
OrthancPluginErrorCode(* OrthancPluginWebDavDeleteItemCallback)(uint8_t *isReadOnly, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback to remove a file or a folder.
Definition OrthancCPlugin.h:8944
OrthancPluginReconstructMainDicomTags
OrthancPluginErrorCode OrthancPluginReconstructMainDicomTags(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, OrthancPluginResourceType level)
Reconstruct the main DICOM tags.
Definition OrthancCPlugin.h:4950
OrthancPluginStorageRemove
OrthancPluginErrorCode(* OrthancPluginStorageRemove)(const char *uuid, OrthancPluginContentType type)
Callback for removing a file from the storage area.
Definition OrthancCPlugin.h:1331
OrthancPluginStorageCreate
OrthancPluginErrorCode(* OrthancPluginStorageCreate)(const char *uuid, const void *content, int64_t size, OrthancPluginContentType type)
Callback for writing to the storage area.
Definition OrthancCPlugin.h:1243
OrthancPluginDicomWebBinaryCallback2
void(* OrthancPluginDicomWebBinaryCallback2)(OrthancPluginDicomWebNode *node, OrthancPluginDicomWebSetBinaryNode setter, uint32_t levelDepth, const uint16_t *levelTagGroup, const uint16_t *levelTagElement, const uint32_t *levelIndex, uint16_t tagGroup, uint16_t tagElement, OrthancPluginValueRepresentation vr, void *payload)
Callback executed to encode a binary tag in DICOMweb.
Definition OrthancCPlugin.h:1755
OrthancPluginOnChangeCallback
OrthancPluginErrorCode(* OrthancPluginOnChangeCallback)(OrthancPluginChangeType changeType, OrthancPluginResourceType resourceType, const char *resourceId)
Signature of a callback function that is triggered when a change happens to some DICOM resource.
Definition OrthancCPlugin.h:1191
OrthancPluginServerChunkedRequestReader
struct _OrthancPluginServerChunkedRequestReader_t OrthancPluginServerChunkedRequestReader
Opaque structure that reads the content of a HTTP request body during a chunked HTTP transfer.
Definition OrthancCPlugin.h:7418
OrthancPluginWebDavIsExistingFolderCallback
OrthancPluginErrorCode(* OrthancPluginWebDavIsExistingFolderCallback)(uint8_t *isExisting, uint32_t pathSize, const char *const *pathItems, void *payload)
Callback for testing the existence of a folder.
Definition OrthancCPlugin.h:8828
OrthancPluginIncomingHttpRequestFilter
int32_t(* OrthancPluginIncomingHttpRequestFilter)(OrthancPluginHttpMethod method, const char *uri, const char *ip, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues)
Callback to filter incoming HTTP requests received by Orthanc.
Definition OrthancCPlugin.h:1381
OrthancPluginRegisterJobsUnserializer
void OrthancPluginRegisterJobsUnserializer(OrthancPluginContext *context, OrthancPluginJobsUnserializer unserializer)
Register an unserializer for custom jobs.
Definition OrthancCPlugin.h:6828
OrthancPluginFree
void(* OrthancPluginFree)(void *buffer)
Signature of a function to free dynamic memory.
Definition OrthancCPlugin.h:1214
OrthancPluginRegisterRestCallbackNoLock
void OrthancPluginRegisterRestCallbackNoLock(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback callback)
Register a REST callback, without locking.
Definition OrthancCPlugin.h:2101
OrthancPluginStorageAreaRead
OrthancPluginErrorCode OrthancPluginStorageAreaRead(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginStorageArea *storageArea, const char *uuid, OrthancPluginContentType type)
Read a file from the storage area.
Definition OrthancCPlugin.h:4719
OrthancPluginStorageReadRange
OrthancPluginErrorCode(* OrthancPluginStorageReadRange)(OrthancPluginMemoryBuffer64 *target, const char *uuid, OrthancPluginContentType type, uint64_t rangeStart)
Callback for reading a range of a file from the storage area.
Definition OrthancCPlugin.h:1313
OrthancPluginRegisterChunkedRestCallback
void OrthancPluginRegisterChunkedRestCallback(OrthancPluginContext *context, const char *pathRegularExpression, OrthancPluginRestCallback getHandler, OrthancPluginServerChunkedRequestReaderFactory postHandler, OrthancPluginRestCallback deleteHandler, OrthancPluginServerChunkedRequestReaderFactory putHandler, OrthancPluginServerChunkedRequestReaderAddChunk addChunk, OrthancPluginServerChunkedRequestReaderExecute execute, OrthancPluginServerChunkedRequestReaderFinalize finalize)
Register a REST callback to handle chunked HTTP transfers.
Definition OrthancCPlugin.h:7539
OrthancPluginIncomingCStoreInstanceFilter
int32_t(* OrthancPluginIncomingCStoreInstanceFilter)(uint16_t *dimseStatus, const OrthancPluginDicomInstance *instance)
Callback to filter incoming DICOM instances received by Orthanc through C-STORE.
Definition OrthancCPlugin.h:7817
OrthancPluginRegisterIncomingDicomInstanceFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingDicomInstanceFilter(OrthancPluginContext *context, OrthancPluginIncomingDicomInstanceFilter callback)
Register a callback to filter incoming DICOM instances.
Definition OrthancCPlugin.h:7776
OrthancPluginRegisterIncomingHttpRequestFilter
OrthancPluginErrorCode OrthancPluginRegisterIncomingHttpRequestFilter(OrthancPluginContext *context, OrthancPluginIncomingHttpRequestFilter callback)
Register a callback to filter incoming HTTP requests.
Definition OrthancCPlugin.h:5736
OrthancPluginStorageAreaCreate
OrthancPluginErrorCode OrthancPluginStorageAreaCreate(OrthancPluginContext *context, OrthancPluginStorageArea *storageArea, const char *uuid, const void *content, uint64_t size, OrthancPluginContentType type)
Create a file inside the storage area.
Definition OrthancCPlugin.h:4675
OrthancPluginChangeType_OrthancStopped
@ OrthancPluginChangeType_OrthancStopped
Definition OrthancCPlugin.h:742
OrthancPluginChangeType_OrthancStarted
@ OrthancPluginChangeType_OrthancStarted
Definition OrthancCPlugin.h:741
OrthancPluginChangeType_Deleted
@ OrthancPluginChangeType_Deleted
Definition OrthancCPlugin.h:732
OrthancPluginChangeType_JobFailure
@ OrthancPluginChangeType_JobFailure
Definition OrthancCPlugin.h:749
OrthancPluginChangeType_NewInstance
@ OrthancPluginChangeType_NewInstance
Definition OrthancCPlugin.h:734
OrthancPluginChangeType_NewPatient
@ OrthancPluginChangeType_NewPatient
Definition OrthancCPlugin.h:735
OrthancPluginChangeType_JobSubmitted
@ OrthancPluginChangeType_JobSubmitted
Definition OrthancCPlugin.h:747
OrthancPluginChangeType_NewSeries
@ OrthancPluginChangeType_NewSeries
Definition OrthancCPlugin.h:736
OrthancPluginChangeType_StablePatient
@ OrthancPluginChangeType_StablePatient
Definition OrthancCPlugin.h:738
OrthancPluginChangeType_UpdatedPeers
@ OrthancPluginChangeType_UpdatedPeers
Definition OrthancCPlugin.h:745
OrthancPluginChangeType_StableStudy
@ OrthancPluginChangeType_StableStudy
Definition OrthancCPlugin.h:740
OrthancPluginChangeType_CompletedSeries
@ OrthancPluginChangeType_CompletedSeries
Definition OrthancCPlugin.h:731
OrthancPluginChangeType_NewChildInstance
@ OrthancPluginChangeType_NewChildInstance
Definition OrthancCPlugin.h:733
OrthancPluginChangeType_UpdatedAttachment
@ OrthancPluginChangeType_UpdatedAttachment
Definition OrthancCPlugin.h:743
OrthancPluginChangeType_UpdatedMetadata
@ OrthancPluginChangeType_UpdatedMetadata
Definition OrthancCPlugin.h:744
OrthancPluginChangeType_StableSeries
@ OrthancPluginChangeType_StableSeries
Definition OrthancCPlugin.h:739
OrthancPluginChangeType_UpdatedModalities
@ OrthancPluginChangeType_UpdatedModalities
Definition OrthancCPlugin.h:746
OrthancPluginChangeType_JobSuccess
@ OrthancPluginChangeType_JobSuccess
Definition OrthancCPlugin.h:748
OrthancPluginChangeType_NewStudy
@ OrthancPluginChangeType_NewStudy
Definition OrthancCPlugin.h:737
OrthancPluginGetFindQuerySize
uint32_t OrthancPluginGetFindQuerySize(OrthancPluginContext *context, const OrthancPluginFindQuery *query)
Get the number of tags in a C-Find query.
Definition OrthancCPlugin.h:5997
OrthancPluginFindQuery
struct _OrthancPluginFindQuery_t OrthancPluginFindQuery
Opaque structure to an object that represents a C-Find query.
Definition OrthancCPlugin.h:1121
OrthancPluginApplyMove
OrthancPluginErrorCode(* OrthancPluginApplyMove)(void *moveDriver)
Callback to apply one C-Move suboperation.
Definition OrthancCPlugin.h:1526
OrthancPluginFindMarkIncomplete
OrthancPluginErrorCode OrthancPluginFindMarkIncomplete(OrthancPluginContext *context, OrthancPluginFindAnswers *answers)
Mark the set of C-Find answers as incomplete.
Definition OrthancCPlugin.h:5973
OrthancPluginStorageCommitmentDestructor
void(* OrthancPluginStorageCommitmentDestructor)(void *handler)
Callback to free one storage commitment SCP handler.
Definition OrthancCPlugin.h:7667
OrthancPluginWorklistCallback
OrthancPluginErrorCode(* OrthancPluginWorklistCallback)(OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const char *issuerAet, const char *calledAet)
Callback to handle the C-Find SCP requests for worklists.
Definition OrthancCPlugin.h:1350
OrthancPluginRegisterMoveCallback
OrthancPluginErrorCode OrthancPluginRegisterMoveCallback(OrthancPluginContext *context, OrthancPluginMoveCallback callback, OrthancPluginGetMoveSize getMoveSize, OrthancPluginApplyMove applyMove, OrthancPluginFreeMove freeMove)
Register a callback to handle C-Move requests.
Definition OrthancCPlugin.h:6151
OrthancPluginGetFindQueryValue
char * OrthancPluginGetFindQueryValue(OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index)
Get the value associated with one tag in a C-Find query.
Definition OrthancCPlugin.h:6103
OrthancPluginStorageCommitmentFactory
OrthancPluginErrorCode(* OrthancPluginStorageCommitmentFactory)(void **handler, const char *jobId, const char *transactionUid, const char *const *sopClassUids, const char *const *sopInstanceUids, uint32_t countInstances, const char *remoteAet, const char *calledAet)
Callback executed by the storage commitment SCP.
Definition OrthancCPlugin.h:7645
OrthancPluginRegisterFindCallback
OrthancPluginErrorCode OrthancPluginRegisterFindCallback(OrthancPluginContext *context, OrthancPluginFindCallback callback)
Register a callback to handle C-Find requests.
Definition OrthancCPlugin.h:5905
OrthancPluginWorklistGetDicomQuery
OrthancPluginErrorCode OrthancPluginWorklistGetDicomQuery(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginWorklistQuery *query)
Retrieve the worklist query as a DICOM file.
Definition OrthancCPlugin.h:5282
OrthancPluginStorageCommitmentLookup
OrthancPluginErrorCode(* OrthancPluginStorageCommitmentLookup)(OrthancPluginStorageCommitmentFailureReason *target, void *handler, const char *sopClassUid, const char *sopInstanceUid)
Callback to get the status of one DICOM instance in the storage commitment SCP.
Definition OrthancCPlugin.h:7688
OrthancPluginWorklistIsMatch
int32_t OrthancPluginWorklistIsMatch(OrthancPluginContext *context, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size)
Test whether a worklist matches the query.
Definition OrthancCPlugin.h:5243
OrthancPluginFindAddAnswer
OrthancPluginErrorCode OrthancPluginFindAddAnswer(OrthancPluginContext *context, OrthancPluginFindAnswers *answers, const void *dicom, uint32_t size)
Add one answer to some C-Find request.
Definition OrthancCPlugin.h:5944
OrthancPluginRegisterStorageCommitmentScpCallback
OrthancPluginErrorCode OrthancPluginRegisterStorageCommitmentScpCallback(OrthancPluginContext *context, OrthancPluginStorageCommitmentFactory factory, OrthancPluginStorageCommitmentDestructor destructor, OrthancPluginStorageCommitmentLookup lookup)
Register a callback to handle incoming requests to the storage commitment SCP.
Definition OrthancCPlugin.h:7715
OrthancPluginFindAnswers
struct _OrthancPluginFindAnswers_t OrthancPluginFindAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition OrthancCPlugin.h:1129
OrthancPluginWorklistAnswers
struct _OrthancPluginWorklistAnswers_t OrthancPluginWorklistAnswers
Opaque structure to an object that represents the answers to a C-Find query for worklists.
Definition OrthancCPlugin.h:1113
OrthancPluginFindCallback
OrthancPluginErrorCode(* OrthancPluginFindCallback)(OrthancPluginFindAnswers *answers, const OrthancPluginFindQuery *query, const char *issuerAet, const char *calledAet)
Callback to handle incoming C-Find SCP requests.
Definition OrthancCPlugin.h:1443
OrthancPluginGetMoveSize
uint32_t(* OrthancPluginGetMoveSize)(void *moveDriver)
Callback to read the size of a C-Move driver.
Definition OrthancCPlugin.h:1511
OrthancPluginRegisterWorklistCallback
OrthancPluginErrorCode OrthancPluginRegisterWorklistCallback(OrthancPluginContext *context, OrthancPluginWorklistCallback callback)
Register a callback to handle modality worklists requests.
Definition OrthancCPlugin.h:5139
OrthancPluginGetFindQueryTagName
char * OrthancPluginGetFindQueryTagName(OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index)
Get the symbolic name of one tag in a C-Find query.
Definition OrthancCPlugin.h:6065
OrthancPluginWorklistMarkIncomplete
OrthancPluginErrorCode OrthancPluginWorklistMarkIncomplete(OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers)
Mark the set of worklist answers as incomplete.
Definition OrthancCPlugin.h:5205
OrthancPluginGetFindQueryTag
OrthancPluginErrorCode OrthancPluginGetFindQueryTag(OrthancPluginContext *context, uint16_t *group, uint16_t *element, const OrthancPluginFindQuery *query, uint32_t index)
Get one tag in a C-Find query.
Definition OrthancCPlugin.h:6034
OrthancPluginFreeMove
void(* OrthancPluginFreeMove)(void *moveDriver)
Callback to free one C-Move driver.
Definition OrthancCPlugin.h:1540
OrthancPluginWorklistQuery
struct _OrthancPluginWorklistQuery_t OrthancPluginWorklistQuery
Opaque structure to an object that represents a C-Find query for worklists.
Definition OrthancCPlugin.h:1105
OrthancPluginMoveCallback
void *(* OrthancPluginMoveCallback)(OrthancPluginResourceType resourceType, const char *patientId, const char *accessionNumber, const char *studyInstanceUid, const char *seriesInstanceUid, const char *sopInstanceUid, const char *originatorAet, const char *sourceAet, const char *targetAet, uint16_t originatorId)
Callback to handle incoming C-Move SCP requests.
Definition OrthancCPlugin.h:1486
OrthancPluginWorklistAddAnswer
OrthancPluginErrorCode OrthancPluginWorklistAddAnswer(OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size)
Add one answer to some modality worklist request.
Definition OrthancCPlugin.h:5175
OrthancPluginHasInstancePixelData
int32_t OrthancPluginHasInstancePixelData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Check whether the DICOM file has pixel data.
Definition OrthancCPlugin.h:7974
OrthancPluginGetInstanceDicomWebXml
char * OrthancPluginGetInstanceDicomWebXml(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:8359
OrthancPluginDicomInstance
struct _OrthancPluginDicomInstance_t OrthancPluginDicomInstance
Opaque structure that represents a DICOM instance that is managed by the Orthanc core.
Definition OrthancCPlugin.h:1081
OrthancPluginGetInstanceRawFrame
OrthancPluginErrorCode OrthancPluginGetInstanceRawFrame(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginDicomInstance *instance, uint32_t frameIndex)
Get the raw content of a frame in a DICOM instance.
Definition OrthancCPlugin.h:8139
OrthancPluginGetInstanceRemoteAet
const char * OrthancPluginGetInstanceRemoteAet(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the AET of a DICOM instance.
Definition OrthancCPlugin.h:2905
OrthancPluginGetInstanceJson
char * OrthancPluginGetInstanceJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file.
Definition OrthancCPlugin.h:3007
OrthancPluginTranscodeDicomInstance
OrthancPluginDicomInstance * OrthancPluginTranscodeDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size, const char *transferSyntax)
Parse and transcode a DICOM instance.
Definition OrthancCPlugin.h:8206
OrthancPluginCreateDicomInstance
OrthancPluginDicomInstance * OrthancPluginCreateDicomInstance(OrthancPluginContext *context, const void *buffer, uint32_t size)
Parse a DICOM instance.
Definition OrthancCPlugin.h:8024
OrthancPluginGetInstanceFramesCount
uint32_t OrthancPluginGetInstanceFramesCount(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the number of frames in a DICOM instance.
Definition OrthancCPlugin.h:8099
OrthancPluginGetInstanceOrigin
OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the origin of a DICOM file.
Definition OrthancCPlugin.h:5308
OrthancPluginGetInstanceSize
int64_t OrthancPluginGetInstanceSize(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the size of a DICOM file.
Definition OrthancCPlugin.h:2938
OrthancPluginGetInstanceDicomWebJson
char * OrthancPluginGetInstanceDicomWebJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:8319
OrthancPluginGetInstanceTransferSyntaxUid
char * OrthancPluginGetInstanceTransferSyntaxUid(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the transfer syntax of a DICOM file.
Definition OrthancCPlugin.h:7939
OrthancPluginHasInstanceMetadata
int OrthancPluginHasInstanceMetadata(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, const char *metadata)
Check whether a DICOM instance is associated with some metadata.
Definition OrthancCPlugin.h:3084
OrthancPluginFreeDicomInstance
void OrthancPluginFreeDicomInstance(OrthancPluginContext *context, OrthancPluginDicomInstance *dicom)
Free a DICOM instance.
Definition OrthancCPlugin.h:8062
OrthancPluginSerializeDicomInstance
OrthancPluginErrorCode OrthancPluginSerializeDicomInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginDicomInstance *instance)
Writes a DICOM instance to a memory buffer.
Definition OrthancCPlugin.h:8244
OrthancPluginGetInstanceMetadata
const char * OrthancPluginGetInstanceMetadata(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, const char *metadata)
Get the value of some metadata associated with a given DICOM instance.
Definition OrthancCPlugin.h:3125
OrthancPluginGetInstanceSimplifiedJson
char * OrthancPluginGetInstanceSimplifiedJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the DICOM tag hierarchy as a JSON file (with simplification).
Definition OrthancCPlugin.h:3045
OrthancPluginGetInstanceData
const void * OrthancPluginGetInstanceData(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance)
Get the data of a DICOM file.
Definition OrthancCPlugin.h:2971
OrthancPluginGetInstanceDecodedFrame
OrthancPluginImage * OrthancPluginGetInstanceDecodedFrame(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition OrthancCPlugin.h:8167
OrthancPluginGetInstanceAdvancedJson
char * OrthancPluginGetInstanceAdvancedJson(OrthancPluginContext *context, const OrthancPluginDicomInstance *instance, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM memory buffer as a JSON string.
Definition OrthancCPlugin.h:8276
OrthancPluginConvertPixelFormat
OrthancPluginImage * OrthancPluginConvertPixelFormat(OrthancPluginContext *context, const OrthancPluginImage *source, OrthancPluginPixelFormat targetFormat)
Change the pixel format of an image.
Definition OrthancCPlugin.h:4461
OrthancPluginPixelFormat
OrthancPluginPixelFormat
Definition OrthancCPlugin.h:606
OrthancPluginDrawText
OrthancPluginErrorCode OrthancPluginDrawText(OrthancPluginContext *context, OrthancPluginImage *image, uint32_t fontIndex, const char *utf8Text, int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b)
Draw text on an image.
Definition OrthancCPlugin.h:4621
OrthancPluginCompressJpegImage
OrthancPluginErrorCode OrthancPluginCompressJpegImage(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer, uint8_t quality)
Encode a JPEG image.
Definition OrthancCPlugin.h:4205
OrthancPluginGetImagePitch
uint32_t OrthancPluginGetImagePitch(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pitch of an image.
Definition OrthancCPlugin.h:3996
OrthancPluginGetImagePixelFormat
OrthancPluginPixelFormat OrthancPluginGetImagePixelFormat(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the pixel format of an image.
Definition OrthancCPlugin.h:3895
OrthancPluginCreateImage
OrthancPluginImage * OrthancPluginCreateImage(OrthancPluginContext *context, OrthancPluginPixelFormat format, uint32_t width, uint32_t height)
Create an image.
Definition OrthancCPlugin.h:5438
OrthancPluginGetFontsCount
uint32_t OrthancPluginGetFontsCount(OrthancPluginContext *context)
Return the number of available fonts.
Definition OrthancCPlugin.h:4496
OrthancPluginGetImageHeight
uint32_t OrthancPluginGetImageHeight(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the height of an image.
Definition OrthancCPlugin.h:3961
OrthancPluginGetImageBuffer
void * OrthancPluginGetImageBuffer(OrthancPluginContext *context, const OrthancPluginImage *image)
Return a pointer to the content of an image.
Definition OrthancCPlugin.h:4030
OrthancPluginFreeImage
void OrthancPluginFreeImage(OrthancPluginContext *context, OrthancPluginImage *image)
Free an image.
Definition OrthancCPlugin.h:4115
OrthancPluginCompressPngImage
OrthancPluginErrorCode OrthancPluginCompressPngImage(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer)
Encode a PNG image.
Definition OrthancCPlugin.h:4160
OrthancPluginDecodeDicomImage
OrthancPluginImage * OrthancPluginDecodeDicomImage(OrthancPluginContext *context, const void *buffer, uint32_t bufferSize, uint32_t frameIndex)
Decode one frame from a DICOM instance.
Definition OrthancCPlugin.h:5527
OrthancPluginUncompressImage
OrthancPluginImage * OrthancPluginUncompressImage(OrthancPluginContext *context, const void *data, uint32_t size, OrthancPluginImageFormat format)
Decode a compressed image.
Definition OrthancCPlugin.h:4073
OrthancPluginGetFontName
const char * OrthancPluginGetFontName(OrthancPluginContext *context, uint32_t fontIndex)
Return the name of a font.
Definition OrthancCPlugin.h:4536
OrthancPluginImageFormat
OrthancPluginImageFormat
Definition OrthancCPlugin.h:775
OrthancPluginStorageArea
struct _OrthancPluginStorageArea_t OrthancPluginStorageArea
Opaque structure that represents the storage area that is actually used by Orthanc.
Definition OrthancCPlugin.h:1097
OrthancPluginCompressionType
OrthancPluginCompressionType
Definition OrthancCPlugin.h:760
OrthancPluginGetImageWidth
uint32_t OrthancPluginGetImageWidth(OrthancPluginContext *context, const OrthancPluginImage *image)
Return the width of an image.
Definition OrthancCPlugin.h:3928
OrthancPluginBufferCompression
OrthancPluginErrorCode OrthancPluginBufferCompression(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const void *source, uint32_t size, OrthancPluginCompressionType compression, uint8_t uncompress)
Compress or decompress a buffer.
Definition OrthancCPlugin.h:3707
OrthancPluginGetFontSize
uint32_t OrthancPluginGetFontSize(OrthancPluginContext *context, uint32_t fontIndex)
Return the size of a font.
Definition OrthancCPlugin.h:4568
OrthancPluginCreateImageAccessor
OrthancPluginImage * OrthancPluginCreateImageAccessor(OrthancPluginContext *context, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, void *buffer)
Create an image pointing to a memory buffer.
Definition OrthancCPlugin.h:5481
OrthancPluginImage
struct _OrthancPluginImage_t OrthancPluginImage
Opaque structure that represents an image that is uncompressed in memory.
Definition OrthancCPlugin.h:1089
OrthancPluginPixelFormat_RGBA32
@ OrthancPluginPixelFormat_RGBA32
Color image in RGBA32 format.
Definition OrthancCPlugin.h:645
OrthancPluginPixelFormat_RGB48
@ OrthancPluginPixelFormat_RGB48
Color image in RGB48 format.
Definition OrthancCPlugin.h:655
OrthancPluginPixelFormat_Grayscale8
@ OrthancPluginPixelFormat_Grayscale8
Graylevel 8bpp image.
Definition OrthancCPlugin.h:613
OrthancPluginPixelFormat_SignedGrayscale16
@ OrthancPluginPixelFormat_SignedGrayscale16
Graylevel, signed 16bpp image.
Definition OrthancCPlugin.h:629
OrthancPluginPixelFormat_Float32
@ OrthancPluginPixelFormat_Float32
Graylevel, floating-point 32bpp image.
Definition OrthancCPlugin.h:671
OrthancPluginPixelFormat_RGB24
@ OrthancPluginPixelFormat_RGB24
Color image in RGB24 format.
Definition OrthancCPlugin.h:637
OrthancPluginPixelFormat_BGRA32
@ OrthancPluginPixelFormat_BGRA32
Color image in BGRA32 format.
Definition OrthancCPlugin.h:679
OrthancPluginPixelFormat_Unknown
@ OrthancPluginPixelFormat_Unknown
Definition OrthancCPlugin.h:647
OrthancPluginPixelFormat_Grayscale64
@ OrthancPluginPixelFormat_Grayscale64
Graylevel, unsigned 64bpp image.
Definition OrthancCPlugin.h:687
OrthancPluginPixelFormat_Grayscale32
@ OrthancPluginPixelFormat_Grayscale32
Graylevel, unsigned 32bpp image.
Definition OrthancCPlugin.h:663
OrthancPluginPixelFormat_Grayscale16
@ OrthancPluginPixelFormat_Grayscale16
Graylevel, unsigned 16bpp image.
Definition OrthancCPlugin.h:621
OrthancPluginImageFormat_Png
@ OrthancPluginImageFormat_Png
Definition OrthancCPlugin.h:776
OrthancPluginImageFormat_Jpeg
@ OrthancPluginImageFormat_Jpeg
Definition OrthancCPlugin.h:777
OrthancPluginImageFormat_Dicom
@ OrthancPluginImageFormat_Dicom
Definition OrthancCPlugin.h:778
OrthancPluginCompressionType_Gzip
@ OrthancPluginCompressionType_Gzip
Definition OrthancCPlugin.h:763
OrthancPluginCompressionType_ZlibWithSize
@ OrthancPluginCompressionType_ZlibWithSize
Definition OrthancCPlugin.h:762
OrthancPluginCompressionType_Zlib
@ OrthancPluginCompressionType_Zlib
Definition OrthancCPlugin.h:761
OrthancPluginCompressionType_GzipWithSize
@ OrthancPluginCompressionType_GzipWithSize
Definition OrthancCPlugin.h:764
OrthancPluginRestApiPost
OrthancPluginErrorCode OrthancPluginRestApiPost(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a POST call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2369
OrthancPluginRestApiPostAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiPostAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a POST call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2404
OrthancPluginRestApiPutAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiPutAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a PUT call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2517
OrthancPluginLookupStudyWithAccessionNumber
char * OrthancPluginLookupStudyWithAccessionNumber(OrthancPluginContext *context, const char *accessionNumber)
Look for a study, using the accession number.
Definition OrthancCPlugin.h:2653
OrthancPluginLookupSeries
char * OrthancPluginLookupSeries(OrthancPluginContext *context, const char *seriesUID)
Look for a series.
Definition OrthancCPlugin.h:2688
OrthancPluginSetGlobalProperty
OrthancPluginErrorCode OrthancPluginSetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *value)
Set the value of a global property.
Definition OrthancCPlugin.h:3465
OrthancPluginRestApiPut
OrthancPluginErrorCode OrthancPluginRestApiPut(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, const void *body, uint32_t bodySize)
Make a PUT call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2481
OrthancPluginGetGlobalProperty
char * OrthancPluginGetGlobalProperty(OrthancPluginContext *context, int32_t property, const char *defaultValue)
Get the value of a global property.
Definition OrthancCPlugin.h:3426
OrthancPluginLookupStudy
char * OrthancPluginLookupStudy(OrthancPluginContext *context, const char *studyUID)
Look for a study.
Definition OrthancCPlugin.h:2618
OrthancPluginRestApiGet
OrthancPluginErrorCode OrthancPluginRestApiGet(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri)
Make a GET call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2302
OrthancPluginLookupInstance
char * OrthancPluginLookupInstance(OrthancPluginContext *context, const char *sopInstanceUID)
Look for an instance.
Definition OrthancCPlugin.h:2723
OrthancPluginRestApiGetAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiGetAfterPlugins(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri)
Make a GET call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2332
OrthancPluginLookupPatient
char * OrthancPluginLookupPatient(OrthancPluginContext *context, const char *patientID)
Look for a patient.
Definition OrthancCPlugin.h:2583
OrthancPluginRestApiDelete
OrthancPluginErrorCode OrthancPluginRestApiDelete(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the built-in Orthanc REST API.
Definition OrthancCPlugin.h:2433
OrthancPluginRestApiDeleteAfterPlugins
OrthancPluginErrorCode OrthancPluginRestApiDeleteAfterPlugins(OrthancPluginContext *context, const char *uri)
Make a DELETE call to the REST API, as tainted by the plugins.
Definition OrthancCPlugin.h:2456
OrthancPluginCallRestApi
OrthancPluginErrorCode OrthancPluginCallRestApi(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *uri, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, const void *body, uint32_t bodySize, uint8_t afterPlugins)
Call the REST API of Orthanc with full flexibility.
Definition OrthancCPlugin.h:8702
OrthancPluginGenerateRestApiAuthorizationToken
char * OrthancPluginGenerateRestApiAuthorizationToken(OrthancPluginContext *context)
Generate a token to grant full access to the REST API of Orthanc.
Definition OrthancCPlugin.h:8504
OrthancPluginRestApiGet2
OrthancPluginErrorCode OrthancPluginRestApiGet2(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *uri, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, int32_t afterPlugins)
Make a GET call to the Orthanc REST API, with custom HTTP headers.
Definition OrthancCPlugin.h:5101
OrthancPluginGetDicomForInstance
OrthancPluginErrorCode OrthancPluginGetDicomForInstance(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *instanceId)
Retrieve a DICOM instance using its Orthanc identifier.
Definition OrthancCPlugin.h:2269
OrthancPluginCompressAndAnswerPngImage
void OrthancPluginCompressAndAnswerPngImage(OrthancPluginContext *context, OrthancPluginRestOutput *output, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer)
Answer to a REST request with a PNG image.
Definition OrthancCPlugin.h:2228
OrthancPluginSendUnauthorized
void OrthancPluginSendUnauthorized(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *realm)
Signal that a REST request is not authorized.
Definition OrthancCPlugin.h:2791
OrthancPluginSetHttpErrorDetails
void OrthancPluginSetHttpErrorDetails(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *details, uint8_t log)
Provide a detailed description for an HTTP error.
Definition OrthancCPlugin.h:6864
OrthancPluginSendMethodNotAllowed
void OrthancPluginSendMethodNotAllowed(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *allowedMethods)
Signal that this URI does not support this HTTP method.
Definition OrthancCPlugin.h:2814
OrthancPluginAnswerBuffer
void OrthancPluginAnswerBuffer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize, const char *mimeType)
Answer to a REST request.
Definition OrthancCPlugin.h:2171
OrthancPluginSendHttpStatusCode
void OrthancPluginSendHttpStatusCode(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status)
Send a HTTP status code.
Definition OrthancCPlugin.h:2768
OrthancPluginSetHttpHeader
void OrthancPluginSetHttpHeader(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *key, const char *value)
Set some HTTP header.
Definition OrthancCPlugin.h:2869
OrthancPluginSetCookie
void OrthancPluginSetCookie(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *cookie, const char *value)
Set a cookie.
Definition OrthancCPlugin.h:2844
OrthancPluginRedirect
void OrthancPluginRedirect(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *redirection)
Redirect a REST request.
Definition OrthancCPlugin.h:2551
OrthancPluginCompressAndAnswerJpegImage
void OrthancPluginCompressAndAnswerJpegImage(OrthancPluginContext *context, OrthancPluginRestOutput *output, OrthancPluginPixelFormat format, uint32_t width, uint32_t height, uint32_t pitch, const void *buffer, uint8_t quality)
Answer to a REST request with a JPEG image.
Definition OrthancCPlugin.h:4252
OrthancPluginSendMultipartItem
OrthancPluginErrorCode OrthancPluginSendMultipartItem(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize)
Send an item as a part of some HTTP multipart answer.
Definition OrthancCPlugin.h:3665
OrthancPluginSendMultipartItem2
OrthancPluginErrorCode OrthancPluginSendMultipartItem2(OrthancPluginContext *context, OrthancPluginRestOutput *output, const void *answer, uint32_t answerSize, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues)
Send an item as a part of some HTTP multipart answer, with custom headers.
Definition OrthancCPlugin.h:5698
OrthancPluginStartMultipartAnswer
OrthancPluginErrorCode OrthancPluginStartMultipartAnswer(OrthancPluginContext *context, OrthancPluginRestOutput *output, const char *subType, const char *contentType)
Start an HTTP multipart answer.
Definition OrthancCPlugin.h:3636
OrthancPluginSendHttpStatus
void OrthancPluginSendHttpStatus(OrthancPluginContext *context, OrthancPluginRestOutput *output, uint16_t status, const char *body, uint32_t bodySize)
Send a HTTP status, with a custom body.
Definition OrthancCPlugin.h:3859
OrthancPluginJobStop
OrthancPluginErrorCode(* OrthancPluginJobStop)(void *job, OrthancPluginJobStopReason reason)
Callback executed once one custom job leaves the "running" state.
Definition OrthancCPlugin.h:1638
OrthancPluginServerChunkedRequestReaderExecute
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderExecute)(OrthancPluginServerChunkedRequestReader *reader, OrthancPluginRestOutput *output)
Callback invoked whenever the request body is entirely received.
Definition OrthancCPlugin.h:7476
OrthancPluginHttpClient
OrthancPluginErrorCode OrthancPluginHttpClient(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *url, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, const void *body, uint32_t bodySize, const char *username, const char *password, uint32_t timeout, const char *certificateFile, const char *certificateKeyFile, const char *certificateKeyPassword, uint8_t pkcs11)
Issue a HTTP call with full flexibility.
Definition OrthancCPlugin.h:5811
OrthancPluginJob
struct _OrthancPluginJob_t OrthancPluginJob
Opaque structure to a job to be executed by Orthanc.
Definition OrthancCPlugin.h:1153
OrthancPluginCreateDicom2
OrthancPluginErrorCode OrthancPluginCreateDicom2(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *json, const OrthancPluginImage *pixelData, OrthancPluginCreateDicomFlags flags, const char *privateCreator)
Create a DICOM instance from a JSON string and an image, with a private creator.
Definition OrthancCPlugin.h:8634
OrthancPluginLogInfo
void OrthancPluginLogInfo(OrthancPluginContext *context, const char *message)
Log an information.
Definition OrthancCPlugin.h:2025
OrthancPluginServerChunkedRequestReaderFactory
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderFactory)(OrthancPluginServerChunkedRequestReader **reader, const char *url, const OrthancPluginHttpRequest *request)
Callback to create a reader to handle incoming chunked HTTP transfers.
Definition OrthancCPlugin.h:7437
OrthancPluginFreeFindMatcher
void OrthancPluginFreeFindMatcher(OrthancPluginContext *context, OrthancPluginFindMatcher *matcher)
Free a C-Find matcher.
Definition OrthancCPlugin.h:6228
OrthancPluginFreePeers
void OrthancPluginFreePeers(OrthancPluginContext *context, OrthancPluginPeers *peers)
Free the list of available Orthanc peers.
Definition OrthancCPlugin.h:6365
OrthancPluginRegisterPrivateDictionaryTag
OrthancPluginErrorCode OrthancPluginRegisterPrivateDictionaryTag(OrthancPluginContext *context, uint16_t group, uint16_t element, OrthancPluginValueRepresentation vr, const char *name, uint32_t minMultiplicity, uint32_t maxMultiplicity, const char *privateCreator)
Register a new private tag into the DICOM dictionary.
Definition OrthancCPlugin.h:4906
OrthancPluginIdentifierConstraint
OrthancPluginIdentifierConstraint
Definition OrthancCPlugin.h:879
OrthancPluginRegisterDictionaryTag
OrthancPluginErrorCode OrthancPluginRegisterDictionaryTag(OrthancPluginContext *context, uint16_t group, uint16_t element, OrthancPluginValueRepresentation vr, const char *name, uint32_t minMultiplicity, uint32_t maxMultiplicity)
Register a new tag into the DICOM dictionary.
Definition OrthancCPlugin.h:4853
OrthancPluginResourceType
OrthancPluginResourceType
Definition OrthancCPlugin.h:713
OrthancPluginWriteFile
OrthancPluginErrorCode OrthancPluginWriteFile(OrthancPluginContext *context, const char *path, const void *data, uint32_t size)
Write a file.
Definition OrthancCPlugin.h:3775
OrthancPluginGetCommandLineArgumentsCount
uint32_t OrthancPluginGetCommandLineArgumentsCount(OrthancPluginContext *context)
Get the number of command-line arguments.
Definition OrthancCPlugin.h:3496
OrthancPluginComputeMd5
char * OrthancPluginComputeMd5(OrthancPluginContext *context, const void *buffer, uint32_t size)
Compute an MD5 hash.
Definition OrthancCPlugin.h:5573
OrthancPluginErrorCode
OrthancPluginErrorCode
Definition OrthancCPlugin.h:201
OrthancPluginPeers
struct _OrthancPluginPeers_t OrthancPluginPeers
Opaque structure to the set of remote Orthanc Peers that are known to the local Orthanc server.
Definition OrthancCPlugin.h:1145
OrthancPluginHttpPost
OrthancPluginErrorCode OrthancPluginHttpPost(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const void *body, uint32_t bodySize, const char *username, const char *password)
Issue a HTTP POST call.
Definition OrthancCPlugin.h:4343
OrthancPluginChunkedClientRequestGetChunkSize
uint32_t(* OrthancPluginChunkedClientRequestGetChunkSize)(void *request)
Callback to read the size of the current request chunk during a chunked transfer.
Definition OrthancCPlugin.h:7278
OrthancPluginRegisterErrorCode
OrthancPluginErrorCode OrthancPluginRegisterErrorCode(OrthancPluginContext *context, int32_t code, uint16_t httpStatus, const char *message)
Declare a custom error code for this plugin.
Definition OrthancCPlugin.h:4797
OrthancPluginCreateMemoryBuffer
OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, uint32_t size)
Create a 32-bit memory buffer.
Definition OrthancCPlugin.h:8466
OrthancPluginDicomWebBinaryMode
OrthancPluginDicomWebBinaryMode
Definition OrthancCPlugin.h:968
OrthancPluginChunkedClientRequestNext
OrthancPluginErrorCode(* OrthancPluginChunkedClientRequestNext)(void *request)
Callback to advance in the request body during a chunked transfer.
Definition OrthancCPlugin.h:7246
OrthancPluginDicomWebNode
struct _OrthancPluginDicomWebNode_t OrthancPluginDicomWebNode
Opaque structure that represents a node in a JSON or XML document used in DICOMweb.
Definition OrthancCPlugin.h:1162
OrthancPluginJobGetProgress
float(* OrthancPluginJobGetProgress)(void *job)
Callback to check the progress of one custom job.
Definition OrthancCPlugin.h:1566
OrthancPluginEncodeDicomWebJson
char * OrthancPluginEncodeDicomWebJson(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback callback)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:7006
OrthancPluginCreateFindMatcher
OrthancPluginFindMatcher * OrthancPluginCreateFindMatcher(OrthancPluginContext *context, const void *query, uint32_t size)
Create a C-Find matcher.
Definition OrthancCPlugin.h:6190
OrthancPluginDicomToJsonFlags
OrthancPluginDicomToJsonFlags
Definition OrthancCPlugin.h:843
OrthancPluginJobStepStatus
OrthancPluginJobStepStatus
Definition OrthancCPlugin.h:925
OrthancPluginCreateDicomFlags
OrthancPluginCreateDicomFlags
Definition OrthancCPlugin.h:864
OrthancPluginServerChunkedRequestReaderFinalize
void(* OrthancPluginServerChunkedRequestReaderFinalize)(OrthancPluginServerChunkedRequestReader *reader)
Callback invoked to release the resources associated with an incoming HTTP chunked transfer.
Definition OrthancCPlugin.h:7494
OrthancPluginFindMatcherIsMatch
int32_t OrthancPluginFindMatcherIsMatch(OrthancPluginContext *context, const OrthancPluginFindMatcher *matcher, const void *dicom, uint32_t size)
Test whether a DICOM instance matches a C-Find query.
Definition OrthancCPlugin.h:6261
OrthancPluginExtendOrthancExplorer
void OrthancPluginExtendOrthancExplorer(OrthancPluginContext *context, const char *javascript)
Extend the JavaScript code of Orthanc Explorer.
Definition OrthancCPlugin.h:3392
OrthancPluginLogWarning
void OrthancPluginLogWarning(OrthancPluginContext *context, const char *message)
Log a warning.
Definition OrthancCPlugin.h:2009
OrthancPluginGetPeerName
const char * OrthancPluginGetPeerName(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex)
Get the symbolic name of an Orthanc peer.
Definition OrthancCPlugin.h:6443
OrthancPluginGetPeers
OrthancPluginPeers * OrthancPluginGetPeers(OrthancPluginContext *context)
Return the list of available Orthanc peers.
Definition OrthancCPlugin.h:6331
OrthancPluginConstraintType
OrthancPluginConstraintType
Definition OrthancCPlugin.h:894
OrthancPluginGetOrthancDirectory
char * OrthancPluginGetOrthancDirectory(OrthancPluginContext *context)
Return the directory containing the Orthanc.
Definition OrthancCPlugin.h:3236
OrthancPluginReadFile
OrthancPluginErrorCode OrthancPluginReadFile(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *path)
Read a file.
Definition OrthancCPlugin.h:3744
OrthancPluginJobStep
OrthancPluginJobStepStatus(* OrthancPluginJobStep)(void *job)
Callback to execute one step of a custom job.
Definition OrthancCPlugin.h:1614
OrthancPluginComputeSha1
char * OrthancPluginComputeSha1(OrthancPluginContext *context, const void *buffer, uint32_t size)
Compute a SHA-1 hash.
Definition OrthancCPlugin.h:5609
OrthancPluginGetCommandLineArgument
char * OrthancPluginGetCommandLineArgument(OrthancPluginContext *context, uint32_t argument)
Get the value of a command-line argument.
Definition OrthancCPlugin.h:3530
OrthancPluginSetMetricsValue
void OrthancPluginSetMetricsValue(OrthancPluginContext *context, const char *name, float value, OrthancPluginMetricsType type)
Set the value of a metrics.
Definition OrthancCPlugin.h:6940
OrthancPluginServerChunkedRequestReaderAddChunk
OrthancPluginErrorCode(* OrthancPluginServerChunkedRequestReaderAddChunk)(OrthancPluginServerChunkedRequestReader *reader, const void *data, uint32_t size)
Callback invoked whenever a new data chunk is available during a chunked transfer.
Definition OrthancCPlugin.h:7456
OrthancPluginReceivedInstanceAction
OrthancPluginReceivedInstanceAction
Definition OrthancCPlugin.h:1015
OrthancPluginChunkedHttpClient
OrthancPluginErrorCode OrthancPluginChunkedHttpClient(OrthancPluginContext *context, void *answer, OrthancPluginChunkedClientAnswerAddChunk answerAddChunk, OrthancPluginChunkedClientAnswerAddHeader answerAddHeader, uint16_t *httpStatus, OrthancPluginHttpMethod method, const char *url, uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, void *request, OrthancPluginChunkedClientRequestIsDone requestIsDone, OrthancPluginChunkedClientRequestGetChunkData requestChunkData, OrthancPluginChunkedClientRequestGetChunkSize requestChunkSize, OrthancPluginChunkedClientRequestNext requestNext, const char *username, const char *password, uint32_t timeout, const char *certificateFile, const char *certificateKeyFile, const char *certificateKeyPassword, uint8_t pkcs11)
Issue a HTTP call, using chunked HTTP transfers.
Definition OrthancCPlugin.h:7357
OrthancPluginFreeMemoryBuffer64
void OrthancPluginFreeMemoryBuffer64(OrthancPluginContext *context, OrthancPluginMemoryBuffer64 *buffer)
Free a memory buffer.
Definition OrthancCPlugin.h:1977
OrthancPluginHttpPut
OrthancPluginErrorCode OrthancPluginHttpPut(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const void *body, uint32_t bodySize, const char *username, const char *password)
Issue a HTTP PUT call.
Definition OrthancCPlugin.h:4385
OrthancPluginDicomBufferToJson
char * OrthancPluginDicomBufferToJson(OrthancPluginContext *context, const void *buffer, uint32_t size, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM memory buffer as a JSON string.
Definition OrthancCPlugin.h:4994
OrthancPluginCreateDicom
OrthancPluginErrorCode OrthancPluginCreateDicom(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *json, const OrthancPluginImage *pixelData, OrthancPluginCreateDicomFlags flags)
Create a DICOM instance from a JSON string and an image.
Definition OrthancCPlugin.h:5364
OrthancPluginDicomInstanceToJson
char * OrthancPluginDicomInstanceToJson(OrthancPluginContext *context, const char *instanceId, OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength)
Format a DICOM instance as a JSON string.
Definition OrthancCPlugin.h:5043
OrthancPluginFreeJob
void OrthancPluginFreeJob(OrthancPluginContext *context, OrthancPluginJob *job)
Free a custom job.
Definition OrthancCPlugin.h:6751
OrthancPluginGetDatabaseServerIdentifier
const char * OrthancPluginGetDatabaseServerIdentifier(OrthancPluginContext *context)
Gets the DatabaseServerIdentifier.
Definition OrthancCPlugin.h:9016
OrthancPluginSubmitJob
char * OrthancPluginSubmitJob(OrthancPluginContext *context, OrthancPluginJob *job, int priority)
Submit a new job to the jobs engine of Orthanc.
Definition OrthancCPlugin.h:6783
OrthancPluginGenerateUuid
char * OrthancPluginGenerateUuid(OrthancPluginContext *context)
Generate an UUID.
Definition OrthancCPlugin.h:5866
OrthancPluginStorageCommitmentFailureReason
OrthancPluginStorageCommitmentFailureReason
Definition OrthancCPlugin.h:981
OrthancPluginChunkedClientAnswerAddChunk
OrthancPluginErrorCode(* OrthancPluginChunkedClientAnswerAddChunk)(void *answer, const void *data, uint32_t size)
Callback executed when an answer chunk is received during a chunked transfer.
Definition OrthancCPlugin.h:7209
OrthancPluginGetPeerUserProperty
const char * OrthancPluginGetPeerUserProperty(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex, const char *userProperty)
Get some user-defined property of an Orthanc peer.
Definition OrthancCPlugin.h:6530
OrthancPluginMetricsType
OrthancPluginMetricsType
Definition OrthancCPlugin.h:951
OrthancPluginAutodetectMimeType
const char * OrthancPluginAutodetectMimeType(OrthancPluginContext *context, const char *path)
Detect the MIME type of a file.
Definition OrthancCPlugin.h:6896
OrthancPluginHttpDelete
OrthancPluginErrorCode OrthancPluginHttpDelete(OrthancPluginContext *context, const char *url, const char *username, const char *password)
Issue a HTTP DELETE call.
Definition OrthancCPlugin.h:4423
OrthancPluginChunkedClientRequestIsDone
uint8_t(* OrthancPluginChunkedClientRequestIsDone)(void *request)
Callback to know whether the request body is entirely read during a chunked transfer.
Definition OrthancCPlugin.h:7229
OrthancPluginChunkedClientRequestGetChunkData
const void *(* OrthancPluginChunkedClientRequestGetChunkData)(void *request)
Callback to read the current chunk of the request body during a chunked transfer.
Definition OrthancCPlugin.h:7262
OrthancPluginCreateJob
OrthancPluginJob * OrthancPluginCreateJob(OrthancPluginContext *context, void *job, OrthancPluginJobFinalize finalize, const char *type, OrthancPluginJobGetProgress getProgress, OrthancPluginJobGetContent getContent, OrthancPluginJobGetSerialized getSerialized, OrthancPluginJobStep step, OrthancPluginJobStop stop, OrthancPluginJobReset reset)
Create a custom job.
Definition OrthancCPlugin.h:6696
OrthancPluginFreeMemoryBuffer
void OrthancPluginFreeMemoryBuffer(OrthancPluginContext *context, OrthancPluginMemoryBuffer *buffer)
Free a memory buffer.
Definition OrthancCPlugin.h:1961
OrthancPluginEncodeDicomWebXml
char * OrthancPluginEncodeDicomWebXml(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback callback)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:7048
OrthancPluginJobGetSerialized
const char *(* OrthancPluginJobGetSerialized)(void *job)
Callback to serialize one custom job.
Definition OrthancCPlugin.h:1599
OrthancPluginGetConfiguration
char * OrthancPluginGetConfiguration(OrthancPluginContext *context)
Return the content of the configuration file(s).
Definition OrthancCPlugin.h:3595
OrthancPluginCreateMemoryBuffer64
OrthancPluginErrorCode OrthancPluginCreateMemoryBuffer64(OrthancPluginContext *context, OrthancPluginMemoryBuffer64 *target, uint64_t size)
Create a 64-bit memory buffer.
Definition OrthancCPlugin.h:8550
OrthancPluginChunkedClientAnswerAddHeader
OrthancPluginErrorCode(* OrthancPluginChunkedClientAnswerAddHeader)(void *answer, const char *key, const char *value)
Callback executed when a HTTP header is received during a chunked transfer.
Definition OrthancCPlugin.h:7188
OrthancPluginGetPeersCount
uint32_t OrthancPluginGetPeersCount(OrthancPluginContext *context, const OrthancPluginPeers *peers)
Get the number of Orthanc peers.
Definition OrthancCPlugin.h:6395
OrthancPluginJobGetContent
const char *(* OrthancPluginJobGetContent)(void *job)
Callback to retrieve the content of one custom job.
Definition OrthancCPlugin.h:1581
OrthancPluginValueRepresentation
OrthancPluginValueRepresentation
Definition OrthancCPlugin.h:789
OrthancPluginHttpGet
OrthancPluginErrorCode OrthancPluginHttpGet(OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const char *url, const char *username, const char *password)
Issue a HTTP GET call.
Definition OrthancCPlugin.h:4305
OrthancPluginJobStopReason
OrthancPluginJobStopReason
Definition OrthancCPlugin.h:939
OrthancPluginGetOrthancPath
char * OrthancPluginGetOrthancPath(OrthancPluginContext *context)
Return the path to the Orthanc executable.
Definition OrthancCPlugin.h:3206
OrthancPluginDicomToJsonFormat
OrthancPluginDicomToJsonFormat
Definition OrthancCPlugin.h:828
OrthancPluginLogError
void OrthancPluginLogError(OrthancPluginContext *context, const char *message)
Log an error.
Definition OrthancCPlugin.h:1993
OrthancPluginGetConfigurationPath
char * OrthancPluginGetConfigurationPath(OrthancPluginContext *context)
Return the path to the configuration file(s).
Definition OrthancCPlugin.h:3271
OrthancPluginHttpMethod
OrthancPluginHttpMethod
Definition OrthancCPlugin.h:326
OrthancPluginSetRootUri
void OrthancPluginSetRootUri(OrthancPluginContext *context, const char *uri)
Set the URI where the plugin provides its Web interface.
Definition OrthancCPlugin.h:3348
OrthancPluginEncodeDicomWebXml2
char * OrthancPluginEncodeDicomWebXml2(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb XML.
Definition OrthancCPlugin.h:7144
OrthancPluginCallPeerApi
OrthancPluginErrorCode OrthancPluginCallPeerApi(OrthancPluginContext *context, OrthancPluginMemoryBuffer *answerBody, OrthancPluginMemoryBuffer *answerHeaders, uint16_t *httpStatus, const OrthancPluginPeers *peers, uint32_t peerIndex, OrthancPluginHttpMethod method, const char *uri, uint32_t additionalHeadersCount, const char *const *additionalHeadersKeys, const char *const *additionalHeadersValues, const void *body, uint32_t bodySize, uint32_t timeout)
Call the REST API of an Orthanc peer.
Definition OrthancCPlugin.h:6611
OrthancPluginFindMatcher
struct _OrthancPluginFindMatcher_t OrthancPluginFindMatcher
Opaque structure to an object that can be used to check whether a DICOM instance matches a C-Find que...
Definition OrthancCPlugin.h:1137
OrthancPluginEncodeDicomWebJson2
char * OrthancPluginEncodeDicomWebJson2(OrthancPluginContext *context, const void *dicom, uint32_t dicomSize, OrthancPluginDicomWebBinaryCallback2 callback, void *payload)
Convert a DICOM instance to DICOMweb JSON.
Definition OrthancCPlugin.h:7100
OrthancPluginLookupDictionary
OrthancPluginErrorCode OrthancPluginLookupDictionary(OrthancPluginContext *context, OrthancPluginDictionaryEntry *target, const char *name)
Get information about the given DICOM tag.
Definition OrthancCPlugin.h:5655
OrthancPluginInstanceOrigin
OrthancPluginInstanceOrigin
Definition OrthancCPlugin.h:909
OrthancPluginJobFinalize
void(* OrthancPluginJobFinalize)(void *job)
Callback to finalize one custom job.
Definition OrthancCPlugin.h:1553
OrthancPluginFreeString
void OrthancPluginFreeString(OrthancPluginContext *context, char *str)
Free a string.
Definition OrthancCPlugin.h:1806
OrthancPluginJobReset
OrthancPluginErrorCode(* OrthancPluginJobReset)(void *job)
Callback executed once one stopped custom job is started again.
Definition OrthancCPlugin.h:1655
OrthancPluginGetErrorDescription
const char * OrthancPluginGetErrorDescription(OrthancPluginContext *context, OrthancPluginErrorCode error)
Get the description of a given error code.
Definition OrthancCPlugin.h:3806
OrthancPluginContext
struct _OrthancPluginContext_t OrthancPluginContext
Data structure that contains information about the Orthanc core.
OrthancPluginContentType
OrthancPluginContentType
Definition OrthancCPlugin.h:698
OrthancPluginGetPeerUrl
const char * OrthancPluginGetPeerUrl(OrthancPluginContext *context, const OrthancPluginPeers *peers, uint32_t peerIndex)
Get the base URL of an Orthanc peer.
Definition OrthancCPlugin.h:6484
OrthancPluginSetDescription
void OrthancPluginSetDescription(OrthancPluginContext *context, const char *description)
Set a description for this plugin.
Definition OrthancCPlugin.h:3370
OrthancPluginGetTagName
char * OrthancPluginGetTagName(OrthancPluginContext *context, uint16_t group, uint16_t element, const char *privateCreator)
Returns the symbolic name of a DICOM tag.
Definition OrthancCPlugin.h:7590
OrthancPluginIdentifierConstraint_Wildcard
@ OrthancPluginIdentifierConstraint_Wildcard
Definition OrthancCPlugin.h:883
OrthancPluginIdentifierConstraint_Equal
@ OrthancPluginIdentifierConstraint_Equal
Definition OrthancCPlugin.h:880
OrthancPluginIdentifierConstraint_SmallerOrEqual
@ OrthancPluginIdentifierConstraint_SmallerOrEqual
Definition OrthancCPlugin.h:881
OrthancPluginIdentifierConstraint_GreaterOrEqual
@ OrthancPluginIdentifierConstraint_GreaterOrEqual
Definition OrthancCPlugin.h:882
OrthancPluginResourceType_Instance
@ OrthancPluginResourceType_Instance
Definition OrthancCPlugin.h:717
OrthancPluginResourceType_None
@ OrthancPluginResourceType_None
Definition OrthancCPlugin.h:718
OrthancPluginResourceType_Series
@ OrthancPluginResourceType_Series
Definition OrthancCPlugin.h:716
OrthancPluginResourceType_Study
@ OrthancPluginResourceType_Study
Definition OrthancCPlugin.h:715
OrthancPluginResourceType_Patient
@ OrthancPluginResourceType_Patient
Definition OrthancCPlugin.h:714
OrthancPluginErrorCode_CreateDicomBadParent
@ OrthancPluginErrorCode_CreateDicomBadParent
Definition OrthancCPlugin.h:288
OrthancPluginErrorCode_MainDicomTagsMultiplyDefined
@ OrthancPluginErrorCode_MainDicomTagsMultiplyDefined
Definition OrthancCPlugin.h:247
OrthancPluginErrorCode_SQLiteFlush
@ OrthancPluginErrorCode_SQLiteFlush
Definition OrthancCPlugin.h:256
OrthancPluginErrorCode_IncompatibleDatabaseVersion
@ OrthancPluginErrorCode_IncompatibleDatabaseVersion
Definition OrthancCPlugin.h:221
OrthancPluginErrorCode_BadSequenceOfCalls
@ OrthancPluginErrorCode_BadSequenceOfCalls
Definition OrthancCPlugin.h:209
OrthancPluginErrorCode_SharedLibrary
@ OrthancPluginErrorCode_SharedLibrary
Definition OrthancCPlugin.h:228
OrthancPluginErrorCode_NullPointer
@ OrthancPluginErrorCode_NullPointer
Definition OrthancCPlugin.h:238
OrthancPluginErrorCode_NotLuaPredicate
@ OrthancPluginErrorCode_NotLuaPredicate
Definition OrthancCPlugin.h:298
OrthancPluginErrorCode_LuaAlreadyExecuted
@ OrthancPluginErrorCode_LuaAlreadyExecuted
Definition OrthancCPlugin.h:296
OrthancPluginErrorCode_NotAcceptable
@ OrthancPluginErrorCode_NotAcceptable
Definition OrthancCPlugin.h:237
OrthancPluginErrorCode_FullStorage
@ OrthancPluginErrorCode_FullStorage
Definition OrthancCPlugin.h:222
OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered
@ OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered
Definition OrthancCPlugin.h:301
OrthancPluginErrorCode_InexistentFile
@ OrthancPluginErrorCode_InexistentFile
Definition OrthancCPlugin.h:216
OrthancPluginErrorCode_CreateDicomParentEncoding
@ OrthancPluginErrorCode_CreateDicomParentEncoding
Definition OrthancCPlugin.h:290
OrthancPluginErrorCode_CannotOrderSlices
@ OrthancPluginErrorCode_CannotOrderSlices
Definition OrthancCPlugin.h:304
OrthancPluginErrorCode_InternalError
@ OrthancPluginErrorCode_InternalError
Definition OrthancCPlugin.h:202
OrthancPluginErrorCode_DiscontinuedAbi
@ OrthancPluginErrorCode_DiscontinuedAbi
Definition OrthancCPlugin.h:243
OrthancPluginErrorCode_NoCFindHandler
@ OrthancPluginErrorCode_NoCFindHandler
Definition OrthancCPlugin.h:274
OrthancPluginErrorCode_SQLiteCommitWithoutTransaction
@ OrthancPluginErrorCode_SQLiteCommitWithoutTransaction
Definition OrthancCPlugin.h:254
OrthancPluginErrorCode_DatabasePlugin
@ OrthancPluginErrorCode_DatabasePlugin
Definition OrthancCPlugin.h:234
OrthancPluginErrorCode_SQLiteStatementAlreadyUsed
@ OrthancPluginErrorCode_SQLiteStatementAlreadyUsed
Definition OrthancCPlugin.h:251
OrthancPluginErrorCode_SQLiteCannotRun
@ OrthancPluginErrorCode_SQLiteCannotRun
Definition OrthancCPlugin.h:257
OrthancPluginErrorCode_UnknownPluginService
@ OrthancPluginErrorCode_UnknownPluginService
Definition OrthancCPlugin.h:229
OrthancPluginErrorCode_JsonToLuaTable
@ OrthancPluginErrorCode_JsonToLuaTable
Definition OrthancCPlugin.h:293
OrthancPluginErrorCode_CreateDicomOverrideTag
@ OrthancPluginErrorCode_CreateDicomOverrideTag
Definition OrthancCPlugin.h:284
OrthancPluginErrorCode_SQLiteBindOutOfRange
@ OrthancPluginErrorCode_SQLiteBindOutOfRange
Definition OrthancCPlugin.h:259
OrthancPluginErrorCode_ParameterOutOfRange
@ OrthancPluginErrorCode_ParameterOutOfRange
Definition OrthancCPlugin.h:206
OrthancPluginErrorCode_SQLiteRegisterFunction
@ OrthancPluginErrorCode_SQLiteRegisterFunction
Definition OrthancCPlugin.h:255
OrthancPluginErrorCode_SQLiteTransactionBegin
@ OrthancPluginErrorCode_SQLiteTransactionBegin
Definition OrthancCPlugin.h:263
OrthancPluginErrorCode_CreateDicomNoPayload
@ OrthancPluginErrorCode_CreateDicomNoPayload
Definition OrthancCPlugin.h:286
OrthancPluginErrorCode_Unauthorized
@ OrthancPluginErrorCode_Unauthorized
Definition OrthancCPlugin.h:232
OrthancPluginErrorCode_RegularFileExpected
@ OrthancPluginErrorCode_RegularFileExpected
Definition OrthancCPlugin.h:270
OrthancPluginErrorCode_DicomPortInUse
@ OrthancPluginErrorCode_DicomPortInUse
Definition OrthancCPlugin.h:268
OrthancPluginErrorCode_BadApplicationEntityTitle
@ OrthancPluginErrorCode_BadApplicationEntityTitle
Definition OrthancCPlugin.h:273
OrthancPluginErrorCode_NoCStoreHandler
@ OrthancPluginErrorCode_NoCStoreHandler
Definition OrthancCPlugin.h:276
OrthancPluginErrorCode_PathToExecutable
@ OrthancPluginErrorCode_PathToExecutable
Definition OrthancCPlugin.h:271
OrthancPluginErrorCode_NoSopClassOrInstance
@ OrthancPluginErrorCode_NoSopClassOrInstance
Definition OrthancCPlugin.h:278
OrthancPluginErrorCode_BadFont
@ OrthancPluginErrorCode_BadFont
Definition OrthancCPlugin.h:233
OrthancPluginErrorCode_DatabaseUnavailable
@ OrthancPluginErrorCode_DatabaseUnavailable
Definition OrthancCPlugin.h:239
OrthancPluginErrorCode_CannotCreateLua
@ OrthancPluginErrorCode_CannotCreateLua
Definition OrthancCPlugin.h:294
OrthancPluginErrorCode_SQLiteExecute
@ OrthancPluginErrorCode_SQLiteExecute
Definition OrthancCPlugin.h:252
OrthancPluginErrorCode_UriSyntax
@ OrthancPluginErrorCode_UriSyntax
Definition OrthancCPlugin.h:215
OrthancPluginErrorCode_DirectoryOverFile
@ OrthancPluginErrorCode_DirectoryOverFile
Definition OrthancCPlugin.h:264
OrthancPluginErrorCode_Revision
@ OrthancPluginErrorCode_Revision
Definition OrthancCPlugin.h:246
OrthancPluginErrorCode_InexistentTag
@ OrthancPluginErrorCode_InexistentTag
Definition OrthancCPlugin.h:224
OrthancPluginErrorCode_IncompatibleImageFormat
@ OrthancPluginErrorCode_IncompatibleImageFormat
Definition OrthancCPlugin.h:226
OrthancPluginErrorCode_UnsupportedMediaType
@ OrthancPluginErrorCode_UnsupportedMediaType
Definition OrthancCPlugin.h:309
OrthancPluginErrorCode_DicomFindUnavailable
@ OrthancPluginErrorCode_DicomFindUnavailable
Definition OrthancCPlugin.h:280
OrthancPluginErrorCode_SQLiteCannotStep
@ OrthancPluginErrorCode_SQLiteCannotStep
Definition OrthancCPlugin.h:258
OrthancPluginErrorCode_CreateDicomParentIsInstance
@ OrthancPluginErrorCode_CreateDicomParentIsInstance
Definition OrthancCPlugin.h:289
OrthancPluginErrorCode_StorageAreaAlreadyRegistered
@ OrthancPluginErrorCode_StorageAreaAlreadyRegistered
Definition OrthancCPlugin.h:300
OrthancPluginErrorCode_LuaReturnsNoString
@ OrthancPluginErrorCode_LuaReturnsNoString
Definition OrthancCPlugin.h:299
OrthancPluginErrorCode_UnknownResource
@ OrthancPluginErrorCode_UnknownResource
Definition OrthancCPlugin.h:220
OrthancPluginErrorCode_CreateDicomNotString
@ OrthancPluginErrorCode_CreateDicomNotString
Definition OrthancCPlugin.h:283
OrthancPluginErrorCode_HttpPortInUse
@ OrthancPluginErrorCode_HttpPortInUse
Definition OrthancCPlugin.h:267
OrthancPluginErrorCode_SslDisabled
@ OrthancPluginErrorCode_SslDisabled
Definition OrthancCPlugin.h:303
OrthancPluginErrorCode_UnknownModality
@ OrthancPluginErrorCode_UnknownModality
Definition OrthancCPlugin.h:291
OrthancPluginErrorCode_BadHttpStatusInRest
@ OrthancPluginErrorCode_BadHttpStatusInRest
Definition OrthancCPlugin.h:269
OrthancPluginErrorCode_BadGeometry
@ OrthancPluginErrorCode_BadGeometry
Definition OrthancCPlugin.h:241
OrthancPluginErrorCode_AlreadyExistingTag
@ OrthancPluginErrorCode_AlreadyExistingTag
Definition OrthancCPlugin.h:306
OrthancPluginErrorCode_FileStorageCannotWrite
@ OrthancPluginErrorCode_FileStorageCannotWrite
Definition OrthancCPlugin.h:265
OrthancPluginErrorCode_CreateDicomUseDataUriScheme
@ OrthancPluginErrorCode_CreateDicomUseDataUriScheme
Definition OrthancCPlugin.h:287
OrthancPluginErrorCode_DirectoryExpected
@ OrthancPluginErrorCode_DirectoryExpected
Definition OrthancCPlugin.h:266
OrthancPluginErrorCode_NoCMoveHandler
@ OrthancPluginErrorCode_NoCMoveHandler
Definition OrthancCPlugin.h:275
OrthancPluginErrorCode_SQLitePrepareStatement
@ OrthancPluginErrorCode_SQLitePrepareStatement
Definition OrthancCPlugin.h:260
OrthancPluginErrorCode_CorruptedFile
@ OrthancPluginErrorCode_CorruptedFile
Definition OrthancCPlugin.h:223
OrthancPluginErrorCode_StorageAreaPlugin
@ OrthancPluginErrorCode_StorageAreaPlugin
Definition OrthancCPlugin.h:235
OrthancPluginErrorCode_BadJobOrdering
@ OrthancPluginErrorCode_BadJobOrdering
Definition OrthancCPlugin.h:292
OrthancPluginErrorCode_DatabaseCannotSerialize
@ OrthancPluginErrorCode_DatabaseCannotSerialize
Definition OrthancCPlugin.h:245
OrthancPluginErrorCode_CanceledJob
@ OrthancPluginErrorCode_CanceledJob
Definition OrthancCPlugin.h:240
OrthancPluginErrorCode_BadRange
@ OrthancPluginErrorCode_BadRange
Definition OrthancCPlugin.h:244
OrthancPluginErrorCode_NotImplemented
@ OrthancPluginErrorCode_NotImplemented
Definition OrthancCPlugin.h:205
OrthancPluginErrorCode_SslInitialization
@ OrthancPluginErrorCode_SslInitialization
Definition OrthancCPlugin.h:242
OrthancPluginErrorCode_IncompatibleImageSize
@ OrthancPluginErrorCode_IncompatibleImageSize
Definition OrthancCPlugin.h:227
OrthancPluginErrorCode_BadFileFormat
@ OrthancPluginErrorCode_BadFileFormat
Definition OrthancCPlugin.h:218
OrthancPluginErrorCode_BadRequest
@ OrthancPluginErrorCode_BadRequest
Definition OrthancCPlugin.h:211
OrthancPluginErrorCode_SystemCommand
@ OrthancPluginErrorCode_SystemCommand
Definition OrthancCPlugin.h:213
OrthancPluginErrorCode_NoStorageCommitmentHandler
@ OrthancPluginErrorCode_NoStorageCommitmentHandler
Definition OrthancCPlugin.h:307
OrthancPluginErrorCode_SQLiteAlreadyOpened
@ OrthancPluginErrorCode_SQLiteAlreadyOpened
Definition OrthancCPlugin.h:249
OrthancPluginErrorCode_Plugin
@ OrthancPluginErrorCode_Plugin
Definition OrthancCPlugin.h:204
OrthancPluginErrorCode_CannotExecuteLua
@ OrthancPluginErrorCode_CannotExecuteLua
Definition OrthancCPlugin.h:295
OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction
@ OrthancPluginErrorCode_SQLiteRollbackWithoutTransaction
Definition OrthancCPlugin.h:253
OrthancPluginErrorCode_UnknownDicomTag
@ OrthancPluginErrorCode_UnknownDicomTag
Definition OrthancCPlugin.h:230
OrthancPluginErrorCode_NoPresentationContext
@ OrthancPluginErrorCode_NoPresentationContext
Definition OrthancCPlugin.h:279
OrthancPluginErrorCode_EmptyRequest
@ OrthancPluginErrorCode_EmptyRequest
Definition OrthancCPlugin.h:236
OrthancPluginErrorCode_DatabaseNotInitialized
@ OrthancPluginErrorCode_DatabaseNotInitialized
Definition OrthancCPlugin.h:302
OrthancPluginErrorCode_DicomMoveUnavailable
@ OrthancPluginErrorCode_DicomMoveUnavailable
Definition OrthancCPlugin.h:281
OrthancPluginErrorCode_SQLiteTransactionCommit
@ OrthancPluginErrorCode_SQLiteTransactionCommit
Definition OrthancCPlugin.h:262
OrthancPluginErrorCode_BadJson
@ OrthancPluginErrorCode_BadJson
Definition OrthancCPlugin.h:231
OrthancPluginErrorCode_Success
@ OrthancPluginErrorCode_Success
Definition OrthancCPlugin.h:203
OrthancPluginErrorCode_NetworkProtocol
@ OrthancPluginErrorCode_NetworkProtocol
Definition OrthancCPlugin.h:212
OrthancPluginErrorCode_NoApplicationEntityFilter
@ OrthancPluginErrorCode_NoApplicationEntityFilter
Definition OrthancCPlugin.h:277
OrthancPluginErrorCode_InexistentItem
@ OrthancPluginErrorCode_InexistentItem
Definition OrthancCPlugin.h:210
OrthancPluginErrorCode_Timeout
@ OrthancPluginErrorCode_Timeout
Definition OrthancCPlugin.h:219
OrthancPluginErrorCode_LuaBadOutput
@ OrthancPluginErrorCode_LuaBadOutput
Definition OrthancCPlugin.h:297
OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted
@ OrthancPluginErrorCode_SQLiteTransactionAlreadyStarted
Definition OrthancCPlugin.h:261
OrthancPluginErrorCode_NoCGetHandler
@ OrthancPluginErrorCode_NoCGetHandler
Definition OrthancCPlugin.h:308
OrthancPluginErrorCode_SQLiteNotOpened
@ OrthancPluginErrorCode_SQLiteNotOpened
Definition OrthancCPlugin.h:248
OrthancPluginErrorCode_ReadOnly
@ OrthancPluginErrorCode_ReadOnly
Definition OrthancCPlugin.h:225
OrthancPluginErrorCode_CannotStoreInstance
@ OrthancPluginErrorCode_CannotStoreInstance
Definition OrthancCPlugin.h:282
OrthancPluginErrorCode_CannotWriteFile
@ OrthancPluginErrorCode_CannotWriteFile
Definition OrthancCPlugin.h:217
OrthancPluginErrorCode_BadParameterType
@ OrthancPluginErrorCode_BadParameterType
Definition OrthancCPlugin.h:208
OrthancPluginErrorCode_NotEnoughMemory
@ OrthancPluginErrorCode_NotEnoughMemory
Definition OrthancCPlugin.h:207
OrthancPluginErrorCode_CreateDicomUseContent
@ OrthancPluginErrorCode_CreateDicomUseContent
Definition OrthancCPlugin.h:285
OrthancPluginErrorCode_Database
@ OrthancPluginErrorCode_Database
Definition OrthancCPlugin.h:214
OrthancPluginErrorCode_SQLiteCannotOpen
@ OrthancPluginErrorCode_SQLiteCannotOpen
Definition OrthancCPlugin.h:250
OrthancPluginErrorCode_MakeDirectory
@ OrthancPluginErrorCode_MakeDirectory
Definition OrthancCPlugin.h:272
OrthancPluginErrorCode_NoWorklistHandler
@ OrthancPluginErrorCode_NoWorklistHandler
Definition OrthancCPlugin.h:305
OrthancPluginDicomWebBinaryMode_InlineBinary
@ OrthancPluginDicomWebBinaryMode_InlineBinary
Definition OrthancCPlugin.h:970
OrthancPluginDicomWebBinaryMode_BulkDataUri
@ OrthancPluginDicomWebBinaryMode_BulkDataUri
Definition OrthancCPlugin.h:971
OrthancPluginDicomWebBinaryMode_Ignore
@ OrthancPluginDicomWebBinaryMode_Ignore
Definition OrthancCPlugin.h:969
OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii
@ OrthancPluginDicomToJsonFlags_ConvertBinaryToAscii
Definition OrthancCPlugin.h:849
OrthancPluginDicomToJsonFlags_IncludeBinary
@ OrthancPluginDicomToJsonFlags_IncludeBinary
Definition OrthancCPlugin.h:845
OrthancPluginDicomToJsonFlags_IncludePixelData
@ OrthancPluginDicomToJsonFlags_IncludePixelData
Definition OrthancCPlugin.h:848
OrthancPluginDicomToJsonFlags_IncludeUnknownTags
@ OrthancPluginDicomToJsonFlags_IncludeUnknownTags
Definition OrthancCPlugin.h:847
OrthancPluginDicomToJsonFlags_SkipGroupLengths
@ OrthancPluginDicomToJsonFlags_SkipGroupLengths
Definition OrthancCPlugin.h:852
OrthancPluginDicomToJsonFlags_ConvertBinaryToNull
@ OrthancPluginDicomToJsonFlags_ConvertBinaryToNull
Definition OrthancCPlugin.h:850
OrthancPluginDicomToJsonFlags_StopAfterPixelData
@ OrthancPluginDicomToJsonFlags_StopAfterPixelData
Definition OrthancCPlugin.h:851
OrthancPluginDicomToJsonFlags_IncludePrivateTags
@ OrthancPluginDicomToJsonFlags_IncludePrivateTags
Definition OrthancCPlugin.h:846
OrthancPluginJobStepStatus_Continue
@ OrthancPluginJobStepStatus_Continue
Definition OrthancCPlugin.h:928
OrthancPluginJobStepStatus_Success
@ OrthancPluginJobStepStatus_Success
Definition OrthancCPlugin.h:926
OrthancPluginJobStepStatus_Failure
@ OrthancPluginJobStepStatus_Failure
Definition OrthancCPlugin.h:927
OrthancPluginCreateDicomFlags_DecodeDataUriScheme
@ OrthancPluginCreateDicomFlags_DecodeDataUriScheme
Definition OrthancCPlugin.h:866
OrthancPluginCreateDicomFlags_GenerateIdentifiers
@ OrthancPluginCreateDicomFlags_GenerateIdentifiers
Definition OrthancCPlugin.h:867
OrthancPluginConstraintType_SmallerOrEqual
@ OrthancPluginConstraintType_SmallerOrEqual
Definition OrthancCPlugin.h:896
OrthancPluginConstraintType_List
@ OrthancPluginConstraintType_List
Definition OrthancCPlugin.h:899
OrthancPluginConstraintType_GreaterOrEqual
@ OrthancPluginConstraintType_GreaterOrEqual
Definition OrthancCPlugin.h:897
OrthancPluginConstraintType_Equal
@ OrthancPluginConstraintType_Equal
Definition OrthancCPlugin.h:895
OrthancPluginConstraintType_Wildcard
@ OrthancPluginConstraintType_Wildcard
Definition OrthancCPlugin.h:898
OrthancPluginReceivedInstanceAction_KeepAsIs
@ OrthancPluginReceivedInstanceAction_KeepAsIs
Definition OrthancCPlugin.h:1016
OrthancPluginReceivedInstanceAction_Discard
@ OrthancPluginReceivedInstanceAction_Discard
Definition OrthancCPlugin.h:1018
OrthancPluginReceivedInstanceAction_Modify
@ OrthancPluginReceivedInstanceAction_Modify
Definition OrthancCPlugin.h:1017
OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported
@ OrthancPluginStorageCommitmentFailureReason_ReferencedSOPClassNotSupported
Definition OrthancCPlugin.h:996
OrthancPluginStorageCommitmentFailureReason_Success
@ OrthancPluginStorageCommitmentFailureReason_Success
Definition OrthancCPlugin.h:982
OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID
@ OrthancPluginStorageCommitmentFailureReason_DuplicateTransactionUID
Definition OrthancCPlugin.h:1005
OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict
@ OrthancPluginStorageCommitmentFailureReason_ClassInstanceConflict
Definition OrthancCPlugin.h:1000
OrthancPluginStorageCommitmentFailureReason_ResourceLimitation
@ OrthancPluginStorageCommitmentFailureReason_ResourceLimitation
Definition OrthancCPlugin.h:992
OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance
@ OrthancPluginStorageCommitmentFailureReason_NoSuchObjectInstance
Definition OrthancCPlugin.h:988
OrthancPluginStorageCommitmentFailureReason_ProcessingFailure
@ OrthancPluginStorageCommitmentFailureReason_ProcessingFailure
Definition OrthancCPlugin.h:985
OrthancPluginMetricsType_Default
@ OrthancPluginMetricsType_Default
Definition OrthancCPlugin.h:952
OrthancPluginMetricsType_Timer
@ OrthancPluginMetricsType_Timer
Definition OrthancCPlugin.h:959
OrthancPluginValueRepresentation_PN
@ OrthancPluginValueRepresentation_PN
Definition OrthancCPlugin.h:805
OrthancPluginValueRepresentation_UL
@ OrthancPluginValueRepresentation_UL
Definition OrthancCPlugin.h:813
OrthancPluginValueRepresentation_UN
@ OrthancPluginValueRepresentation_UN
Definition OrthancCPlugin.h:814
OrthancPluginValueRepresentation_DA
@ OrthancPluginValueRepresentation_DA
Definition OrthancCPlugin.h:794
OrthancPluginValueRepresentation_OF
@ OrthancPluginValueRepresentation_OF
Definition OrthancCPlugin.h:803
OrthancPluginValueRepresentation_OW
@ OrthancPluginValueRepresentation_OW
Definition OrthancCPlugin.h:804
OrthancPluginValueRepresentation_CS
@ OrthancPluginValueRepresentation_CS
Definition OrthancCPlugin.h:793
OrthancPluginValueRepresentation_US
@ OrthancPluginValueRepresentation_US
Definition OrthancCPlugin.h:815
OrthancPluginValueRepresentation_SH
@ OrthancPluginValueRepresentation_SH
Definition OrthancCPlugin.h:806
OrthancPluginValueRepresentation_FL
@ OrthancPluginValueRepresentation_FL
Definition OrthancCPlugin.h:798
OrthancPluginValueRepresentation_DT
@ OrthancPluginValueRepresentation_DT
Definition OrthancCPlugin.h:796
OrthancPluginValueRepresentation_TM
@ OrthancPluginValueRepresentation_TM
Definition OrthancCPlugin.h:811
OrthancPluginValueRepresentation_SQ
@ OrthancPluginValueRepresentation_SQ
Definition OrthancCPlugin.h:808
OrthancPluginValueRepresentation_DS
@ OrthancPluginValueRepresentation_DS
Definition OrthancCPlugin.h:795
OrthancPluginValueRepresentation_OB
@ OrthancPluginValueRepresentation_OB
Definition OrthancCPlugin.h:802
OrthancPluginValueRepresentation_SL
@ OrthancPluginValueRepresentation_SL
Definition OrthancCPlugin.h:807
OrthancPluginValueRepresentation_ST
@ OrthancPluginValueRepresentation_ST
Definition OrthancCPlugin.h:810
OrthancPluginValueRepresentation_IS
@ OrthancPluginValueRepresentation_IS
Definition OrthancCPlugin.h:799
OrthancPluginValueRepresentation_LT
@ OrthancPluginValueRepresentation_LT
Definition OrthancCPlugin.h:801
OrthancPluginValueRepresentation_SS
@ OrthancPluginValueRepresentation_SS
Definition OrthancCPlugin.h:809
OrthancPluginValueRepresentation_UT
@ OrthancPluginValueRepresentation_UT
Definition OrthancCPlugin.h:816
OrthancPluginValueRepresentation_LO
@ OrthancPluginValueRepresentation_LO
Definition OrthancCPlugin.h:800
OrthancPluginValueRepresentation_AE
@ OrthancPluginValueRepresentation_AE
Definition OrthancCPlugin.h:790
OrthancPluginValueRepresentation_FD
@ OrthancPluginValueRepresentation_FD
Definition OrthancCPlugin.h:797
OrthancPluginValueRepresentation_UI
@ OrthancPluginValueRepresentation_UI
Definition OrthancCPlugin.h:812
OrthancPluginValueRepresentation_AS
@ OrthancPluginValueRepresentation_AS
Definition OrthancCPlugin.h:791
OrthancPluginValueRepresentation_AT
@ OrthancPluginValueRepresentation_AT
Definition OrthancCPlugin.h:792
OrthancPluginJobStopReason_Failure
@ OrthancPluginJobStopReason_Failure
Definition OrthancCPlugin.h:942
OrthancPluginJobStopReason_Success
@ OrthancPluginJobStopReason_Success
Definition OrthancCPlugin.h:940
OrthancPluginJobStopReason_Canceled
@ OrthancPluginJobStopReason_Canceled
Definition OrthancCPlugin.h:943
OrthancPluginJobStopReason_Paused
@ OrthancPluginJobStopReason_Paused
Definition OrthancCPlugin.h:941
OrthancPluginDicomToJsonFormat_Full
@ OrthancPluginDicomToJsonFormat_Full
Definition OrthancCPlugin.h:829
OrthancPluginDicomToJsonFormat_Human
@ OrthancPluginDicomToJsonFormat_Human
Definition OrthancCPlugin.h:831
OrthancPluginDicomToJsonFormat_Short
@ OrthancPluginDicomToJsonFormat_Short
Definition OrthancCPlugin.h:830
OrthancPluginHttpMethod_Delete
@ OrthancPluginHttpMethod_Delete
Definition OrthancCPlugin.h:330
OrthancPluginHttpMethod_Post
@ OrthancPluginHttpMethod_Post
Definition OrthancCPlugin.h:328
OrthancPluginHttpMethod_Put
@ OrthancPluginHttpMethod_Put
Definition OrthancCPlugin.h:329
OrthancPluginHttpMethod_Get
@ OrthancPluginHttpMethod_Get
Definition OrthancCPlugin.h:327
OrthancPluginInstanceOrigin_Unknown
@ OrthancPluginInstanceOrigin_Unknown
Definition OrthancCPlugin.h:910
OrthancPluginInstanceOrigin_RestApi
@ OrthancPluginInstanceOrigin_RestApi
Definition OrthancCPlugin.h:912
OrthancPluginInstanceOrigin_Lua
@ OrthancPluginInstanceOrigin_Lua
Definition OrthancCPlugin.h:914
OrthancPluginInstanceOrigin_WebDav
@ OrthancPluginInstanceOrigin_WebDav
Definition OrthancCPlugin.h:915
OrthancPluginInstanceOrigin_DicomProtocol
@ OrthancPluginInstanceOrigin_DicomProtocol
Definition OrthancCPlugin.h:911
OrthancPluginInstanceOrigin_Plugin
@ OrthancPluginInstanceOrigin_Plugin
Definition OrthancCPlugin.h:913
OrthancPluginContentType_Dicom
@ OrthancPluginContentType_Dicom
Definition OrthancCPlugin.h:700
OrthancPluginContentType_DicomAsJson
@ OrthancPluginContentType_DicomAsJson
Definition OrthancCPlugin.h:701
OrthancPluginContentType_Unknown
@ OrthancPluginContentType_Unknown
Definition OrthancCPlugin.h:699
OrthancPluginContentType_DicomUntilPixelData
@ OrthancPluginContentType_DicomUntilPixelData
Definition OrthancCPlugin.h:702
OrthancPluginDictionaryEntry
An entry in the dictionary of DICOM tags.
Definition OrthancCPlugin.h:1788
OrthancPluginDictionaryEntry::minMultiplicity
uint32_t minMultiplicity
Definition OrthancCPlugin.h:1792
OrthancPluginDictionaryEntry::maxMultiplicity
uint32_t maxMultiplicity
Definition OrthancCPlugin.h:1793
OrthancPluginDictionaryEntry::vr
OrthancPluginValueRepresentation vr
Definition OrthancCPlugin.h:1791
OrthancPluginDictionaryEntry::element
uint16_t element
Definition OrthancCPlugin.h:1790
OrthancPluginDictionaryEntry::group
uint16_t group
Definition OrthancCPlugin.h:1789
OrthancPluginHttpRequest
The parameters of a REST request.
Definition OrthancCPlugin.h:341
OrthancPluginHttpRequest::getValues
const char *const * getValues
For a GET request, the values of the GET parameters.
Definition OrthancCPlugin.h:370
OrthancPluginHttpRequest::groups
const char *const * groups
The matched values for the groups of the regular expression.
Definition OrthancCPlugin.h:355
OrthancPluginHttpRequest::bodySize
uint32_t bodySize
For a PUT or POST request, the number of bytes of the body.
Definition OrthancCPlugin.h:380
OrthancPluginHttpRequest::groupsCount
uint32_t groupsCount
The number of groups of the regular expression.
Definition OrthancCPlugin.h:350
OrthancPluginHttpRequest::headersKeys
const char *const * headersKeys
The keys of the HTTP headers (always converted to low-case).
Definition OrthancCPlugin.h:395
OrthancPluginHttpRequest::body
const void * body
For a PUT or POST request, the content of the body.
Definition OrthancCPlugin.h:375
OrthancPluginHttpRequest::getKeys
const char *const * getKeys
For a GET request, the keys of the GET parameters.
Definition OrthancCPlugin.h:365
OrthancPluginHttpRequest::headersCount
uint32_t headersCount
The number of HTTP headers.
Definition OrthancCPlugin.h:390
OrthancPluginHttpRequest::method
OrthancPluginHttpMethod method
The HTTP method.
Definition OrthancCPlugin.h:345
OrthancPluginHttpRequest::getCount
uint32_t getCount
For a GET request, the number of GET parameters.
Definition OrthancCPlugin.h:360
OrthancPluginHttpRequest::headersValues
const char *const * headersValues
The values of the HTTP headers.
Definition OrthancCPlugin.h:400
OrthancPluginMemoryBuffer64
A 64-bit memory buffer allocated by the core system of Orthanc.
Definition OrthancCPlugin.h:1054
OrthancPluginMemoryBuffer64::size
uint64_t size
The number of bytes in the buffer.
Definition OrthancCPlugin.h:1063
OrthancPluginMemoryBuffer64::data
void * data
The content of the buffer.
Definition OrthancCPlugin.h:1058
OrthancPluginMemoryBuffer
A 32-bit memory buffer allocated by the core system of Orthanc.
Definition OrthancCPlugin.h:1032
OrthancPluginMemoryBuffer::size
uint32_t size
The number of bytes in the buffer.
Definition OrthancCPlugin.h:1041
OrthancPluginMemoryBuffer::data
void * data
The content of the buffer.
Definition OrthancCPlugin.h:1036