DICOM Web Viewer integration

Hi,

In looking for a simple solution for integrating with Orthanc.

I found this project:
http://ivmartel.github.io/dwv/

reviews?

best regards,

Vinicius

Hi Vinicius,

Thank you much for pointing this very interesting project.

There exists another project in the same vein:
https://github.com/xtk/X#readme

Cheers,

Sébastien-

I have played a bit with Dwv, but I have not been able to display a 3D file. In contrast, this is possible with XTK:
http://lessons.goxtk.com/13/

Hi there,

My name is Yves, I'm developing dwv and just learned about Orthanc. I was going to ask you the same question as Vinicius, so I jump on this thread.
Dwv can load one or multiple DICOM files either from the file system or via a url. It does not yet support loading DICOM files with jpeg/jpeg2000 encoded images. It just displays the slices, MPR and 3D are on the roadmap... I'm not sure what your problem was before the summer, I hope it has been fixed in the recent release! Both static and mobile version are available.

I managed to connect it with the Conquest PACS: the view link in its web browser launches a lua script that passes WADO links to dwv. What do you think about connecting Orthanc and dwv? Does Orthanc support WADO?

Best,
Yves

Dear Yves,

Many thanks for your post! I am happy of reading you, because I think retrospectively that I have misunderstood Vinicius’ initial question.

At that time, I was indeed focusing on 3D volume rendering (and not MPR volume rendering, which displays 2D slices). I was hoping that the emerging WebGL technology could enable full 3D volume rendering inside Web browsers… unfortunately, it has since appeared that people from the Khronos Group are not very keen on implementing primitives for native MIP rendering as an extension to WebGL 1.0:
http://www.khronos.org/message_boards/showthread.php/8739-MIP-rendering-in-WebGL-(integration-of-EXT_blend_minmax)

https://www.khronos.org/webgl/public-mailing-list/archives/1301/msg00023.html

Unfortunately, MIP rendering is necessary for clinical visualization (that should be as fast as possible). As a consequence, by contrast with my message from May 2013, my current conviction is that WebGL 1.0 is not mature enough for clinical visualization. WebGL 2.0 will support MIP rendering, but will only be supported by browsers in 1-2 years. So, I think that 3D volume rendering has currently to be implemented either as a standard, heavyweight, native client (such as OsiriX, Slicer or medInria that all use VTK), or as a native plugin for Web browsers (such as the NaCl technology from Google Chrome):
http://vtk.1045678.n5.nabble.com/VTK-and-PNaCl-td5723625.html

This also implies that full 3D volume rendering cannot currently be brought into Orthanc without endangering its lightweight philosophy. So, I am now convinced that Orthanc Explorer should embed a tool for lightweight MPR visualization inside Web browsers. And, of course, dwv is one very interesting candidate for that purpose!

To answer the second, technical part of your question, Orthanc does not currently implement WADO as such (it is on the mid-term roadmap), but implements a very similar mechanism as it provides a REST API to make the DICOM-to-PNG conversion on-the-fly. Concretely, provided the DICOM series of interest has the “XYZ” Orthanc identifier, you can retrieve the list of its images using a single GET request:

curl http://localhost:8042/series/XYZ

=> then, look in the “Instances” field to get the Orthanc ID of all the images of this series. This request can of course by done quite easily with AJAX.

To download a signed 16bpp PNG file of one of these images (whose Orthanc ID is, say, “ABC”), you would just use:

curl http://localhost:8042/instances/ABC/image-int16

=> The result is the PNG image of interest. This is actually quite similar to WADO, but in a RESTful perspective.

The Orthanc REST API allows you to download the 8bpp PNG, the unsigned 16bpp PNG, or of course the raw DICOM file. The full reference of the REST API can be found at the following address:
https://docs.google.com/spreadsheet/pub?key=0Ao5aRMxCX2hldEJadzVUaWFmNW5QTWhrYTI3UHMzdXc&single=true&gid=12&output=html

So, I think that connecting dwv to Orthanc is clearly possible and would be a great idea. What do you think about this opportunity?

Do not hesitate to contact me if you have further questions about Orthanc.

Cheers,

Sébastien-

Hi Sébastien,

Great, I can easily view files that are stored in Orthanc with dwv using this syntax:

/dwv/index.html?input=http://localhost:8042/instances/\{id\}/file

(after disabling same origin policy, --disable-web-security in chrome)

Now to the next level. Conquest allows you to set a viewer of your choice, the 'view' link at the series or instance level then points to a lua script that launches the chosen viewer. Do you have or plan to have such a mechanism in Orthanc? I had a look at the configuration.json file but could not find such an option.

Best,
Yves

Hi Yves,

Great, I can easily view files that are stored in Orthanc with dwv using this syntax:

/dwv/index.html?input=http://localhost:8042/instances/{id}/file
(after disabling same origin policy, --disable-web-security in chrome)

Fine! That’s very cool, I’m having a try :slight_smile:

Have you also been able to do the MPR rendering of the series of a 3D image?

Now to the next level. Conquest allows you to set a viewer of your choice, the ‘view’ link at the series or instance level then points to a lua script that launches the chosen viewer. Do you have or plan to have such a mechanism in Orthanc? I had a look at the configuration.json file but could not find such an option.

Orthanc already embeds Lua server-side scripting, but this its possibilities are currently quite limited (custom filtering of HTTP requests and incoming Store requests):
https://code.google.com/p/orthanc/wiki/ServerSideScripting

Please could you give an example of such a Conquest script? Is it client-side or server-side?

Thanks again!
Sébastien-

Dwv cannot do MPR yet, just stack of slices for now... These can be given in the url. I just tried the connection with one slice.
The lua code used for conquest is on github: https://github.com/ivmartel/dwv/blob/master/resources/dwv.lua. It's server side.

Hi Sébastien,

Did you have time to look at the lua script? What do you think? Is it something that could be implemented in Orthanc? It would allow you to keep Orthanc lightweight and give users the flexibility to use the default viewer or choose another one.

Best,
Yves

Hi Yvev, Sébastien

I’m very interested in a Web viewer, especially with 3D capability.

I saw this thread, but it looked it suddenly stopped. Are the issues with Dwv displaying MPR (and other things) resolved?

Are you aware of any other web viewer solutions that work well with Orthanc?

Hi Sébastien:

I did notice the Orthanc light web viewer posting on https://www.youtube.com/watch?v=0Ax4eckp2cQ.

Could you let me know the status?

Is the source code open in somewhere?

Hi,

Actually, Yves has done a great job in this area!

An Orthanc plugin is available to integrate DWV into Orthanc:
https://github.com/ivmartel/DwvExplorer

You can download and install it. I’m pretty sure Yves could provide additional tips if required.

Sébastien-

Hi again,

Yes, the code is open-sourced at the following location:
https://code.google.com/p/orthanc-viewer/

However, beware of the fact that, as written on this forum a few days ago (https://groups.google.com/d/msg/orthanc-users/XSnyVVBgxds/D_ayR5RE8jcJ): “The “orthanc-viewer” project is the result of a student’s Master thesis. It is currently experimental and not actively maintained nor supported by the Orthanc team. It is known to build correctly on Ubuntu 12.10, provided that the Orthanc development headers are installed beforehand. Maybe you could give a try with a virtual machine (e.g. VirtualBox).”

Sébastien-

Final part of my answer:

Are you aware of any other web viewer solutions that work well with Orthanc?

We are currently working hard on the following Web viewer that is smoothly integrated with Orthanc as a plugin:
https://www.youtube.com/watch?v=ub5IxlVqoOE

This will provide an alternative to the Yves’ great DWV plugin. Users will be free to choose the Web viewer that works best for their needs (or even use both of them!), just by registering the desired plugin into Orthanc.

Note that our own plugin is based upon Chris Hafey’s Cornerstone library to display interactive medical images:
https://github.com/chafey/cornerstone

It is planned to release our Web viewer publicly in the next few weeks (around beginning of March), together with PostgreSQL support and release 0.9.0.

Sébastien-

Yes, tell me if you need any help. But no MPR nor 3D yet... All contributions welcome!

Thank you. Look forward to the 0.9.0 release with all these great features.

DWV is one of the best and open source medical imaging viewer in my case I wish to open an entire study( 6 to 7 slices ) via URL in http://localhost/dwv/viewers/static/index.html. Plz someone help and tell me how I can do that.

Hello,

A plugin bringing DWV to Orthanc is available courtesy of Yves Martelli:
https://github.com/ivmartel/dwv-orthanc-plugin

Regards,
Sébastien-

Hi and thanks for the comment! I am about to release a new version of the viewer, I will update the Orthanc plugin just afterwards since it is getting quite outdated…

@farzalkhan786, your comment does not seem related to Orthanc, better to post it in the DWV issues: https://github.com/ivmartel/dwv/issues