Priority parameter for Plugin REST callbacks

Hi Sebastien and Alain,
I am developing a plugin (libA.so) and I need to override a REST API endpoint that is already implemented by the DICOMweb plugin.

Specifically, I want my plugin to handle the following route: studies/([^/]*)/series/([^/]*)/thumbnail

Currently, the DICOMweb plugin’s registration seems to take precedence. Is there a way to ensure my plugin’s route is registered with higher priority in the Orthanc core, or a specific way to “overwrite” an existing callback from another plugin?

Would it be feasible to extend OrthancPluginRegisterRestCallback with an optional priority parameter? This would allow the Orthanc dispatcher to give precedence to callbacks with higher values when multiple plugins register conflicting URI patterns.

Thanks,

Christophe

Hi @Christophe

Have you tried listing your plugins explicitly in the “Plugins” configuration like:

"Plugins": ["libA.so", "libOrthanDicomWeb.so"]

That should work (as long as your plugin is not trying to call the same route from the DICOMweb plugin because it would actually call itself in an infinite loop).

Hope this helps,

Alain.

Hi @alainmazy , thanks for your advices, if my Plugin is written by Java, how can put plugins in order ?

??? Have you tried this ?

"Plugins": ["libOrthancJava.so", "libOrthanDicomWeb.so"]