Orthanc Plugin SDK
1.12.4
Documentation of the plugin interface of Orthanc
|
Functions to access DICOM images that are managed by the Orthanc core. More...
Typedefs | |
typedef struct _OrthancPluginDicomInstance_t | OrthancPluginDicomInstance |
Opaque structure that represents a DICOM instance that is managed by the Orthanc core. | |
OrthancPluginDicomInstance* OrthancPluginCreateDicomInstance | ( | OrthancPluginContext * | context, |
const void * | buffer, | ||
uint32_t | size | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
buffer | The memory buffer containing the DICOM instance. |
size | The size of the memory buffer. |
void OrthancPluginFreeDicomInstance | ( | OrthancPluginContext * | context, |
OrthancPluginDicomInstance * | dicom | ||
) |
This function frees a DICOM instance that was parsed using OrthancPluginCreateDicomInstance().
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
dicom | The DICOM instance. |
char* OrthancPluginGetInstanceAdvancedJson | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
OrthancPluginDicomToJsonFormat | format, | ||
OrthancPluginDicomToJsonFlags | flags, | ||
uint32_t | maxStringLength | ||
) |
This function takes as DICOM instance managed by the Orthanc core, and outputs a JSON string representing the tags of this DICOM file.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The DICOM instance of interest. |
format | The output format. |
flags | Flags governing the output. |
maxStringLength | The maximum length of a field. Too long fields will be output as "null". The 0 value means no maximum length. |
const void* OrthancPluginGetInstanceData | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns a pointer to the content of the given DICOM instance.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
OrthancPluginImage* OrthancPluginGetInstanceDecodedFrame | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
uint32_t | frameIndex | ||
) |
This function decodes one frame of a DICOM image that is managed by the Orthanc core.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
frameIndex | The index of the frame of interest. |
char* OrthancPluginGetInstanceDicomWebJson | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
OrthancPluginDicomWebBinaryCallback2 | callback, | ||
void * | payload | ||
) |
This function converts a DICOM instance that is managed by the Orthanc core, into its DICOMweb JSON representation.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The DICOM instance of interest. |
callback | Callback to set the value of the binary tags. |
payload | User payload. |
char* OrthancPluginGetInstanceDicomWebXml | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
OrthancPluginDicomWebBinaryCallback2 | callback, | ||
void * | payload | ||
) |
This function converts a DICOM instance that is managed by the Orthanc core, into its DICOMweb XML representation.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The DICOM instance of interest. |
callback | Callback to set the value of the binary tags. |
payload | User payload. |
uint32_t OrthancPluginGetInstanceFramesCount | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns the number of frames that are part of a DICOM image managed by the Orthanc core.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
char* OrthancPluginGetInstanceJson | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
const char* OrthancPluginGetInstanceMetadata | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
const char * | metadata | ||
) |
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().
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
metadata | The metadata of interest. |
OrthancPluginInstanceOrigin OrthancPluginGetInstanceOrigin | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns the origin of a DICOM instance that has been received by Orthanc.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
OrthancPluginErrorCode OrthancPluginGetInstanceRawFrame | ( | OrthancPluginContext * | context, |
OrthancPluginMemoryBuffer * | target, | ||
const OrthancPluginDicomInstance * | instance, | ||
uint32_t | frameIndex | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
target | The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). |
instance | The instance of interest. |
frameIndex | The index of the frame of interest. |
const char* OrthancPluginGetInstanceRemoteAet | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns the Application Entity Title (AET) of the DICOM modality from which a DICOM instance originates.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
char* OrthancPluginGetInstanceSimplifiedJson | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
int64_t OrthancPluginGetInstanceSize | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns the number of bytes of the given DICOM instance.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
char* OrthancPluginGetInstanceTransferSyntaxUid | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
int32_t OrthancPluginHasInstanceMetadata | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance, | ||
const char * | metadata | ||
) |
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".
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
metadata | The metadata of interest. |
int32_t OrthancPluginHasInstancePixelData | ( | OrthancPluginContext * | context, |
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns a Boolean value indicating whether the DICOM instance contains the pixel data (7FE0,0010) tag.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instance | The instance of interest. |
OrthancPluginDicomInstance* OrthancPluginLoadDicomInstance | ( | OrthancPluginContext * | context, |
const char * | instanceId, | ||
OrthancPluginLoadDicomInstanceMode | mode | ||
) |
This function loads a DICOM instance from the content of the Orthanc database. The function returns a new pointer to a data structure that is managed by the Orthanc core.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
instanceId | The Orthanc identifier of the DICOM instance of interest. |
mode | Flag specifying how to deal with pixel data. |
OrthancPluginErrorCode OrthancPluginSerializeDicomInstance | ( | OrthancPluginContext * | context, |
OrthancPluginMemoryBuffer * | target, | ||
const OrthancPluginDicomInstance * | instance | ||
) |
This function returns a memory buffer containing the serialization of a DICOM instance that is managed by the Orthanc core.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
target | The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer(). |
instance | The instance of interest. |
OrthancPluginDicomInstance* OrthancPluginTranscodeDicomInstance | ( | OrthancPluginContext * | context, |
const void * | buffer, | ||
uint32_t | size, | ||
const char * | transferSyntax | ||
) |
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.
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
buffer | The memory buffer containing the DICOM instance. |
size | The size of the memory buffer. |
transferSyntax | The transfer syntax UID for the transcoding. |