Orthanc Plugin SDK  1.12.4
Documentation of the plugin interface of Orthanc
Orthanc Plugin SDK Documentation

This C/C++ SDK allows external developers to create plugins that can be loaded into Orthanc to extend its functionality. Each Orthanc plugin must expose 4 public functions with the following signatures:

  1. int32_t OrthancPluginInitialize(const OrthancPluginContext* context): This function is invoked by Orthanc when it loads the plugin on startup. The plugin must:
  2. void OrthancPluginFinalize(): This function is invoked by Orthanc during its shutdown. The plugin must free all its memory.
  3. const char* OrthancPluginGetName(): The plugin must return a short string to identify itself.
  4. const char* OrthancPluginGetVersion(): The plugin must return a string containing its version number.

The name and the version of a plugin is only used to prevent it from being loaded twice. Note that, in C++, it is mandatory to declare these functions within an extern "C" section.

To ensure multi-threading safety, the various REST callbacks are guaranteed to be executed in mutual exclusion since Orthanc 0.8.5. If this feature is undesired (notably when developing high-performance plugins handling simultaneous requests), use OrthancPluginRegisterRestCallbackNoLock().