Adding custom static files to zip recovered by /studies/{id}/media

50 views
Skip to first unread message

marco....@hotmail.it

unread,
Jan 12, 2017, 6:53:41 PM1/12/17
to Orthanc Users
I need to configure Orthanc so that the zip recovered from /studies/{id}/media contains custom static files. there's a way?

I'm looking at the url /tools/create-media, but are not sure what to do..

Alain Mazy

unread,
Jan 13, 2017, 3:29:26 AM1/13/17
to marco....@hotmail.it, Orthanc Users
No, this can not be achieved out of the box.  

You'll need to write a plugin for that or, easier, write a small WebServer application that will proxy the user requests, download the zip from Orthanc, add your static files to the zip and forward the response to the user.  

Typically, for this kind of job, we use CherryPy to write a Web Server in a few lines of codes but there are plenty of alternatives out there (i.e: node.js)

On Fri, Jan 13, 2017 at 12:53 AM, <marco....@hotmail.it> wrote:
I need to configure Orthanc so that the zip recovered from /studies/{id}/media contains custom static files. there's a way?

I'm looking at the url /tools/create-media, but are not sure what to do..



--

Alain Mazy / CTO 
a...@osimis.io / +32 494 31 67 27

Osimis

OSIMIS S.A. 
Rue bois Saint-Jean 15/1BE-4102 Seraing 
www.osimis.io

Twitter LinkedIn


Sébastien Jodogne

unread,
Jan 13, 2017, 3:41:52 AM1/13/17
to Orthanc Users, marco....@hotmail.it
As a complement to Alain's suggestion, you have 2 other possibilities:
  1. As Orthanc is free and open-source software, you can adapt the code to fulfill your needs. Check out this file: https://goo.gl/Bwuyuw
  2. Develop an Orthanc plugin to override the REST URI "/tools/create-media", which will avoid the need of using a third-party Web server (Orthanc comes bundled with its own Web server which plugins can immediately reuse): http://book.orthanc-server.com/developers/creating-plugins.html
HTH,
Sébastien-
Message has been deleted

marco....@hotmail.it

unread,
Jan 15, 2017, 11:56:16 AM1/15/17
to Orthanc Users, marco....@hotmail.it
which is the best solution to compile the single file OrthancRestArchive.cpp for testing?

M scan M

unread,
Jan 15, 2017, 2:03:40 PM1/15/17
to Orthanc Users, marco....@hotmail.it
I think if all this plugin api could be exposed to lua engine it woild be more practical to modifiy and add functionality without needing compiling.
it will open a new ways to orthanc.

like how openresty opens a new ways to extend NGINX functionality with powerful lua scripts.

Sébastien Jodogne

unread,
Jan 15, 2017, 2:15:17 PM1/15/17
to Orthanc Users, marco....@hotmail.it


On Sunday, January 15, 2017 at 8:03:40 PM UTC+1, M scan M wrote:
I think if all this plugin api could be exposed to lua engine it woild be more practical to modifiy and add functionality without needing compiling.
it will open a new ways to orthanc.

like how openresty opens a new ways to extend NGINX functionality with powerful lua scripts.

It is already possible to create a C/C++ plugin that would offer such more advanced Lua scripting possibilities.

Just feel free to contribute by creating such a plugin... if Orthanc is designed as an extensible, free and open-source framework, it is precisely for other external people like you to contribute by building and sharing their own power functionalities ;)

Regards,
Sébastien-

M scan M

unread,
Jan 15, 2017, 3:17:50 PM1/15/17
to Orthanc Users, marco....@hotmail.it
I now that i asks for something outside your scope in developing Orthanc.

But I really LOVE Orthanc and want it to be more powerful.

I and most users her can't create  C/C++ plugins or even deploy already plugins.

so i ask you for this option for the benefit of Orthanc.

Excuse me if i repeated my wish (Not request).

Thanks for the great orthanc, And please please keep going your awesome work.

Sébastien Jodogne

unread,
Jan 15, 2017, 3:38:09 PM1/15/17
to Orthanc Users, marco....@hotmail.it
I now that i asks for something outside your scope in developing Orthanc.
But I really LOVE Orthanc and want it to be more powerful.
I and most users her can't create  C/C++ plugins or even deploy already plugins.
so i ask you for this option for the benefit of Orthanc.

Many thanks for your positive feedback about Orthanc.

Obviously, I would also *love* to provide more powerful Lua scripting to the benefit of the community. With the collaboration Osimis, we'll for instance soon propose a Windows package containing all the official plugins, so as to make the Orthanc deployment as straightforward as possible for the average user.

Unfortunately, my bandwidth is limited: As a consequence, I must focus on features that are immediately useful to my daily work to make the development of Orthanc sustainable.

I am at a point where I *need* external contributions to implement requirements such as yours, that are out of the scope of my daily roadmap. If this is an urgent need, you're kindly invited to develop it by yourself or to rent someone who could develop it for you (Orthanc is open to everyone). If this is a lower-priority need, please be patient, I can't promise you any delay...

Sébastien-
Reply all
Reply to author
Forward
0 new messages