Hello !
I’m trying to use python plugins.
Right now i’m trying to extend the Rest Api for listening on changes. I’m curious. Is there anywhere any documentation regarding to what can be used?
For example:
orthanc.RestApiGet(‘/instances’)
Where should I find the info about this?
Thanks,
Alex
There is some information about that here in the Orthanc Book: https://book.orthanc-server.com/plugins/python.html?highlight=onchange
Not sure, but in OrthancCPlugin.h file there is this. Those might be the events you can captture.
typedef enum
{
OrthancPluginChangeType_CompletedSeries = 0, /*!< Series is now complete /
OrthancPluginChangeType_Deleted = 1, /!< Deleted resource /
OrthancPluginChangeType_NewChildInstance = 2, /!< A new instance was added to this resource /
OrthancPluginChangeType_NewInstance = 3, /!< New instance received /
OrthancPluginChangeType_NewPatient = 4, /!< New patient created /
OrthancPluginChangeType_NewSeries = 5, /!< New series created /
OrthancPluginChangeType_NewStudy = 6, /!< New study created /
OrthancPluginChangeType_StablePatient = 7, /!< Timeout: No new instance in this patient /
OrthancPluginChangeType_StableSeries = 8, /!< Timeout: No new instance in this series /
OrthancPluginChangeType_StableStudy = 9, /!< Timeout: No new instance in this study /
OrthancPluginChangeType_OrthancStarted = 10, /!< Orthanc has started /
OrthancPluginChangeType_OrthancStopped = 11, /!< Orthanc is stopping /
OrthancPluginChangeType_UpdatedAttachment = 12, /!< Some user-defined attachment has changed for this resource /
OrthancPluginChangeType_UpdatedMetadata = 13, /!< Some user-defined metadata has changed for this resource /
OrthancPluginChangeType_UpdatedPeers = 14, /!< The list of Orthanc peers has changed /
OrthancPluginChangeType_UpdatedModalities = 15, /!< The list of DICOM modalities has changed /
OrthancPluginChangeType_JobSubmitted = 16, /!< New Job submitted /
OrthancPluginChangeType_JobSuccess = 17, /!< A Job has completed successfully /
OrthancPluginChangeType_JobFailure = 18, /!< A Job has failed */
_OrthancPluginChangeType_INTERNAL = 0x7fffffff
} OrthancPluginChangeType;
Stephen Scotti
Hi,
Unfortunately, we don’t have a reference documentation of the python SDK.
You can get a list of classes and functions here. But the best resources are all samples from the orthanc-book python page and from this repo.
HTH
Alain