Mercurial > hg > orthanc-python
view Resources/Orthanc/Sdk-1.10.0/CodeModel.json @ 203:28531e615104
documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 03 Jul 2024 12:03:09 +0200 |
parents | 8382c7dea471 |
children |
line wrap: on
line source
{ "classes": [ { "destructor": "OrthancPluginFreeDicomInstance", "methods": [ { "args": [], "c_function": "OrthancPluginGetInstanceRemoteAet", "const": true, "documentation": { "args": {}, "description": [ "This function returns the Application Entity Title (AET) of the DICOM modality from which a DICOM instance originates." ], "return": "The AET if success, NULL if error.", "summary": "Get the AET of a DICOM instance." }, "return_sdk_type": "const char *" }, { "args": [], "c_function": "OrthancPluginGetInstanceSize", "const": true, "documentation": { "args": {}, "description": [ "This function returns the number of bytes of the given DICOM instance." ], "return": "The size of the file, -1 in case of error.", "summary": "Get the size of a DICOM file." }, "return_sdk_type": "int64_t" }, { "args": [], "c_function": "OrthancPluginGetInstanceJson", "const": true, "documentation": { "args": {}, "description": [ "This function returns a pointer to a newly created string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance." ], "return": "The NULL value in case of error, or a string containing the JSON file. This string must be freed by OrthancPluginFreeString().", "summary": "Get the DICOM tag hierarchy as a JSON file." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGetInstanceSimplifiedJson", "const": true, "documentation": { "args": {}, "description": [ "This function returns a pointer to a newly created string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance. In contrast with ::OrthancPluginGetInstanceJson(), the returned JSON file is in its simplified version." ], "return": "The NULL value in case of error, or a string containing the JSON file. This string must be freed by OrthancPluginFreeString().", "summary": "Get the DICOM tag hierarchy as a JSON file (with simplification)." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "metadata", "sdk_type": "const char *" } ], "c_function": "OrthancPluginHasInstanceMetadata", "const": true, "documentation": { "args": { "metadata": "The metadata of interest." }, "description": [ "This function checks whether the DICOM instance of interest is associated with some metadata. As of Orthanc 0.8.1, in the callbacks registered by ::OrthancPluginRegisterOnStoredInstanceCallback(), the only possibly available metadata are \"ReceptionDate\", \"RemoteAET\" and \"IndexInSeries\"." ], "return": "1 if the metadata is present, 0 if it is absent, -1 in case of error.", "summary": "Check whether a DICOM instance is associated with some metadata." }, "return_sdk_type": "int32_t" }, { "args": [ { "name": "arg0", "sdk_name": "metadata", "sdk_type": "const char *" } ], "c_function": "OrthancPluginGetInstanceMetadata", "const": true, "documentation": { "args": { "metadata": "The metadata of interest." }, "description": [ "This functions returns the value of some metadata that is associated with the DICOM instance of interest. Before calling this function, the existence of the metadata must have been checked with ::OrthancPluginHasInstanceMetadata()." ], "return": "The metadata value if success, NULL if error. Please note that the returned string belongs to the instance object and must NOT be deallocated. Please make a copy of the string if you wish to access it later.", "summary": "Get the value of some metadata associated with a given DICOM instance." }, "return_sdk_type": "const char *" }, { "args": [], "c_function": "OrthancPluginGetInstanceOrigin", "const": true, "documentation": { "args": {}, "description": [ "This function returns the origin of a DICOM instance that has been received by Orthanc." ], "return": "The origin of the instance.", "summary": "Get the origin of a DICOM file." }, "return_sdk_enumeration": "OrthancPluginInstanceOrigin", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginGetInstanceTransferSyntaxUid", "const": true, "documentation": { "args": {}, "description": [ "This function returns a pointer to a newly created string that contains the transfer syntax UID of the DICOM instance. The empty string might be returned if this information is unknown." ], "return": "The NULL value in case of error, or a string containing the transfer syntax UID. This string must be freed by OrthancPluginFreeString().", "summary": "Get the transfer syntax of a DICOM file." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginHasInstancePixelData", "const": true, "documentation": { "args": {}, "description": [ "This function returns a Boolean value indicating whether the DICOM instance contains the pixel data (7FE0,0010) tag." ], "return": "\"1\" if the DICOM instance contains pixel data, or \"0\" if the tag is missing, or \"-1\" in the case of an error.", "summary": "Check whether the DICOM file has pixel data." }, "return_sdk_type": "int32_t" }, { "args": [], "c_function": "OrthancPluginGetInstanceFramesCount", "const": true, "documentation": { "args": {}, "description": [ "This function returns the number of frames that are part of a DICOM image managed by the Orthanc core." ], "return": "The number of frames (will be zero in the case of an error).", "summary": "Get the number of frames in a DICOM instance." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "frameIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetInstanceRawFrame", "const": true, "documentation": { "args": { "frameIndex": "The index of the frame of interest.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "This function returns a memory buffer containing the raw content of a frame in a DICOM instance that is managed by the Orthanc core. This is notably useful for compressed transfer syntaxes, as it gives access to the embedded files (such as JPEG, JPEG-LS or JPEG2k). The Orthanc core transparently reassembles the fragments to extract the raw frame." ], "return": "0 if success, or the error code if failure.", "summary": "Get the raw content of a frame in a DICOM instance." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "frameIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetInstanceDecodedFrame", "const": true, "documentation": { "args": { "frameIndex": "The index of the frame of interest." }, "description": [ "This function decodes one frame of a DICOM image that is managed by the Orthanc core." ], "return": "The uncompressed image. It must be freed with OrthancPluginFreeImage().", "summary": "Decode one frame from a DICOM instance." }, "return_sdk_class": "OrthancPluginImage", "return_sdk_type": "object" }, { "args": [], "c_function": "OrthancPluginSerializeDicomInstance", "const": true, "documentation": { "args": { "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "This function returns a memory buffer containing the serialization of a DICOM instance that is managed by the Orthanc core." ], "return": "0 if success, or the error code if failure.", "summary": "Writes a DICOM instance to a memory buffer." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginDicomToJsonFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_enumeration": "OrthancPluginDicomToJsonFlags", "sdk_name": "flags", "sdk_type": "enumeration" }, { "name": "arg2", "sdk_name": "maxStringLength", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetInstanceAdvancedJson", "const": true, "documentation": { "args": { "flags": "Flags governing the output.", "format": "The output format.", "maxStringLength": "The maximum length of a field. Too long fields will be output as \"null\". The 0 value means no maximum length." }, "description": [ "This function takes as DICOM instance managed by the Orthanc core, and outputs a JSON string representing the tags of this DICOM file." ], "return": "The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().", "summary": "Format a DICOM memory buffer as a JSON string." }, "return_sdk_type": "char *" } ], "name": "OrthancPluginDicomInstance" }, { "methods": [], "name": "OrthancPluginDicomWebNode" }, { "methods": [ { "args": [ { "name": "arg0", "sdk_name": "dicom", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginFindAddAnswer", "const": false, "documentation": { "args": { "dicom": "The answer to be added, encoded as a DICOM file.", "size": "The size of the DICOM file." }, "description": [ "This function adds one answer (encoded as a DICOM file) to the set of answers corresponding to some C-Find SCP request that is not related to modality worklists." ], "return": "0 if success, other value if error.", "summary": "Add one answer to some C-Find request." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginFindMarkIncomplete", "const": false, "documentation": { "args": {}, "description": [ "This function marks as incomplete the set of answers corresponding to some C-Find SCP request that is not related to modality worklists. This must be used if canceling the handling of a request when too many answers are to be returned." ], "return": "0 if success, other value if error.", "summary": "Mark the set of C-Find answers as incomplete." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" } ], "name": "OrthancPluginFindAnswers" }, { "destructor": "OrthancPluginFreeFindMatcher", "methods": [ { "args": [ { "name": "arg0", "sdk_name": "dicom", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginFindMatcherIsMatch", "const": true, "documentation": { "args": { "dicom": "The DICOM instance to be matched.", "size": "The size of the DICOM instance." }, "description": [ "This function checks whether one DICOM instance matches C-Find matcher that was previously allocated using OrthancPluginCreateFindMatcher()." ], "return": "1 if the DICOM instance matches the query, 0 otherwise.", "summary": "Test whether a DICOM instance matches a C-Find query." }, "return_sdk_type": "int32_t" } ], "name": "OrthancPluginFindMatcher" }, { "methods": [ { "args": [], "c_function": "OrthancPluginGetFindQuerySize", "const": true, "documentation": { "args": {}, "description": [ "This function returns the number of tags that are contained in the given C-Find query." ], "return": "The number of tags.", "summary": "Get the number of tags in a C-Find query." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "index", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetFindQueryTagName", "const": true, "documentation": { "args": { "index": "The index of the tag of interest." }, "description": [ "This function returns the symbolic name of one DICOM tag in the given C-Find query." ], "return": "0 if success, other value if error.", "summary": "Get the symbolic name of one tag in a C-Find query." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "index", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetFindQueryValue", "const": true, "documentation": { "args": { "index": "The index of the tag of interest." }, "description": [ "This function returns the value associated with one tag in the given C-Find query." ], "return": "0 if success, other value if error.", "summary": "Get the value associated with one tag in a C-Find query." }, "return_sdk_type": "char *" } ], "name": "OrthancPluginFindQuery" }, { "destructor": "OrthancPluginFreeImage", "methods": [ { "args": [], "c_function": "OrthancPluginGetImagePixelFormat", "const": true, "documentation": { "args": {}, "description": [ "This function returns the type of memory layout for the pixels of the given image." ], "return": "The pixel format.", "summary": "Return the pixel format of an image." }, "return_sdk_enumeration": "OrthancPluginPixelFormat", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginGetImageWidth", "const": true, "documentation": { "args": {}, "description": [ "This function returns the width of the given image." ], "return": "The width.", "summary": "Return the width of an image." }, "return_sdk_type": "uint32_t" }, { "args": [], "c_function": "OrthancPluginGetImageHeight", "const": true, "documentation": { "args": {}, "description": [ "This function returns the height of the given image." ], "return": "The height.", "summary": "Return the height of an image." }, "return_sdk_type": "uint32_t" }, { "args": [], "c_function": "OrthancPluginGetImagePitch", "const": true, "documentation": { "args": {}, "description": [ "This function returns the pitch of the given image. The pitch is defined as the number of bytes between 2 successive lines of the image in the memory buffer." ], "return": "The pitch.", "summary": "Return the pitch of an image." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "targetFormat", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginConvertPixelFormat", "const": true, "documentation": { "args": { "targetFormat": "The target pixel format." }, "description": [ "This function creates a new image, changing the memory layout of the pixels." ], "return": "The resulting image. It must be freed with OrthancPluginFreeImage().", "summary": "Change the pixel format of an image." }, "return_sdk_class": "OrthancPluginImage", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_name": "fontIndex", "sdk_type": "uint32_t" }, { "name": "arg1", "sdk_name": "utf8Text", "sdk_type": "const char *" }, { "name": "arg2", "sdk_name": "x", "sdk_type": "int32_t" }, { "name": "arg3", "sdk_name": "y", "sdk_type": "int32_t" }, { "name": "arg4", "sdk_name": "r", "sdk_type": "uint8_t" }, { "name": "arg5", "sdk_name": "g", "sdk_type": "uint8_t" }, { "name": "arg6", "sdk_name": "b", "sdk_type": "uint8_t" } ], "c_function": "OrthancPluginDrawText", "const": false, "documentation": { "args": { "b": "The value of the blue color channel of the text.", "fontIndex": "The index of the font. This value must be less than OrthancPluginGetFontsCount().", "g": "The value of the green color channel of the text.", "r": "The value of the red color channel of the text.", "utf8Text": "The text to be drawn, encoded as an UTF-8 zero-terminated string.", "x": "The X position of the text over the image.", "y": "The Y position of the text over the image." }, "description": [ "This function draws some text on some image." ], "return": "0 if success, other value if error.", "summary": "Draw text on an image." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" } ], "name": "OrthancPluginImage" }, { "destructor": "OrthancPluginFreeJob", "methods": [ { "args": [ { "name": "arg0", "sdk_name": "priority", "sdk_type": "int32_t" } ], "c_function": "OrthancPluginSubmitJob", "const": false, "documentation": { "args": { "priority": "The priority of the job." }, "description": [ "This function adds the given job to the pending jobs of Orthanc. Orthanc will take take of freeing it by invoking the finalization callback provided to OrthancPluginCreateJob()." ], "return": "ID of the newly-submitted job. This string must be freed by OrthancPluginFreeString().", "summary": "Submit a new job to the jobs engine of Orthanc." }, "return_sdk_type": "char *" } ], "name": "OrthancPluginJob" }, { "destructor": "OrthancPluginFreePeers", "methods": [ { "args": [], "c_function": "OrthancPluginGetPeersCount", "const": true, "documentation": { "args": {}, "description": [ "This function returns the number of Orthanc peers.", "This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function." ], "return": "The number of peers.", "summary": "Get the number of Orthanc peers." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "peerIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetPeerName", "const": true, "documentation": { "args": { "peerIndex": "The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount()." }, "description": [ "This function returns the symbolic name of the Orthanc peer, which corresponds to the key of the \"OrthancPeers\" configuration option of Orthanc.", "This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function." ], "return": "The symbolic name, or NULL in the case of an error.", "summary": "Get the symbolic name of an Orthanc peer." }, "return_sdk_type": "const char *" }, { "args": [ { "name": "arg0", "sdk_name": "peerIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetPeerUrl", "const": true, "documentation": { "args": { "peerIndex": "The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount()." }, "description": [ "This function returns the base URL to the REST API of some Orthanc peer.", "This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function." ], "return": "The URL, or NULL in the case of an error.", "summary": "Get the base URL of an Orthanc peer." }, "return_sdk_type": "const char *" }, { "args": [ { "name": "arg0", "sdk_name": "peerIndex", "sdk_type": "uint32_t" }, { "name": "arg1", "sdk_name": "userProperty", "sdk_type": "const char *" } ], "c_function": "OrthancPluginGetPeerUserProperty", "const": true, "documentation": { "args": { "peerIndex": "The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount().", "userProperty": "The user property of interest." }, "description": [ "This function returns some user-defined property of some Orthanc peer. An user-defined property is a property that is associated with the peer in the Orthanc configuration file, but that is not recognized by the Orthanc core.", "This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function." ], "return": "The value of the user property, or NULL if it is not defined.", "summary": "Get some user-defined property of an Orthanc peer." }, "return_sdk_type": "const char *" } ], "name": "OrthancPluginPeers" }, { "methods": [ { "args": [ { "name": "arg0", "sdk_name": "answer", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_name": "mimeType", "sdk_type": "const char *" } ], "c_function": "OrthancPluginAnswerBuffer", "const": false, "documentation": { "args": { "answer": "Pointer to the memory buffer containing the answer.", "answerSize": "Number of bytes of the answer.", "mimeType": "The MIME type of the answer." }, "description": [ "This function answers to a REST request with the content of a memory buffer." ], "summary": "Answer to a REST request." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_name": "width", "sdk_type": "uint32_t" }, { "name": "arg2", "sdk_name": "height", "sdk_type": "uint32_t" }, { "name": "arg3", "sdk_name": "pitch", "sdk_type": "uint32_t" }, { "name": "arg4", "sdk_name": "buffer", "sdk_type": "const void *" } ], "c_function": "OrthancPluginCompressAndAnswerPngImage", "const": false, "documentation": { "args": { "buffer": "The memory buffer containing the uncompressed image.", "format": "The memory layout of the uncompressed image.", "height": "The height of the image.", "pitch": "The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).", "width": "The width of the image." }, "description": [ "This function answers to a REST request with a PNG image. The parameters of this function describe a memory buffer that contains an uncompressed image. The image will be automatically compressed as a PNG image by the core system of Orthanc." ], "summary": "Answer to a REST request with a PNG image." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "redirection", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRedirect", "const": false, "documentation": { "args": { "redirection": "Where to redirect." }, "description": [ "This function answers to a REST request by redirecting the user to another URI using HTTP status 301." ], "summary": "Redirect a REST request." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "status", "sdk_type": "uint16_t" } ], "c_function": "OrthancPluginSendHttpStatusCode", "const": false, "documentation": { "args": { "status": "The HTTP status code to be sent." }, "description": [ "This function answers to a REST request by sending a HTTP status code (such as \"400 - Bad Request\"). Note that: - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). - Redirections (status 301) must use ::OrthancPluginRedirect(). - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed()." ], "summary": "Send a HTTP status code." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "realm", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSendUnauthorized", "const": false, "documentation": { "args": { "realm": "The realm for the authorization process." }, "description": [ "This function answers to a REST request by signaling that it is not authorized." ], "summary": "Signal that a REST request is not authorized." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "allowedMethods", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSendMethodNotAllowed", "const": false, "documentation": { "args": { "allowedMethods": "The allowed methods for this URI (e.g. \"GET,POST\" after a PUT or a POST request)." }, "description": [ "This function answers to a REST request by signaling that the queried URI does not support this method." ], "summary": "Signal that this URI does not support this HTTP method." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "cookie", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "value", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSetCookie", "const": false, "documentation": { "args": { "cookie": "The cookie to be set.", "value": "The value of the cookie." }, "description": [ "This function sets a cookie in the HTTP client." ], "summary": "Set a cookie." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "key", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "value", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSetHttpHeader", "const": false, "documentation": { "args": { "key": "The HTTP header to be set.", "value": "The value of the HTTP header." }, "description": [ "This function sets a HTTP header in the HTTP answer." ], "summary": "Set some HTTP header." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "subType", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "contentType", "sdk_type": "const char *" } ], "c_function": "OrthancPluginStartMultipartAnswer", "const": false, "documentation": { "args": { "contentType": "The MIME type of the items in the multipart answer.", "subType": "The sub-type of the multipart answer (\"mixed\" or \"related\")." }, "description": [ "Initiates a HTTP multipart answer, as the result of a REST request." ], "return": "0 if success, or the error code if failure.", "summary": "Start an HTTP multipart answer." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "answer", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginSendMultipartItem", "const": false, "documentation": { "args": { "answer": "Pointer to the memory buffer containing the item.", "answerSize": "Number of bytes of the item." }, "description": [ "This function sends an item as a part of some HTTP multipart answer that was initiated by OrthancPluginStartMultipartAnswer()." ], "return": "0 if success, or the error code if failure (this notably happens if the connection is closed by the client).", "summary": "Send an item as a part of some HTTP multipart answer." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "status", "sdk_type": "uint16_t" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginSendHttpStatus", "const": false, "documentation": { "args": { "body": "The body of the answer.", "bodySize": "The size of the body.", "status": "The HTTP status code to be sent." }, "description": [ "This function answers to a HTTP request by sending a HTTP status code (such as \"400 - Bad Request\"), together with a body describing the error. The body will only be returned if the configuration option \"HttpDescribeErrors\" of Orthanc is set to \"true\".", "Note that: - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). - Redirections (status 301) must use ::OrthancPluginRedirect(). - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed()." ], "summary": "Send a HTTP status, with a custom body." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_name": "width", "sdk_type": "uint32_t" }, { "name": "arg2", "sdk_name": "height", "sdk_type": "uint32_t" }, { "name": "arg3", "sdk_name": "pitch", "sdk_type": "uint32_t" }, { "name": "arg4", "sdk_name": "buffer", "sdk_type": "const void *" }, { "name": "arg5", "sdk_name": "quality", "sdk_type": "uint8_t" } ], "c_function": "OrthancPluginCompressAndAnswerJpegImage", "const": false, "documentation": { "args": { "buffer": "The memory buffer containing the uncompressed image.", "format": "The memory layout of the uncompressed image.", "height": "The height of the image.", "pitch": "The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).", "quality": "The quality of the JPEG encoding, between 1 (worst quality, best compression) and 100 (best quality, worst compression).", "width": "The width of the image." }, "description": [ "This function answers to a REST request with a JPEG image. The parameters of this function describe a memory buffer that contains an uncompressed image. The image will be automatically compressed as a JPEG image by the core system of Orthanc." ], "summary": "Answer to a REST request with a JPEG image." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "details", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "log", "sdk_type": "uint8_t" } ], "c_function": "OrthancPluginSetHttpErrorDetails", "const": false, "documentation": { "args": { "details": "The details of the error message.", "log": "Whether to also write the detailed error to the Orthanc logs." }, "description": [ "This function sets the detailed description associated with an HTTP error. This description will be displayed in the \"Details\" field of the JSON body of the HTTP answer. It is only taken into consideration if the REST callback returns an error code that is different from \"OrthancPluginErrorCode_Success\", and if the \"HttpDescribeErrors\" configuration option of Orthanc is set to \"true\"." ], "summary": "Provide a detailed description for an HTTP error." }, "return_sdk_type": "void" } ], "name": "OrthancPluginRestOutput" }, { "methods": [], "name": "OrthancPluginServerChunkedRequestReader" }, { "methods": [ { "args": [ { "name": "arg0", "sdk_name": "uuid", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "content", "sdk_type": "const void *" }, { "name": "arg2", "sdk_name": "size", "sdk_type": "uint64_t" }, { "name": "arg3", "sdk_enumeration": "OrthancPluginContentType", "sdk_name": "type", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginStorageAreaCreate", "const": false, "documentation": { "args": { "content": "The content to store in the newly created file.", "size": "The size of the content.", "type": "The type of the file content.", "uuid": "The identifier of the file to be created." }, "description": [ "This function creates a new file inside the storage area that is currently used by Orthanc." ], "return": "0 if success, other value if error.", "summary": "Create a file inside the storage area." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "uuid", "sdk_type": "const char *" }, { "name": "arg1", "sdk_enumeration": "OrthancPluginContentType", "sdk_name": "type", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginStorageAreaRead", "const": false, "documentation": { "args": { "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "type": "The type of the file content.", "uuid": "The identifier of the file to be read." }, "description": [ "This function reads the content of a given file from the storage area that is currently used by Orthanc." ], "return": "0 if success, other value if error.", "summary": "Read a file from the storage area." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uuid", "sdk_type": "const char *" }, { "name": "arg1", "sdk_enumeration": "OrthancPluginContentType", "sdk_name": "type", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginStorageAreaRemove", "const": false, "documentation": { "args": { "type": "The type of the file content.", "uuid": "The identifier of the file to be removed." }, "description": [ "This function removes a given file from the storage area that is currently used by Orthanc." ], "return": "0 if success, other value if error.", "summary": "Remove a file from the storage area." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginResourceType", "sdk_name": "level", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginReconstructMainDicomTags", "const": false, "documentation": { "args": { "level": "The type of the resources of interest." }, "description": [ "This function requests the Orthanc core to reconstruct the main DICOM tags of all the resources of the given type. This function can only be used as a part of the upgrade of a custom database back-end. A database transaction will be automatically setup." ], "return": "0 if success, other value if error.", "summary": "Reconstruct the main DICOM tags." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" } ], "name": "OrthancPluginStorageArea" }, { "methods": [ { "args": [ { "name": "arg0", "sdk_class": "OrthancPluginWorklistQuery", "sdk_name": "query", "sdk_type": "const_object" }, { "name": "arg1", "sdk_name": "dicom", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginWorklistAddAnswer", "const": false, "documentation": { "args": { "dicom": "The worklist to answer, encoded as a DICOM file.", "query": "The worklist query, as received by the callback.", "size": "The size of the DICOM file." }, "description": [ "This function adds one worklist (encoded as a DICOM file) to the set of answers corresponding to some C-Find SCP request against modality worklists." ], "return": "0 if success, other value if error.", "summary": "Add one answer to some modality worklist request." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginWorklistMarkIncomplete", "const": false, "documentation": { "args": {}, "description": [ "This function marks as incomplete the set of answers corresponding to some C-Find SCP request against modality worklists. This must be used if canceling the handling of a request when too many answers are to be returned." ], "return": "0 if success, other value if error.", "summary": "Mark the set of worklist answers as incomplete." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" } ], "name": "OrthancPluginWorklistAnswers" }, { "methods": [ { "args": [ { "name": "arg0", "sdk_name": "dicom", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginWorklistIsMatch", "const": true, "documentation": { "args": { "dicom": "The worklist to answer, encoded as a DICOM file.", "size": "The size of the DICOM file." }, "description": [ "This function checks whether one worklist (encoded as a DICOM file) matches the C-Find SCP query against modality worklists. This function must be called before adding the worklist as an answer through OrthancPluginWorklistAddAnswer()." ], "return": "1 if the worklist matches the query, 0 otherwise.", "summary": "Test whether a worklist matches the query." }, "return_sdk_type": "int32_t" }, { "args": [], "c_function": "OrthancPluginWorklistGetDicomQuery", "const": true, "documentation": { "args": { "target": "Memory buffer where to store the DICOM file. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "This function retrieves the DICOM file that underlies a C-Find SCP query against modality worklists." ], "return": "0 if success, other value if error.", "summary": "Retrieve the worklist query as a DICOM file." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" } ], "name": "OrthancPluginWorklistQuery" } ], "enumerations": [ { "documentation": "The supported types of changes that can be signaled to the change callback.", "name": "OrthancPluginChangeType", "values": [ { "documentation": "Series is now complete", "key": "CompletedSeries", "value": 0 }, { "documentation": "Deleted resource", "key": "Deleted", "value": 1 }, { "documentation": "A new instance was added to this resource", "key": "NewChildInstance", "value": 2 }, { "documentation": "New instance received", "key": "NewInstance", "value": 3 }, { "documentation": "New patient created", "key": "NewPatient", "value": 4 }, { "documentation": "New series created", "key": "NewSeries", "value": 5 }, { "documentation": "New study created", "key": "NewStudy", "value": 6 }, { "documentation": "Timeout: No new instance in this patient", "key": "StablePatient", "value": 7 }, { "documentation": "Timeout: No new instance in this series", "key": "StableSeries", "value": 8 }, { "documentation": "Timeout: No new instance in this study", "key": "StableStudy", "value": 9 }, { "documentation": "Orthanc has started", "key": "OrthancStarted", "value": 10 }, { "documentation": "Orthanc is stopping", "key": "OrthancStopped", "value": 11 }, { "documentation": "Some user-defined attachment has changed for this resource", "key": "UpdatedAttachment", "value": 12 }, { "documentation": "Some user-defined metadata has changed for this resource", "key": "UpdatedMetadata", "value": 13 }, { "documentation": "The list of Orthanc peers has changed", "key": "UpdatedPeers", "value": 14 }, { "documentation": "The list of DICOM modalities has changed", "key": "UpdatedModalities", "value": 15 }, { "documentation": "New Job submitted", "key": "JobSubmitted", "value": 16 }, { "documentation": "A Job has completed successfully", "key": "JobSuccess", "value": 17 }, { "documentation": "A Job has failed", "key": "JobFailure", "value": 18 } ] }, { "documentation": "The compression algorithms that are supported by the Orthanc core.", "name": "OrthancPluginCompressionType", "values": [ { "documentation": "Standard zlib compression", "key": "Zlib", "value": 0 }, { "documentation": "zlib, prefixed with uncompressed size (uint64_t)", "key": "ZlibWithSize", "value": 1 }, { "documentation": "Standard gzip compression", "key": "Gzip", "value": 2 }, { "documentation": "gzip, prefixed with uncompressed size (uint64_t)", "key": "GzipWithSize", "value": 3 } ] }, { "documentation": "The constraints on the tags (main DICOM tags and identifier tags) that must be supported by the database plugins.", "name": "OrthancPluginConstraintType", "values": [ { "documentation": "Equal", "key": "Equal", "value": 1 }, { "documentation": "Less or equal", "key": "SmallerOrEqual", "value": 2 }, { "documentation": "More or equal", "key": "GreaterOrEqual", "value": 3 }, { "documentation": "Wildcard matching", "key": "Wildcard", "value": 4 }, { "documentation": "List of values", "key": "List", "value": 5 } ] }, { "documentation": "The content types that are supported by Orthanc plugins.", "name": "OrthancPluginContentType", "values": [ { "documentation": "Unknown content type", "key": "Unknown", "value": 0 }, { "documentation": "DICOM", "key": "Dicom", "value": 1 }, { "documentation": "JSON summary of a DICOM file", "key": "DicomAsJson", "value": 2 }, { "documentation": "DICOM Header till pixel data", "key": "DicomUntilPixelData", "value": 3 } ] }, { "documentation": "Flags to the creation of a DICOM file.", "name": "OrthancPluginCreateDicomFlags", "values": [ { "documentation": "Default mode", "key": "None", "value": 0 }, { "documentation": "Decode fields encoded using data URI scheme", "key": "DecodeDataUriScheme", "value": 1 }, { "documentation": "Automatically generate DICOM identifiers", "key": "GenerateIdentifiers", "value": 2 } ] }, { "documentation": "Flags to customize a DICOM-to-JSON conversion. By default, binary tags are formatted using Data URI scheme.", "name": "OrthancPluginDicomToJsonFlags", "values": [ { "documentation": "Default formatting", "key": "None", "value": 0 }, { "documentation": "Include the binary tags", "key": "IncludeBinary", "value": 1 }, { "documentation": "Include the private tags", "key": "IncludePrivateTags", "value": 2 }, { "documentation": "Include the tags unknown by the dictionary", "key": "IncludeUnknownTags", "value": 4 }, { "documentation": "Include the pixel data", "key": "IncludePixelData", "value": 8 }, { "documentation": "Output binary tags as-is, dropping non-ASCII", "key": "ConvertBinaryToAscii", "value": 16 }, { "documentation": "Signal binary tags as null values", "key": "ConvertBinaryToNull", "value": 32 }, { "documentation": "Stop processing after pixel data (new in 1.9.1)", "key": "StopAfterPixelData", "value": 64 }, { "documentation": "Skip tags whose element is zero (new in 1.9.1)", "key": "SkipGroupLengths", "value": 128 } ] }, { "documentation": "The possible output formats for a DICOM-to-JSON conversion.", "name": "OrthancPluginDicomToJsonFormat", "values": [ { "documentation": "Full output, with most details", "key": "Full", "value": 1 }, { "documentation": "Tags output as hexadecimal numbers", "key": "Short", "value": 2 }, { "documentation": "Human-readable JSON", "key": "Human", "value": 3 } ] }, { "documentation": "The available modes to export a binary DICOM tag into a DICOMweb JSON or XML document.", "name": "OrthancPluginDicomWebBinaryMode", "values": [ { "documentation": "Don't include binary tags", "key": "Ignore", "value": 0 }, { "documentation": "Inline encoding using Base64", "key": "InlineBinary", "value": 1 }, { "documentation": "Use a bulk data URI field", "key": "BulkDataUri", "value": 2 } ] }, { "documentation": "The various error codes that can be returned by the Orthanc core.", "name": "OrthancPluginErrorCode", "values": [ { "documentation": "Internal error", "key": "InternalError", "value": -1 }, { "documentation": "Success", "key": "Success", "value": 0 }, { "documentation": "Error encountered within the plugin engine", "key": "Plugin", "value": 1 }, { "documentation": "Not implemented yet", "key": "NotImplemented", "value": 2 }, { "documentation": "Parameter out of range", "key": "ParameterOutOfRange", "value": 3 }, { "documentation": "The server hosting Orthanc is running out of memory", "key": "NotEnoughMemory", "value": 4 }, { "documentation": "Bad type for a parameter", "key": "BadParameterType", "value": 5 }, { "documentation": "Bad sequence of calls", "key": "BadSequenceOfCalls", "value": 6 }, { "documentation": "Accessing an inexistent item", "key": "InexistentItem", "value": 7 }, { "documentation": "Bad request", "key": "BadRequest", "value": 8 }, { "documentation": "Error in the network protocol", "key": "NetworkProtocol", "value": 9 }, { "documentation": "Error while calling a system command", "key": "SystemCommand", "value": 10 }, { "documentation": "Error with the database engine", "key": "Database", "value": 11 }, { "documentation": "Badly formatted URI", "key": "UriSyntax", "value": 12 }, { "documentation": "Inexistent file", "key": "InexistentFile", "value": 13 }, { "documentation": "Cannot write to file", "key": "CannotWriteFile", "value": 14 }, { "documentation": "Bad file format", "key": "BadFileFormat", "value": 15 }, { "documentation": "Timeout", "key": "Timeout", "value": 16 }, { "documentation": "Unknown resource", "key": "UnknownResource", "value": 17 }, { "documentation": "Incompatible version of the database", "key": "IncompatibleDatabaseVersion", "value": 18 }, { "documentation": "The file storage is full", "key": "FullStorage", "value": 19 }, { "documentation": "Corrupted file (e.g. inconsistent MD5 hash)", "key": "CorruptedFile", "value": 20 }, { "documentation": "Inexistent tag", "key": "InexistentTag", "value": 21 }, { "documentation": "Cannot modify a read-only data structure", "key": "ReadOnly", "value": 22 }, { "documentation": "Incompatible format of the images", "key": "IncompatibleImageFormat", "value": 23 }, { "documentation": "Incompatible size of the images", "key": "IncompatibleImageSize", "value": 24 }, { "documentation": "Error while using a shared library (plugin)", "key": "SharedLibrary", "value": 25 }, { "documentation": "Plugin invoking an unknown service", "key": "UnknownPluginService", "value": 26 }, { "documentation": "Unknown DICOM tag", "key": "UnknownDicomTag", "value": 27 }, { "documentation": "Cannot parse a JSON document", "key": "BadJson", "value": 28 }, { "documentation": "Bad credentials were provided to an HTTP request", "key": "Unauthorized", "value": 29 }, { "documentation": "Badly formatted font file", "key": "BadFont", "value": 30 }, { "documentation": "The plugin implementing a custom database back-end does not fulfill the proper interface", "key": "DatabasePlugin", "value": 31 }, { "documentation": "Error in the plugin implementing a custom storage area", "key": "StorageAreaPlugin", "value": 32 }, { "documentation": "The request is empty", "key": "EmptyRequest", "value": 33 }, { "documentation": "Cannot send a response which is acceptable according to the Accept HTTP header", "key": "NotAcceptable", "value": 34 }, { "documentation": "Cannot handle a NULL pointer", "key": "NullPointer", "value": 35 }, { "documentation": "The database is currently not available (probably a transient situation)", "key": "DatabaseUnavailable", "value": 36 }, { "documentation": "This job was canceled", "key": "CanceledJob", "value": 37 }, { "documentation": "Geometry error encountered in Stone", "key": "BadGeometry", "value": 38 }, { "documentation": "Cannot initialize SSL encryption, check out your certificates", "key": "SslInitialization", "value": 39 }, { "documentation": "Calling a function that has been removed from the Orthanc Framework", "key": "DiscontinuedAbi", "value": 40 }, { "documentation": "Incorrect range request", "key": "BadRange", "value": 41 }, { "documentation": "Database could not serialize access due to concurrent update, the transaction should be retried", "key": "DatabaseCannotSerialize", "value": 42 }, { "documentation": "A bad revision number was provided, which might indicate conflict between multiple writers", "key": "Revision", "value": 43 }, { "documentation": "SQLite: The database is not opened", "key": "SQLiteNotOpened", "value": 1000 }, { "documentation": "SQLite: Connection is already open", "key": "SQLiteAlreadyOpened", "value": 1001 }, { "documentation": "SQLite: Unable to open the database", "key": "SQLiteCannotOpen", "value": 1002 }, { "documentation": "SQLite: This cached statement is already being referred to", "key": "SQLiteStatementAlreadyUsed", "value": 1003 }, { "documentation": "SQLite: Cannot execute a command", "key": "SQLiteExecute", "value": 1004 }, { "documentation": "SQLite: Rolling back a nonexistent transaction (have you called Begin()?)", "key": "SQLiteRollbackWithoutTransaction", "value": 1005 }, { "documentation": "SQLite: Committing a nonexistent transaction", "key": "SQLiteCommitWithoutTransaction", "value": 1006 }, { "documentation": "SQLite: Unable to register a function", "key": "SQLiteRegisterFunction", "value": 1007 }, { "documentation": "SQLite: Unable to flush the database", "key": "SQLiteFlush", "value": 1008 }, { "documentation": "SQLite: Cannot run a cached statement", "key": "SQLiteCannotRun", "value": 1009 }, { "documentation": "SQLite: Cannot step over a cached statement", "key": "SQLiteCannotStep", "value": 1010 }, { "documentation": "SQLite: Bing a value while out of range (serious error)", "key": "SQLiteBindOutOfRange", "value": 1011 }, { "documentation": "SQLite: Cannot prepare a cached statement", "key": "SQLitePrepareStatement", "value": 1012 }, { "documentation": "SQLite: Beginning the same transaction twice", "key": "SQLiteTransactionAlreadyStarted", "value": 1013 }, { "documentation": "SQLite: Failure when committing the transaction", "key": "SQLiteTransactionCommit", "value": 1014 }, { "documentation": "SQLite: Cannot start a transaction", "key": "SQLiteTransactionBegin", "value": 1015 }, { "documentation": "The directory to be created is already occupied by a regular file", "key": "DirectoryOverFile", "value": 2000 }, { "documentation": "Unable to create a subdirectory or a file in the file storage", "key": "FileStorageCannotWrite", "value": 2001 }, { "documentation": "The specified path does not point to a directory", "key": "DirectoryExpected", "value": 2002 }, { "documentation": "The TCP port of the HTTP server is privileged or already in use", "key": "HttpPortInUse", "value": 2003 }, { "documentation": "The TCP port of the DICOM server is privileged or already in use", "key": "DicomPortInUse", "value": 2004 }, { "documentation": "This HTTP status is not allowed in a REST API", "key": "BadHttpStatusInRest", "value": 2005 }, { "documentation": "The specified path does not point to a regular file", "key": "RegularFileExpected", "value": 2006 }, { "documentation": "Unable to get the path to the executable", "key": "PathToExecutable", "value": 2007 }, { "documentation": "Cannot create a directory", "key": "MakeDirectory", "value": 2008 }, { "documentation": "An application entity title (AET) cannot be empty or be longer than 16 characters", "key": "BadApplicationEntityTitle", "value": 2009 }, { "documentation": "No request handler factory for DICOM C-FIND SCP", "key": "NoCFindHandler", "value": 2010 }, { "documentation": "No request handler factory for DICOM C-MOVE SCP", "key": "NoCMoveHandler", "value": 2011 }, { "documentation": "No request handler factory for DICOM C-STORE SCP", "key": "NoCStoreHandler", "value": 2012 }, { "documentation": "No application entity filter", "key": "NoApplicationEntityFilter", "value": 2013 }, { "documentation": "DicomUserConnection: Unable to find the SOP class and instance", "key": "NoSopClassOrInstance", "value": 2014 }, { "documentation": "DicomUserConnection: No acceptable presentation context for modality", "key": "NoPresentationContext", "value": 2015 }, { "documentation": "DicomUserConnection: The C-FIND command is not supported by the remote SCP", "key": "DicomFindUnavailable", "value": 2016 }, { "documentation": "DicomUserConnection: The C-MOVE command is not supported by the remote SCP", "key": "DicomMoveUnavailable", "value": 2017 }, { "documentation": "Cannot store an instance", "key": "CannotStoreInstance", "value": 2018 }, { "documentation": "Only string values are supported when creating DICOM instances", "key": "CreateDicomNotString", "value": 2019 }, { "documentation": "Trying to override a value inherited from a parent module", "key": "CreateDicomOverrideTag", "value": 2020 }, { "documentation": "Use \\\"Content\\\" to inject an image into a new DICOM instance", "key": "CreateDicomUseContent", "value": 2021 }, { "documentation": "No payload is present for one instance in the series", "key": "CreateDicomNoPayload", "value": 2022 }, { "documentation": "The payload of the DICOM instance must be specified according to Data URI scheme", "key": "CreateDicomUseDataUriScheme", "value": 2023 }, { "documentation": "Trying to attach a new DICOM instance to an inexistent resource", "key": "CreateDicomBadParent", "value": 2024 }, { "documentation": "Trying to attach a new DICOM instance to an instance (must be a series, study or patient)", "key": "CreateDicomParentIsInstance", "value": 2025 }, { "documentation": "Unable to get the encoding of the parent resource", "key": "CreateDicomParentEncoding", "value": 2026 }, { "documentation": "Unknown modality", "key": "UnknownModality", "value": 2027 }, { "documentation": "Bad ordering of filters in a job", "key": "BadJobOrdering", "value": 2028 }, { "documentation": "Cannot convert the given JSON object to a Lua table", "key": "JsonToLuaTable", "value": 2029 }, { "documentation": "Cannot create the Lua context", "key": "CannotCreateLua", "value": 2030 }, { "documentation": "Cannot execute a Lua command", "key": "CannotExecuteLua", "value": 2031 }, { "documentation": "Arguments cannot be pushed after the Lua function is executed", "key": "LuaAlreadyExecuted", "value": 2032 }, { "documentation": "The Lua function does not give the expected number of outputs", "key": "LuaBadOutput", "value": 2033 }, { "documentation": "The Lua function is not a predicate (only true/false outputs allowed)", "key": "NotLuaPredicate", "value": 2034 }, { "documentation": "The Lua function does not return a string", "key": "LuaReturnsNoString", "value": 2035 }, { "documentation": "Another plugin has already registered a custom storage area", "key": "StorageAreaAlreadyRegistered", "value": 2036 }, { "documentation": "Another plugin has already registered a custom database back-end", "key": "DatabaseBackendAlreadyRegistered", "value": 2037 }, { "documentation": "Plugin trying to call the database during its initialization", "key": "DatabaseNotInitialized", "value": 2038 }, { "documentation": "Orthanc has been built without SSL support", "key": "SslDisabled", "value": 2039 }, { "documentation": "Unable to order the slices of the series", "key": "CannotOrderSlices", "value": 2040 }, { "documentation": "No request handler factory for DICOM C-Find Modality SCP", "key": "NoWorklistHandler", "value": 2041 }, { "documentation": "Cannot override the value of a tag that already exists", "key": "AlreadyExistingTag", "value": 2042 }, { "documentation": "No request handler factory for DICOM N-ACTION SCP (storage commitment)", "key": "NoStorageCommitmentHandler", "value": 2043 }, { "documentation": "No request handler factory for DICOM C-GET SCP", "key": "NoCGetHandler", "value": 2044 }, { "documentation": "Unsupported media type", "key": "UnsupportedMediaType", "value": 3000 } ] }, { "documentation": "The various HTTP methods for a REST call.", "name": "OrthancPluginHttpMethod", "values": [ { "documentation": "GET request", "key": "Get", "value": 1 }, { "documentation": "POST request", "key": "Post", "value": 2 }, { "documentation": "PUT request", "key": "Put", "value": 3 }, { "documentation": "DELETE request", "key": "Delete", "value": 4 } ] }, { "documentation": "The constraints on the DICOM identifiers that must be supported by the database plugins.", "name": "OrthancPluginIdentifierConstraint", "values": [ { "documentation": "Equal", "key": "Equal", "value": 1 }, { "documentation": "Less or equal", "key": "SmallerOrEqual", "value": 2 }, { "documentation": "More or equal", "key": "GreaterOrEqual", "value": 3 }, { "documentation": "Case-sensitive wildcard matching (with * and ?)", "key": "Wildcard", "value": 4 } ] }, { "documentation": "The image formats that are supported by the Orthanc core.", "name": "OrthancPluginImageFormat", "values": [ { "documentation": "Image compressed using PNG", "key": "Png", "value": 0 }, { "documentation": "Image compressed using JPEG", "key": "Jpeg", "value": 1 }, { "documentation": "Image compressed using DICOM", "key": "Dicom", "value": 2 } ] }, { "documentation": "The origin of a DICOM instance that has been received by Orthanc.", "name": "OrthancPluginInstanceOrigin", "values": [ { "documentation": "Unknown origin", "key": "Unknown", "value": 1 }, { "documentation": "Instance received through DICOM protocol", "key": "DicomProtocol", "value": 2 }, { "documentation": "Instance received through REST API of Orthanc", "key": "RestApi", "value": 3 }, { "documentation": "Instance added to Orthanc by a plugin", "key": "Plugin", "value": 4 }, { "documentation": "Instance added to Orthanc by a Lua script", "key": "Lua", "value": 5 }, { "documentation": "Instance received through WebDAV (new in 1.8.0)", "key": "WebDav", "value": 6 } ] }, { "documentation": "The possible status for one single step of a job.", "name": "OrthancPluginJobStepStatus", "values": [ { "documentation": "The job has successfully executed all its steps", "key": "Success", "value": 1 }, { "documentation": "The job has failed while executing this step", "key": "Failure", "value": 2 }, { "documentation": "The job has still data to process after this step", "key": "Continue", "value": 3 } ] }, { "documentation": "Explains why the job should stop and release the resources it has allocated. This is especially important to disambiguate between the \"paused\" condition and the \"final\" conditions (success, failure, or canceled).", "name": "OrthancPluginJobStopReason", "values": [ { "documentation": "The job has succeeded", "key": "Success", "value": 1 }, { "documentation": "The job was paused, and will be resumed later", "key": "Paused", "value": 2 }, { "documentation": "The job has failed, and might be resubmitted later", "key": "Failure", "value": 3 }, { "documentation": "The job was canceled, and might be resubmitted later", "key": "Canceled", "value": 4 } ] }, { "documentation": "The available types of metrics.", "name": "OrthancPluginMetricsType", "values": [ { "documentation": "Default metrics", "key": "Default", "value": 0 }, { "documentation": "This metrics represents a time duration. Orthanc will keep the maximum value of the metrics over a sliding window of ten seconds, which is useful if the metrics is sampled frequently.", "key": "Timer", "value": 1 } ] }, { "documentation": "The memory layout of the pixels of an image.", "name": "OrthancPluginPixelFormat", "values": [ { "documentation": "Graylevel 8bpp image. The image is graylevel. Each pixel is unsigned and stored in one byte.", "key": "Grayscale8", "value": 1 }, { "documentation": "Graylevel, unsigned 16bpp image. The image is graylevel. Each pixel is unsigned and stored in two bytes.", "key": "Grayscale16", "value": 2 }, { "documentation": "Graylevel, signed 16bpp image. The image is graylevel. Each pixel is signed and stored in two bytes.", "key": "SignedGrayscale16", "value": 3 }, { "documentation": "Color image in RGB24 format. This format describes a color image. The pixels are stored in 3 consecutive bytes. The memory layout is RGB.", "key": "RGB24", "value": 4 }, { "documentation": "Color image in RGBA32 format. This format describes a color image. The pixels are stored in 4 consecutive bytes. The memory layout is RGBA.", "key": "RGBA32", "value": 5 }, { "documentation": "Unknown pixel format", "key": "Unknown", "value": 6 }, { "documentation": "Color image in RGB48 format. This format describes a color image. The pixels are stored in 6 consecutive bytes. The memory layout is RRGGBB.", "key": "RGB48", "value": 7 }, { "documentation": "Graylevel, unsigned 32bpp image. The image is graylevel. Each pixel is unsigned and stored in four bytes.", "key": "Grayscale32", "value": 8 }, { "documentation": "Graylevel, floating-point 32bpp image. The image is graylevel. Each pixel is floating-point and stored in four bytes.", "key": "Float32", "value": 9 }, { "documentation": "Color image in BGRA32 format. This format describes a color image. The pixels are stored in 4 consecutive bytes. The memory layout is BGRA.", "key": "BGRA32", "value": 10 }, { "documentation": "Graylevel, unsigned 64bpp image. The image is graylevel. Each pixel is unsigned and stored in eight bytes.", "key": "Grayscale64", "value": 11 } ] }, { "documentation": "The action to be taken after ReceivedInstanceCallback is triggered", "name": "OrthancPluginReceivedInstanceAction", "values": [ { "documentation": "Keep the instance as is", "key": "KeepAsIs", "value": 1 }, { "documentation": "Modify the instance", "key": "Modify", "value": 2 }, { "documentation": "Discard the instance", "key": "Discard", "value": 3 } ] }, { "documentation": "The supported types of DICOM resources.", "name": "OrthancPluginResourceType", "values": [ { "documentation": "Patient", "key": "Patient", "value": 0 }, { "documentation": "Study", "key": "Study", "value": 1 }, { "documentation": "Series", "key": "Series", "value": 2 }, { "documentation": "Instance", "key": "Instance", "value": 3 }, { "documentation": "Unavailable resource type", "key": "None", "value": 4 } ] }, { "documentation": "The available values for the Failure Reason (0008,1197) during storage commitment. http://dicom.nema.org/medical/dicom/2019e/output/chtml/part03/sect_C.14.html#sect_C.14.1.1", "name": "OrthancPluginStorageCommitmentFailureReason", "values": [ { "documentation": "Success: The DICOM instance is properly stored in the SCP", "key": "Success", "value": 0 }, { "documentation": "0110H: A general failure in processing the operation was encountered", "key": "ProcessingFailure", "value": 1 }, { "documentation": "0112H: One or more of the elements in the Referenced SOP Instance Sequence was not available", "key": "NoSuchObjectInstance", "value": 2 }, { "documentation": "0213H: The SCP does not currently have enough resources to store the requested SOP Instance(s)", "key": "ResourceLimitation", "value": 3 }, { "documentation": "0122H: Storage Commitment has been requested for a SOP Instance with a SOP Class that is not supported by the SCP", "key": "ReferencedSOPClassNotSupported", "value": 4 }, { "documentation": "0119H: The SOP Class of an element in the Referenced SOP Instance Sequence did not correspond to the SOP class registered for this SOP Instance at the SCP", "key": "ClassInstanceConflict", "value": 5 }, { "documentation": "0131H: The Transaction UID of the Storage Commitment Request is already in use", "key": "DuplicateTransactionUID", "value": 6 } ] }, { "documentation": "The value representations present in the DICOM standard (version 2013).", "name": "OrthancPluginValueRepresentation", "values": [ { "documentation": "Application Entity", "key": "AE", "value": 1 }, { "documentation": "Age String", "key": "AS", "value": 2 }, { "documentation": "Attribute Tag", "key": "AT", "value": 3 }, { "documentation": "Code String", "key": "CS", "value": 4 }, { "documentation": "Date", "key": "DA", "value": 5 }, { "documentation": "Decimal String", "key": "DS", "value": 6 }, { "documentation": "Date Time", "key": "DT", "value": 7 }, { "documentation": "Floating Point Double", "key": "FD", "value": 8 }, { "documentation": "Floating Point Single", "key": "FL", "value": 9 }, { "documentation": "Integer String", "key": "IS", "value": 10 }, { "documentation": "Long String", "key": "LO", "value": 11 }, { "documentation": "Long Text", "key": "LT", "value": 12 }, { "documentation": "Other Byte String", "key": "OB", "value": 13 }, { "documentation": "Other Float String", "key": "OF", "value": 14 }, { "documentation": "Other Word String", "key": "OW", "value": 15 }, { "documentation": "Person Name", "key": "PN", "value": 16 }, { "documentation": "Short String", "key": "SH", "value": 17 }, { "documentation": "Signed Long", "key": "SL", "value": 18 }, { "documentation": "Sequence of Items", "key": "SQ", "value": 19 }, { "documentation": "Signed Short", "key": "SS", "value": 20 }, { "documentation": "Short Text", "key": "ST", "value": 21 }, { "documentation": "Time", "key": "TM", "value": 22 }, { "documentation": "Unique Identifier (UID)", "key": "UI", "value": 23 }, { "documentation": "Unsigned Long", "key": "UL", "value": 24 }, { "documentation": "Unknown", "key": "UN", "value": 25 }, { "documentation": "Unsigned Short", "key": "US", "value": 26 }, { "documentation": "Unlimited Text", "key": "UT", "value": 27 } ] } ], "global_functions": [ { "args": [ { "name": "arg0", "sdk_name": "expectedMajor", "sdk_type": "int32_t" }, { "name": "arg1", "sdk_name": "expectedMinor", "sdk_type": "int32_t" }, { "name": "arg2", "sdk_name": "expectedRevision", "sdk_type": "int32_t" } ], "c_function": "OrthancPluginCheckVersionAdvanced", "documentation": { "args": { "expectedMajor": "Expected major version.", "expectedMinor": "Expected minor version.", "expectedRevision": "Expected revision." }, "description": [ "This function checks whether the version of the Orthanc server running this plugin, is above the given version. Contrarily to OrthancPluginCheckVersion(), it is up to the developer of the plugin to make sure that all the Orthanc SDK services called by the plugin are actually implemented in the given version of Orthanc." ], "return": "1 if and only if the versions are compatible. If the result is 0, the initialization of the plugin should fail.", "summary": "Check that the version of the hosting Orthanc is above a given version." }, "return_sdk_type": "int32_t" }, { "args": [], "c_function": "OrthancPluginCheckVersion", "documentation": { "args": {}, "description": [ "This function checks whether the version of the Orthanc server running this plugin, is above the version of the current Orthanc SDK header. This guarantees that the plugin is compatible with the hosting Orthanc (i.e. it will not call unavailable services). The result of this function should always be checked in the OrthancPluginInitialize() entry point of the plugin." ], "return": "1 if and only if the versions are compatible. If the result is 0, the initialization of the plugin should fail.", "summary": "Check the compatibility of the plugin wrt. the version of its hosting Orthanc." }, "return_sdk_type": "int32_t" }, { "args": [ { "name": "arg0", "sdk_name": "message", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLogError", "documentation": { "args": { "message": "The message to be logged." }, "description": [ "Log an error message using the Orthanc logging system." ], "summary": "Log an error." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "message", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLogWarning", "documentation": { "args": { "message": "The message to be logged." }, "description": [ "Log a warning message using the Orthanc logging system." ], "summary": "Log a warning." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "message", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLogInfo", "documentation": { "args": { "message": "The message to be logged." }, "description": [ "Log an information message using the Orthanc logging system." ], "summary": "Log an information." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "instanceId", "sdk_type": "const char *" } ], "c_function": "OrthancPluginGetDicomForInstance", "documentation": { "args": { "instanceId": "The Orthanc identifier of the DICOM instance of interest.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "Retrieve a DICOM instance using its Orthanc identifier. The DICOM file is stored into a newly allocated memory buffer." ], "return": "0 if success, or the error code if failure.", "summary": "Retrieve a DICOM instance using its Orthanc identifier." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRestApiGet", "documentation": { "args": { "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a GET call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a GET call to the built-in Orthanc REST API." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRestApiGetAfterPlugins", "documentation": { "args": { "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a GET call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a GET call to the REST API, as tainted by the plugins." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginRestApiPost", "documentation": { "args": { "body": "The body of the POST request.", "bodySize": "The size of the body.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a POST call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a POST call to the built-in Orthanc REST API." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginRestApiPostAfterPlugins", "documentation": { "args": { "body": "The body of the POST request.", "bodySize": "The size of the body.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a POST call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a POST call to the REST API, as tainted by the plugins." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRestApiDelete", "documentation": { "args": { "uri": "The URI to delete in the built-in Orthanc API." }, "description": [ "Make a DELETE call to the built-in Orthanc REST API.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a DELETE call to the built-in Orthanc REST API." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRestApiDeleteAfterPlugins", "documentation": { "args": { "uri": "The URI to delete in the built-in Orthanc API." }, "description": [ "Make a DELETE call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a DELETE call to the REST API, as tainted by the plugins." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginRestApiPut", "documentation": { "args": { "body": "The body of the PUT request.", "bodySize": "The size of the body.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a PUT call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a PUT call to the built-in Orthanc REST API." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginRestApiPutAfterPlugins", "documentation": { "args": { "body": "The body of the PUT request.", "bodySize": "The size of the body.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uri": "The URI in the built-in Orthanc API." }, "description": [ "Make a PUT call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.", "Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource." ], "return": "0 if success, or the error code if failure.", "summary": "Make a PUT call to the REST API, as tainted by the plugins." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "patientID", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLookupPatient", "documentation": { "args": { "patientID": "The Patient ID of interest." }, "description": [ "Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020). This function uses the database index to run as fast as possible (it does not loop over all the stored patients)." ], "return": "The NULL value if the patient is non-existent, or a string containing the Orthanc ID of the patient. This string must be freed by OrthancPluginFreeString().", "summary": "Look for a patient." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "studyUID", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLookupStudy", "documentation": { "args": { "studyUID": "The Study Instance UID of interest." }, "description": [ "Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d). This function uses the database index to run as fast as possible (it does not loop over all the stored studies)." ], "return": "The NULL value if the study is non-existent, or a string containing the Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().", "summary": "Look for a study." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "accessionNumber", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLookupStudyWithAccessionNumber", "documentation": { "args": { "accessionNumber": "The Accession Number of interest." }, "description": [ "Look for a study stored in Orthanc, using its Accession Number tag (0x0008, 0x0050). This function uses the database index to run as fast as possible (it does not loop over all the stored studies)." ], "return": "The NULL value if the study is non-existent, or a string containing the Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().", "summary": "Look for a study, using the accession number." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "seriesUID", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLookupSeries", "documentation": { "args": { "seriesUID": "The Series Instance UID of interest." }, "description": [ "Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e). This function uses the database index to run as fast as possible (it does not loop over all the stored series)." ], "return": "The NULL value if the series is non-existent, or a string containing the Orthanc ID of the series. This string must be freed by OrthancPluginFreeString().", "summary": "Look for a series." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "sopInstanceUID", "sdk_type": "const char *" } ], "c_function": "OrthancPluginLookupInstance", "documentation": { "args": { "sopInstanceUID": "The SOP Instance UID of interest." }, "description": [ "Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018). This function uses the database index to run as fast as possible (it does not loop over all the stored instances)." ], "return": "The NULL value if the instance is non-existent, or a string containing the Orthanc ID of the instance. This string must be freed by OrthancPluginFreeString().", "summary": "Look for an instance." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGetOrthancPath", "documentation": { "args": {}, "description": [ "This function returns the path to the Orthanc executable." ], "return": "NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().", "summary": "Return the path to the Orthanc executable." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGetOrthancDirectory", "documentation": { "args": {}, "description": [ "This function returns the path to the directory containing the Orthanc executable." ], "return": "NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().", "summary": "Return the directory containing the Orthanc." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGetConfigurationPath", "documentation": { "args": {}, "description": [ "This function returns the path to the configuration file(s) that was specified when starting Orthanc. Since version 0.9.1, this path can refer to a folder that stores a set of configuration files. This function is deprecated in favor of OrthancPluginGetConfiguration()." ], "return": "NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().", "summary": "Return the path to the configuration file(s)." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "uri", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSetRootUri", "documentation": { "args": { "uri": "The root URI for this plugin." }, "description": [ "For plugins that come with a Web interface, this function declares the entry path where to find this interface. This information is notably used in the \"Plugins\" page of Orthanc Explorer." ], "summary": "Set the URI where the plugin provides its Web interface." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "description", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSetDescription", "documentation": { "args": { "description": "The description." }, "description": [ "Set a description for this plugin. It is displayed in the \"Plugins\" page of Orthanc Explorer." ], "summary": "Set a description for this plugin." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "javascript", "sdk_type": "const char *" } ], "c_function": "OrthancPluginExtendOrthancExplorer", "documentation": { "args": { "javascript": "The custom JavaScript code." }, "description": [ "Add JavaScript code to customize the default behavior of Orthanc Explorer. This can for instance be used to add new buttons." ], "summary": "Extend the JavaScript code of Orthanc Explorer." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "property", "sdk_type": "int32_t" }, { "name": "arg1", "sdk_name": "defaultValue", "sdk_type": "const char *" } ], "c_function": "OrthancPluginGetGlobalProperty", "documentation": { "args": { "defaultValue": "The value to return, if the global property is unset.", "property": "The global property of interest." }, "description": [ "Get the value of a global property that is stored in the Orthanc database. Global properties whose index is below 1024 are reserved by Orthanc." ], "return": "The value of the global property, or NULL in the case of an error. This string must be freed by OrthancPluginFreeString().", "summary": "Get the value of a global property." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "property", "sdk_type": "int32_t" }, { "name": "arg1", "sdk_name": "value", "sdk_type": "const char *" } ], "c_function": "OrthancPluginSetGlobalProperty", "documentation": { "args": { "property": "The global property of interest.", "value": "The value to be set in the global property." }, "description": [ "Set the value of a global property into the Orthanc database. Setting a global property can be used by plugins to save their internal parameters. Plugins are only allowed to set properties whose index are above or equal to 1024 (properties below 1024 are read-only and reserved by Orthanc)." ], "return": "0 if success, or the error code if failure.", "summary": "Set the value of a global property." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginGetCommandLineArgumentsCount", "documentation": { "args": {}, "description": [ "Retrieve the number of command-line arguments that were used to launch Orthanc." ], "return": "The number of arguments.", "summary": "Get the number of command-line arguments." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "argument", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetCommandLineArgument", "documentation": { "args": { "argument": "The index of the argument." }, "description": [ "Get the value of one of the command-line arguments that were used to launch Orthanc. The number of available arguments can be retrieved by OrthancPluginGetCommandLineArgumentsCount()." ], "return": "The value of the argument, or NULL in the case of an error. This string must be freed by OrthancPluginFreeString().", "summary": "Get the value of a command-line argument." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGetExpectedDatabaseVersion", "documentation": { "args": {}, "description": [ "Retrieve the expected version of the database schema." ], "return": "The version.", "summary": "Get the expected version of the database schema." }, "return_sdk_type": "uint32_t" }, { "args": [], "c_function": "OrthancPluginGetConfiguration", "documentation": { "args": {}, "description": [ "This function returns the content of the configuration that is used by Orthanc, formatted as a JSON string." ], "return": "NULL in the case of an error, or a newly allocated string containing the configuration. This string must be freed by OrthancPluginFreeString().", "summary": "Return the content of the configuration file(s)." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "source", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginCompressionType", "sdk_name": "compression", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_name": "uncompress", "sdk_type": "uint8_t" } ], "c_function": "OrthancPluginBufferCompression", "documentation": { "args": { "compression": "The compression algorithm.", "size": "The size in bytes of the source buffer.", "source": "The source buffer.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "uncompress": "If set to \"0\", the buffer must be compressed. If set to \"1\", the buffer must be uncompressed." }, "description": [ "This function compresses or decompresses a buffer, using the version of the zlib library that is used by the Orthanc core." ], "return": "0 if success, or the error code if failure.", "summary": "Compress or decompress a buffer." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "path", "sdk_type": "const char *" } ], "c_function": "OrthancPluginReadFile", "documentation": { "args": { "path": "The path of the file to be read.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "Read the content of a file on the filesystem, and returns it into a newly allocated memory buffer." ], "return": "0 if success, or the error code if failure.", "summary": "Read a file." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "path", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "data", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginWriteFile", "documentation": { "args": { "data": "The content of the memory buffer.", "path": "The path of the file to be written.", "size": "The size of the memory buffer." }, "description": [ "Write the content of a memory buffer to the filesystem." ], "return": "0 if success, or the error code if failure.", "summary": "Write a file." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginErrorCode", "sdk_name": "error", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginGetErrorDescription", "documentation": { "args": { "error": "The error code of interest." }, "description": [ "This function returns the description of a given error code." ], "return": "The error description. This is a statically-allocated string, do not free it.", "summary": "Get the description of a given error code." }, "return_sdk_type": "const char *" }, { "args": [ { "name": "arg0", "sdk_name": "data", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginImageFormat", "sdk_name": "format", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginUncompressImage", "documentation": { "args": { "data": "Pointer to a memory buffer containing the compressed image.", "format": "The file format of the compressed image.", "size": "Size of the memory buffer containing the compressed image." }, "description": [ "This function decodes a compressed image from a memory buffer." ], "return": "The uncompressed image. It must be freed with OrthancPluginFreeImage().", "summary": "Decode a compressed image." }, "return_sdk_class": "OrthancPluginImage", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_name": "width", "sdk_type": "uint32_t" }, { "name": "arg2", "sdk_name": "height", "sdk_type": "uint32_t" }, { "name": "arg3", "sdk_name": "pitch", "sdk_type": "uint32_t" }, { "name": "arg4", "sdk_name": "buffer", "sdk_type": "const void *" } ], "c_function": "OrthancPluginCompressPngImage", "documentation": { "args": { "buffer": "The memory buffer containing the uncompressed image.", "format": "The memory layout of the uncompressed image.", "height": "The height of the image.", "pitch": "The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "width": "The width of the image." }, "description": [ "This function compresses the given memory buffer containing an image using the PNG specification, and stores the result of the compression into a newly allocated memory buffer." ], "return": "0 if success, or the error code if failure.", "summary": "Encode a PNG image." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_name": "width", "sdk_type": "uint32_t" }, { "name": "arg2", "sdk_name": "height", "sdk_type": "uint32_t" }, { "name": "arg3", "sdk_name": "pitch", "sdk_type": "uint32_t" }, { "name": "arg4", "sdk_name": "buffer", "sdk_type": "const void *" }, { "name": "arg5", "sdk_name": "quality", "sdk_type": "uint8_t" } ], "c_function": "OrthancPluginCompressJpegImage", "documentation": { "args": { "buffer": "The memory buffer containing the uncompressed image.", "format": "The memory layout of the uncompressed image.", "height": "The height of the image.", "pitch": "The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).", "quality": "The quality of the JPEG encoding, between 1 (worst quality, best compression) and 100 (best quality, worst compression).", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "width": "The width of the image." }, "description": [ "This function compresses the given memory buffer containing an image using the JPEG specification, and stores the result of the compression into a newly allocated memory buffer." ], "return": "0 if success, or the error code if failure.", "summary": "Encode a JPEG image." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "url", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "username", "sdk_type": "const char *" }, { "name": "arg2", "sdk_name": "password", "sdk_type": "const char *" } ], "c_function": "OrthancPluginHttpGet", "documentation": { "args": { "password": "The password (can be \"NULL\" if no password protection).", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "url": "The URL of interest.", "username": "The username (can be \"NULL\" if no password protection)." }, "description": [ "Make a HTTP GET call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiGet() if calling the built-in REST API of the Orthanc instance that hosts this plugin." ], "return": "0 if success, or the error code if failure.", "summary": "Issue a HTTP GET call." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "url", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg3", "sdk_name": "username", "sdk_type": "const char *" }, { "name": "arg4", "sdk_name": "password", "sdk_type": "const char *" } ], "c_function": "OrthancPluginHttpPost", "documentation": { "args": { "body": "The content of the body of the request.", "bodySize": "The size of the body of the request.", "password": "The password (can be \"NULL\" if no password protection).", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "url": "The URL of interest.", "username": "The username (can be \"NULL\" if no password protection)." }, "description": [ "Make a HTTP POST call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiPost() if calling the built-in REST API of the Orthanc instance that hosts this plugin." ], "return": "0 if success, or the error code if failure.", "summary": "Issue a HTTP POST call." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "url", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "body", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg3", "sdk_name": "username", "sdk_type": "const char *" }, { "name": "arg4", "sdk_name": "password", "sdk_type": "const char *" } ], "c_function": "OrthancPluginHttpPut", "documentation": { "args": { "body": "The content of the body of the request.", "bodySize": "The size of the body of the request.", "password": "The password (can be \"NULL\" if no password protection).", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer().", "url": "The URL of interest.", "username": "The username (can be \"NULL\" if no password protection)." }, "description": [ "Make a HTTP PUT call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiPut() if calling the built-in REST API of the Orthanc instance that hosts this plugin." ], "return": "0 if success, or the error code if failure.", "summary": "Issue a HTTP PUT call." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_name": "url", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "username", "sdk_type": "const char *" }, { "name": "arg2", "sdk_name": "password", "sdk_type": "const char *" } ], "c_function": "OrthancPluginHttpDelete", "documentation": { "args": { "password": "The password (can be \"NULL\" if no password protection).", "url": "The URL of interest.", "username": "The username (can be \"NULL\" if no password protection)." }, "description": [ "Make a HTTP DELETE call to the given URL. Favor OrthancPluginRestApiDelete() if calling the built-in REST API of the Orthanc instance that hosts this plugin." ], "return": "0 if success, or the error code if failure.", "summary": "Issue a HTTP DELETE call." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [], "c_function": "OrthancPluginGetFontsCount", "documentation": { "args": {}, "description": [ "This function returns the number of fonts that are built in the Orthanc core. These fonts can be used to draw texts on images through OrthancPluginDrawText()." ], "return": "The number of fonts.", "summary": "Return the number of available fonts." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "fontIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetFontName", "documentation": { "args": { "fontIndex": "The index of the font. This value must be less than OrthancPluginGetFontsCount()." }, "description": [ "This function returns the name of a font that is built in the Orthanc core." ], "return": "The font name. This is a statically-allocated string, do not free it.", "summary": "Return the name of a font." }, "return_sdk_type": "const char *" }, { "args": [ { "name": "arg0", "sdk_name": "fontIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginGetFontSize", "documentation": { "args": { "fontIndex": "The index of the font. This value must be less than OrthancPluginGetFontsCount()." }, "description": [ "This function returns the size of a font that is built in the Orthanc core." ], "return": "The font size.", "summary": "Return the size of a font." }, "return_sdk_type": "uint32_t" }, { "args": [ { "name": "arg0", "sdk_name": "code", "sdk_type": "int32_t" }, { "name": "arg1", "sdk_name": "httpStatus", "sdk_type": "uint16_t" }, { "name": "arg2", "sdk_name": "message", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRegisterErrorCode", "documentation": { "args": { "code": "The error code that is internal to this plugin.", "httpStatus": "The HTTP status corresponding to this error.", "message": "The description of the error." }, "description": [ "This function declares a custom error code that can be generated by this plugin. This declaration is used to enrich the body of the HTTP answer in the case of an error, and to set the proper HTTP status code." ], "return": "The error code that has been assigned inside the Orthanc core.", "summary": "Declare a custom error code for this plugin." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "group", "sdk_type": "uint16_t" }, { "name": "arg1", "sdk_name": "element", "sdk_type": "uint16_t" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginValueRepresentation", "sdk_name": "vr", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_name": "name", "sdk_type": "const char *" }, { "name": "arg4", "sdk_name": "minMultiplicity", "sdk_type": "uint32_t" }, { "name": "arg5", "sdk_name": "maxMultiplicity", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginRegisterDictionaryTag", "documentation": { "args": { "element": "The element of the tag.", "group": "The group of the tag.", "maxMultiplicity": "The maximum multiplicity of the tag. A value of 0 means an arbitrary multiplicity (\"\"n\"\").", "minMultiplicity": "The minimum multiplicity of the tag (must be above 0).", "name": "The nickname of the tag.", "vr": "The value representation of the tag." }, "description": [ "This function declares a new public tag in the dictionary of DICOM tags that are known to Orthanc. This function should be used in the OrthancPluginInitialize() callback." ], "return": "0 if success, other value if error.", "summary": "Register a new tag into the DICOM dictionary." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "group", "sdk_type": "uint16_t" }, { "name": "arg1", "sdk_name": "element", "sdk_type": "uint16_t" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginValueRepresentation", "sdk_name": "vr", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_name": "name", "sdk_type": "const char *" }, { "name": "arg4", "sdk_name": "minMultiplicity", "sdk_type": "uint32_t" }, { "name": "arg5", "sdk_name": "maxMultiplicity", "sdk_type": "uint32_t" }, { "name": "arg6", "sdk_name": "privateCreator", "sdk_type": "const char *" } ], "c_function": "OrthancPluginRegisterPrivateDictionaryTag", "documentation": { "args": { "element": "The element of the tag.", "group": "The group of the tag.", "maxMultiplicity": "The maximum multiplicity of the tag. A value of 0 means an arbitrary multiplicity (\"\"n\"\").", "minMultiplicity": "The minimum multiplicity of the tag (must be above 0).", "name": "The nickname of the tag.", "privateCreator": "The private creator of this private tag.", "vr": "The value representation of the tag." }, "description": [ "This function declares a new private tag in the dictionary of DICOM tags that are known to Orthanc. This function should be used in the OrthancPluginInitialize() callback." ], "return": "0 if success, other value if error.", "summary": "Register a new private tag into the DICOM dictionary." }, "return_sdk_enumeration": "OrthancPluginErrorCode", "return_sdk_type": "enumeration" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginDicomToJsonFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_enumeration": "OrthancPluginDicomToJsonFlags", "sdk_name": "flags", "sdk_type": "enumeration" }, { "name": "arg4", "sdk_name": "maxStringLength", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginDicomBufferToJson", "documentation": { "args": { "buffer": "The memory buffer containing the DICOM file.", "flags": "Flags governing the output.", "format": "The output format.", "maxStringLength": "The maximum length of a field. Too long fields will be output as \"null\". The 0 value means no maximum length.", "size": "The size of the memory buffer." }, "description": [ "This function takes as input a memory buffer containing a DICOM file, and outputs a JSON string representing the tags of this DICOM file." ], "return": "The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().", "summary": "Format a DICOM memory buffer as a JSON string." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "instanceId", "sdk_type": "const char *" }, { "name": "arg1", "sdk_enumeration": "OrthancPluginDicomToJsonFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginDicomToJsonFlags", "sdk_name": "flags", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_name": "maxStringLength", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginDicomInstanceToJson", "documentation": { "args": { "flags": "Flags governing the output.", "format": "The output format.", "instanceId": "The Orthanc identifier of the instance.", "maxStringLength": "The maximum length of a field. Too long fields will be output as \"null\". The 0 value means no maximum length." }, "description": [ "This function formats a DICOM instance that is stored in Orthanc, and outputs a JSON string representing the tags of this DICOM instance." ], "return": "The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().", "summary": "Format a DICOM instance as a JSON string." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "json", "sdk_type": "const char *" }, { "name": "arg1", "sdk_class": "OrthancPluginImage", "sdk_name": "pixelData", "sdk_type": "const_object" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginCreateDicomFlags", "sdk_name": "flags", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginCreateDicom", "documentation": { "args": { "flags": "Flags governing the output.", "json": "The input JSON file.", "pixelData": "The image. Can be NULL, if the pixel data is encoded inside the JSON with the data URI scheme.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "This function takes as input a string containing a JSON file describing the content of a DICOM instance. As an output, it writes the corresponding DICOM instance to a newly allocated memory buffer. Additionally, an image to be encoded within the DICOM instance can also be provided.", "Private tags will be associated with the private creator whose value is specified in the \"DefaultPrivateCreator\" configuration option of Orthanc. The function OrthancPluginCreateDicom2() can be used if another private creator must be used to create this instance." ], "return": "0 if success, other value if error.", "summary": "Create a DICOM instance from a JSON string and an image." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" }, { "args": [ { "name": "arg0", "sdk_enumeration": "OrthancPluginPixelFormat", "sdk_name": "format", "sdk_type": "enumeration" }, { "name": "arg1", "sdk_name": "width", "sdk_type": "uint32_t" }, { "name": "arg2", "sdk_name": "height", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginCreateImage", "documentation": { "args": { "format": "The format of the pixels.", "height": "The height of the image.", "width": "The width of the image." }, "description": [ "This function creates an image of given size and format." ], "return": "The newly allocated image. It must be freed with OrthancPluginFreeImage().", "summary": "Create an image." }, "return_sdk_class": "OrthancPluginImage", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_name": "frameIndex", "sdk_type": "uint32_t" } ], "c_function": "OrthancPluginDecodeDicomImage", "documentation": { "args": { "buffer": "Pointer to a memory buffer containing the DICOM image.", "bufferSize": "Size of the memory buffer containing the DICOM image.", "frameIndex": "The index of the frame of interest in a multi-frame image." }, "description": [ "This function decodes one frame of a DICOM image that is stored in a memory buffer. This function will give the same result as OrthancPluginUncompressImage() for single-frame DICOM images." ], "return": "The uncompressed image. It must be freed with OrthancPluginFreeImage().", "summary": "Decode one frame from a DICOM instance." }, "return_sdk_class": "OrthancPluginImage", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginComputeMd5", "documentation": { "args": { "buffer": "The source memory buffer.", "size": "The size in bytes of the source buffer." }, "description": [ "This functions computes the MD5 cryptographic hash of the given memory buffer." ], "return": "The NULL value in case of error, or a string containing the cryptographic hash. This string must be freed by OrthancPluginFreeString().", "summary": "Compute an MD5 hash." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginComputeSha1", "documentation": { "args": { "buffer": "The source memory buffer.", "size": "The size in bytes of the source buffer." }, "description": [ "This functions computes the SHA-1 cryptographic hash of the given memory buffer." ], "return": "The NULL value in case of error, or a string containing the cryptographic hash. This string must be freed by OrthancPluginFreeString().", "summary": "Compute a SHA-1 hash." }, "return_sdk_type": "char *" }, { "args": [], "c_function": "OrthancPluginGenerateUuid", "documentation": { "args": {}, "description": [ "Generate a random GUID/UUID (globally unique identifier)." ], "return": "NULL in the case of an error, or a newly allocated string containing the UUID. This string must be freed by OrthancPluginFreeString().", "summary": "Generate an UUID." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "query", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginCreateFindMatcher", "documentation": { "args": { "query": "The C-Find DICOM query.", "size": "The size of the DICOM query." }, "description": [ "This function creates a \"matcher\" object that can be used to check whether a DICOM instance matches a C-Find query. The C-Find query must be expressed as a DICOM buffer." ], "return": "The newly allocated matcher. It must be freed with OrthancPluginFreeFindMatcher().", "summary": "Create a C-Find matcher." }, "return_sdk_class": "OrthancPluginFindMatcher", "return_sdk_type": "object" }, { "args": [], "c_function": "OrthancPluginGetPeers", "documentation": { "args": {}, "description": [ "This function returns the parameters of the Orthanc peers that are known to the Orthanc server hosting the plugin." ], "return": "NULL if error, or a newly allocated opaque data structure containing the peers. This structure must be freed with OrthancPluginFreePeers().", "summary": "Return the list of available Orthanc peers." }, "return_sdk_class": "OrthancPluginPeers", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_name": "path", "sdk_type": "const char *" } ], "c_function": "OrthancPluginAutodetectMimeType", "documentation": { "args": { "path": "Path to the file." }, "description": [ "This function returns the MIME type of a file by inspecting its extension." ], "return": "The MIME type. This is a statically-allocated string, do not free it.", "summary": "Detect the MIME type of a file." }, "return_sdk_type": "const char *" }, { "args": [ { "name": "arg0", "sdk_name": "name", "sdk_type": "const char *" }, { "name": "arg1", "sdk_name": "value", "sdk_type": "float" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginMetricsType", "sdk_name": "type", "sdk_type": "enumeration" } ], "c_function": "OrthancPluginSetMetricsValue", "documentation": { "args": { "name": "The name of the metrics to be set.", "type": "The type of the metrics. This parameter is only taken into consideration the first time this metrics is set.", "value": "The value of the metrics." }, "description": [ "This function sets the value of a metrics to monitor the behavior of the plugin through tools such as Prometheus. The values of all the metrics are stored within the Orthanc context." ], "summary": "Set the value of a metrics." }, "return_sdk_type": "void" }, { "args": [ { "name": "arg0", "sdk_name": "group", "sdk_type": "uint16_t" }, { "name": "arg1", "sdk_name": "element", "sdk_type": "uint16_t" }, { "name": "arg2", "sdk_name": "privateCreator", "sdk_type": "const char *" } ], "c_function": "OrthancPluginGetTagName", "documentation": { "args": { "element": "The element of the tag.", "group": "The group of the tag.", "privateCreator": "For private tags, the name of the private creator (can be NULL)." }, "description": [ "This function makes a lookup to the dictionary of DICOM tags that are known to Orthanc, and returns the symbolic name of a DICOM tag." ], "return": "NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().", "summary": "Returns the symbolic name of a DICOM tag." }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" } ], "c_function": "OrthancPluginCreateDicomInstance", "documentation": { "args": { "buffer": "The memory buffer containing the DICOM instance.", "size": "The size of the memory buffer." }, "description": [ "This function parses a memory buffer that contains a DICOM file. The function returns a new pointer to a data structure that is managed by the Orthanc core." ], "return": "The newly allocated DICOM instance. It must be freed with OrthancPluginFreeDicomInstance().", "summary": "Parse a DICOM instance." }, "return_sdk_class": "OrthancPluginDicomInstance", "return_sdk_type": "object" }, { "args": [ { "name": "arg0", "sdk_name": "buffer", "sdk_type": "const_void_pointer_with_size" }, { "name": "arg2", "sdk_name": "transferSyntax", "sdk_type": "const char *" } ], "c_function": "OrthancPluginTranscodeDicomInstance", "documentation": { "args": { "buffer": "The memory buffer containing the DICOM instance.", "size": "The size of the memory buffer.", "transferSyntax": "The transfer syntax UID for the transcoding." }, "description": [ "This function parses a memory buffer that contains a DICOM file, then transcodes it to the given transfer syntax. The function returns a new pointer to a data structure that is managed by the Orthanc core." ], "return": "The newly allocated DICOM instance. It must be freed with OrthancPluginFreeDicomInstance().", "summary": "Parse and transcode a DICOM instance." }, "return_sdk_class": "OrthancPluginDicomInstance", "return_sdk_type": "object" }, { "args": [], "c_function": "OrthancPluginGenerateRestApiAuthorizationToken", "documentation": { "args": {}, "description": [ "This function generates a token that can be set in the HTTP header \"Authorization\" so as to grant full access to the REST API of Orthanc using an external HTTP client. Using this function avoids the need of adding a separate user in the \"RegisteredUsers\" configuration of Orthanc, which eases deployments.", "This feature is notably useful in multiprocess scenarios, where a subprocess created by a plugin has no access to the \"OrthancPluginContext\", and thus cannot call \"OrthancPluginRestApi[Get|Post|Put|Delete]()\".", "This situation is frequently encountered in Python plugins, where the \"multiprocessing\" package can be used to bypass the Global Interpreter Lock (GIL) and thus to improve performance and concurrency." ], "return": "The authorization token, or NULL value in the case of an error. This string must be freed by OrthancPluginFreeString().", "summary": "Generate a token to grant full access to the REST API of Orthanc" }, "return_sdk_type": "char *" }, { "args": [ { "name": "arg0", "sdk_name": "json", "sdk_type": "const char *" }, { "name": "arg1", "sdk_class": "OrthancPluginImage", "sdk_name": "pixelData", "sdk_type": "const_object" }, { "name": "arg2", "sdk_enumeration": "OrthancPluginCreateDicomFlags", "sdk_name": "flags", "sdk_type": "enumeration" }, { "name": "arg3", "sdk_name": "privateCreator", "sdk_type": "const char *" } ], "c_function": "OrthancPluginCreateDicom2", "documentation": { "args": { "flags": "Flags governing the output.", "json": "The input JSON file.", "pixelData": "The image. Can be NULL, if the pixel data is encoded inside the JSON with the data URI scheme.", "privateCreator": "The private creator to be used for the private DICOM tags. Check out the global configuration option \"Dictionary\" of Orthanc.", "target": "The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()." }, "description": [ "This function takes as input a string containing a JSON file describing the content of a DICOM instance. As an output, it writes the corresponding DICOM instance to a newly allocated memory buffer. Additionally, an image to be encoded within the DICOM instance can also be provided.", "Contrarily to the function OrthancPluginCreateDicom(), this function can be explicitly provided with a private creator." ], "return": "0 if success, other value if error.", "summary": "Create a DICOM instance from a JSON string and an image, with a private creator." }, "return_sdk_type": "OrthancPluginMemoryBuffer *" } ] }