Functions to register and manage DICOM callbacks (worklists, C-Find, C-MOVE).
More...
|
typedef struct _OrthancPluginWorklistQuery_t | OrthancPluginWorklistQuery |
| Opaque structure to an object that represents a C-Find query for worklists.
|
|
typedef struct _OrthancPluginWorklistAnswers_t | OrthancPluginWorklistAnswers |
| Opaque structure to an object that represents the answers to a C-Find query for worklists.
|
|
typedef struct _OrthancPluginFindQuery_t | OrthancPluginFindQuery |
| Opaque structure to an object that represents a C-Find query.
|
|
typedef struct _OrthancPluginFindAnswers_t | OrthancPluginFindAnswers |
| Opaque structure to an object that represents the answers to a C-Find query for worklists.
|
|
typedef OrthancPluginErrorCode(* | OrthancPluginWorklistCallback) (OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const char *issuerAet, const char *calledAet) |
| Callback to handle the C-Find SCP requests for worklists. More...
|
|
typedef OrthancPluginErrorCode(* | OrthancPluginFindCallback) (OrthancPluginFindAnswers *answers, const OrthancPluginFindQuery *query, const char *issuerAet, const char *calledAet) |
| Callback to handle incoming C-Find SCP requests. More...
|
|
typedef void *(* | OrthancPluginMoveCallback) (OrthancPluginResourceType resourceType, const char *patientId, const char *accessionNumber, const char *studyInstanceUid, const char *seriesInstanceUid, const char *sopInstanceUid, const char *originatorAet, const char *sourceAet, const char *targetAet, uint16_t originatorId) |
| Callback to handle incoming C-Move SCP requests. More...
|
|
|
OrthancPluginErrorCode | OrthancPluginRegisterWorklistCallback (OrthancPluginContext *context, OrthancPluginWorklistCallback callback) |
| Register a callback to handle modality worklists requests. More...
|
|
OrthancPluginErrorCode | OrthancPluginWorklistAddAnswer (OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size) |
| Add one answer to some modality worklist request. More...
|
|
OrthancPluginErrorCode | OrthancPluginWorklistMarkIncomplete (OrthancPluginContext *context, OrthancPluginWorklistAnswers *answers) |
| Mark the set of worklist answers as incomplete. More...
|
|
int32_t | OrthancPluginWorklistIsMatch (OrthancPluginContext *context, const OrthancPluginWorklistQuery *query, const void *dicom, uint32_t size) |
| Test whether a worklist matches the query. More...
|
|
OrthancPluginErrorCode | OrthancPluginWorklistGetDicomQuery (OrthancPluginContext *context, OrthancPluginMemoryBuffer *target, const OrthancPluginWorklistQuery *query) |
| Retrieve the worklist query as a DICOM file. More...
|
|
OrthancPluginErrorCode | OrthancPluginRegisterFindCallback (OrthancPluginContext *context, OrthancPluginFindCallback callback) |
| Register a callback to handle C-Find requests. More...
|
|
OrthancPluginErrorCode | OrthancPluginFindAddAnswer (OrthancPluginContext *context, OrthancPluginFindAnswers *answers, const void *dicom, uint32_t size) |
| Add one answer to some C-Find request. More...
|
|
OrthancPluginErrorCode | OrthancPluginFindMarkIncomplete (OrthancPluginContext *context, OrthancPluginFindAnswers *answers) |
| Mark the set of C-Find answers as incomplete. More...
|
|
uint32_t | OrthancPluginGetFindQuerySize (OrthancPluginContext *context, const OrthancPluginFindQuery *query) |
| Get the number of tags in a C-Find query. More...
|
|
OrthancPluginErrorCode | OrthancPluginGetFindQueryTag (OrthancPluginContext *context, uint16_t *group, uint16_t *element, const OrthancPluginFindQuery *query, uint32_t index) |
| Get one tag in a C-Find query. More...
|
|
char * | OrthancPluginGetFindQueryTagName (OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index) |
| Get the symbolic name of one tag in a C-Find query. More...
|
|
char * | OrthancPluginGetFindQueryValue (OrthancPluginContext *context, const OrthancPluginFindQuery *query, uint32_t index) |
| Get the value associated with one tag in a C-Find query. More...
|
|
OrthancPluginErrorCode | OrthancPluginRegisterMoveCallback (OrthancPluginContext *context, OrthancPluginMoveCallback callback, OrthancPluginGetMoveSize getMoveSize, OrthancPluginApplyMove applyMove, OrthancPluginFreeMove freeMove) |
| Register a callback to handle C-Move requests. More...
|
|
◆ OrthancPluginFindCallback
Signature of a callback function that is triggered whenever Orthanc receives a C-Find SCP request not concerning modality worklists.
- Parameters
-
answers | The target structure where answers must be stored. |
query | The worklist query. |
issuerAet | The Application Entity Title (AET) of the modality from which the request originates. |
calledAet | The Application Entity Title (AET) of the modality that is called by the request. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginMoveCallback
typedef void*(* OrthancPluginMoveCallback) (OrthancPluginResourceType resourceType, const char *patientId, const char *accessionNumber, const char *studyInstanceUid, const char *seriesInstanceUid, const char *sopInstanceUid, const char *originatorAet, const char *sourceAet, const char *targetAet, uint16_t originatorId) |
Signature of a callback function that is triggered whenever Orthanc receives a C-Move SCP request. The callback receives the type of the resource of interest (study, series, instance...) together with the DICOM tags containing its identifiers. In turn, the plugin must create a driver object that will be responsible for driving the successive move suboperations.
- Parameters
-
resourceType | The type of the resource of interest. Note that this might be set to ResourceType_None if the QueryRetrieveLevel (0008,0052) tag was not provided by the issuer (i.e. the originator modality). |
patientId | Content of the PatientID (0x0010, 0x0020) tag of the resource of interest. Might be NULL. |
accessionNumber | Content of the AccessionNumber (0x0008, 0x0050) tag. Might be NULL. |
studyInstanceUid | Content of the StudyInstanceUID (0x0020, 0x000d) tag. Might be NULL. |
seriesInstanceUid | Content of the SeriesInstanceUID (0x0020, 0x000e) tag. Might be NULL. |
sopInstanceUid | Content of the SOPInstanceUID (0x0008, 0x0018) tag. Might be NULL. |
originatorAet | The Application Entity Title (AET) of the modality from which the request originates. |
sourceAet | The Application Entity Title (AET) of the modality that should send its DICOM files to another modality. |
targetAet | The Application Entity Title (AET) of the modality that should receive the DICOM files. |
originatorId | The Message ID issued by the originator modality, as found in tag (0000,0110) of the DICOM query emitted by the issuer. |
- Returns
- The NULL value if the plugin cannot deal with this query, or a pointer to the driver object that is responsible for handling the successive move suboperations.
- Note
- If targetAet equals sourceAet, this is actually a query/retrieve operation.
◆ OrthancPluginWorklistCallback
Signature of a callback function that is triggered when Orthanc receives a C-Find SCP request against modality worklists.
- Parameters
-
answers | The target structure where answers must be stored. |
query | The worklist query. |
issuerAet | The Application Entity Title (AET) of the modality from which the request originates. |
calledAet | The Application Entity Title (AET) of the modality that is called by the request. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginFindAddAnswer()
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.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
answers | The set of answers. |
dicom | The answer to be added, encoded as a DICOM file. |
size | The size of the DICOM file. |
- Returns
- 0 if success, other value if error.
- See also
- OrthancPluginCreateDicom()
◆ OrthancPluginFindMarkIncomplete()
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.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
answers | The set of answers. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginGetFindQuerySize()
This function returns the number of tags that are contained in the given C-Find query.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
query | The C-Find query. |
- Returns
- The number of tags.
◆ OrthancPluginGetFindQueryTag()
This function returns the group and the element of one DICOM tag in the given C-Find query.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
group | The group of the tag (output). |
element | The element of the tag (output). |
query | The C-Find query. |
index | The index of the tag of interest. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginGetFindQueryTagName()
This function returns the symbolic name of one DICOM tag in the given C-Find query.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
query | The C-Find query. |
index | The index of the tag of interest. |
- Returns
- The NULL value in case of error, or a string containing the name of the tag.
-
0 if success, other value if error.
◆ OrthancPluginGetFindQueryValue()
This function returns the value associated with one tag in the given C-Find query.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
query | The C-Find query. |
index | The index of the tag of interest. |
- Returns
- The NULL value in case of error, or a string containing the value of the tag.
-
0 if success, other value if error.
◆ OrthancPluginRegisterFindCallback()
This function registers a callback to handle C-Find SCP requests that are not related to modality worklists.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
callback | The callback. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginRegisterMoveCallback()
This function registers a callback to handle C-Move SCP requests.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
callback | The main callback. |
getMoveSize | Callback to read the number of C-Move suboperations. |
applyMove | Callback to apply one C-Move suboperations. |
freeMove | Callback to free the C-Move driver. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginRegisterWorklistCallback()
This function registers a callback to handle C-Find SCP requests on modality worklists.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
callback | The callback. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginWorklistAddAnswer()
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.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
answers | The set of answers. |
query | The worklist query, as received by the callback. |
dicom | The worklist to answer, encoded as a DICOM file. |
size | The size of the DICOM file. |
- Returns
- 0 if success, other value if error.
- See also
- OrthancPluginCreateDicom()
◆ OrthancPluginWorklistGetDicomQuery()
This function retrieves the DICOM file that underlies a C-Find SCP query against modality worklists.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
target | Memory buffer where to store the DICOM file. It must be freed with OrthancPluginFreeMemoryBuffer(). |
query | The worklist query, as received by the callback. |
- Returns
- 0 if success, other value if error.
◆ OrthancPluginWorklistIsMatch()
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().
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
query | The worklist query, as received by the callback. |
dicom | The worklist to answer, encoded as a DICOM file. |
size | The size of the DICOM file. |
- Returns
- 1 if the worklist matches the query, 0 otherwise.
◆ OrthancPluginWorklistMarkIncomplete()
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.
- Parameters
-
context | The Orthanc plugin context, as received by OrthancPluginInitialize(). |
answers | The set of answers. |
- Returns
- 0 if success, other value if error.