Hi all,
I've decided to create a plugin, but my skills with c++ are zero, so i need advice on how to start.
Some background on what i want to do: 3 orthanc servers + 1 radiology workstation. One terminal is running 2 orthanc, the first one(number 1) on index-only mode(no image) with tons of studies indexed and the other (number 2) full-index mode (with image). The studies on this orthanc will last only 1 week. The other orthanc (number 3) will be on remote, with all the studies of those 2 orthanc indexed with image + some others (study purposes).
The most common case is this, workstation ask for a study/series to the orthanc #2, in case it has the study, it will send it to workstation (a normal c-move). In case it does not, it will retrieve the study/series from the orthanc #3 (this one will always have the required study, if correct). Beside this, the plugin have to retrieve all the studies from the patient (for this is the orthanc #1, to check all the uid and retrieve it from orthanc #3). Those other studies from the patient will be indexed in orthanc#2 + sent to workstation.
The logic is simple, but i have no idea how to work with the orthanc SDK.
Right now, i only have:
#include "Resource/OrthancContext.h"
extern "C"
{
ORTHANC_PLUGINS_API int32_t OrthancPluginInitialize(OrthancPluginContext* context)
{
OrthancContext::GetInstance().Initialize(context);
OrthancContext::GetInstance().LogWarning("Initializing sample");
return 0;
}
ORTHANC_PLUGINS_API void OrthancPluginFinalize()
{
OrthancContext::GetInstance().LogWarning("Finalizing sample");
OrthancContext::GetInstance().Finalize();
}
ORTHANC_PLUGINS_API const char* OrthancPluginGetName()
{
return "sample";
}
ORTHANC_PLUGINS_API const char* OrthancPluginGetVersion()
{
return "1.0";
}
}
Now the questions:
1- Since the plugin only need to do its logic after a move, what should i do now? i've read about the c-move in the sdk page. Do i have to implement OrthancPluginRegisterMoveCallback on this file?
2- What do i have to include to work via dicom protocol?
Thanks for reading this and any help will be appreciated.