Stone of Orthanc

Dear Orthanc users,

I am very happy to announce that we have just released the Stone of Orthanc, as detailed in this blog post:
http://www.orthanc-server.com/static.php?page=blog#stone

In a nutshell, Stone of Orthanc is a lightweight, cross-platform C++ toolkit for the CPU-based rendering of medical images. This is kind of a Cornerstone for C++, or kind of a VTK for CPU-based rendering of medical images.

The toolkit is already quite large, with over 10,000 line of codes. For the time being, the documentation is still sparse (we are working on this), but sample applications are available on the homepage of the toolkit:

http://www.orthanc-server.com/static.php?page=stone

We hope this new tool will contribute to the development of new, innovative, free and open-source applications for the viewing and analysis of medical images.

Cheers,
Sébastien-

Hi Sébastien,

This looks really interesting! Unfortunately I couldn’t get it to compile and the on Mac OS X 10.12. My CMAKE skills are a bit rusty so I may have done something wrong - if someone has exact build instructions please post! Thanks

Chris

PS - I wrapped VTK with a REST interface a few years back and wrote a cornerstone adapter for it. Once I get familiar with ortkanc-stone I may port the cornerstone adapter to it :slight_smile:

Hi Chris,

Thank for your interest!

Stone currently properly builds on Linux and Microsoft Windows; It shouldn’t be a big deal to port the CMake script to OS X. The only issue is that I don’t have access to any Mac computer, which prevents me from patching the build environment… maybe Osimis could help here, I’ll ask them for support.

It would indeed be really great to smoothly integrate Cornerstone and Stone, in order to propose an unified environment for both heavyweight and Web applications :slight_smile:

Regards,
Sébastien-

Here is the output:

Chriss-15-MacBook-Pro:orthanc-stone-build chafey$ cmake -GXcode -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DALLOW_DOWNLOADS=ON …/orthanc-stone

– The C compiler identification is AppleClang 8.0.0.8000038

– The CXX compiler identification is AppleClang 8.0.0.8000038

– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang – works

– Detecting C compiler ABI info

– Detecting C compiler ABI info - done

– Detecting C compile features

– Detecting C compile features - done

– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ – works

– Detecting CXX compiler ABI info

– Detecting CXX compiler ABI info - done

– Detecting CXX compile features

– Detecting CXX compile features - done

– Found PythonInterp: /usr/local/bin/python (found version “2.7.12”)

– Found PkgConfig: /usr/local/bin/pkg-config (found version “0.29.1”)

– Looking for include file uuid/uuid.h

– Looking for include file uuid/uuid.h - found

CMake Error at Resources/CMake/CairoConfiguration.cmake:209 (message):

Support your platform here

Call Stack (most recent call first):

Resources/CMake/OrthancStone.cmake:51 (include)

CMakeLists.txt:4 (include)

– Configuring incomplete, errors occurred!

See also “/Users/chafey/srcc/orthanc-stone/orthanc-stone-build/CMakeFiles/CMakeOutput.log”.

Thanks to your log, I have just pushed a rough attempt to support OS X. It will most probably not work as such, but the build process should go further anyway:
https://bitbucket.org/sjodogne/orthanc-stone/commits/490347621f420539b2adcbfc85f11065d68a9236

In particular, I suspect that the SDL support will not compile. But, this support is necessary to compile the sample applications. You can try and fix it by editing the file “Resources/CMake/SdlConfiguration.cmake”.

Please could you give another try and publish the log?

Sébastien-

CMake now succeeds, but it fails during compile on X11:

o /Users/chafey/srcc/orthanc-stone/orthanc-stone-build/OrthancStone.build/Debug/OrthancStone.build/Objects-normal/x86_64/SDL_dynapi.o

In file included from /Users/chafey/srcc/orthanc-stone/orthanc-stone-build/SDL2-2.0.4/src/dynapi/SDL_dynapi.c:31:

/Users/chafey/srcc/orthanc-stone/orthanc-stone-build/SDL2-2.0.4/include/SDL_syswm.h:72:10: fatal error:

‘X11/Xlib.h’ file not found

#include <X11/Xlib.h>

^

1 error generated.

I’ve just pushed a changelist that should fix the compilation on OS X, please could you give another try?
https://bitbucket.org/sjodogne/orthanc-stone/commits/d9452f5a5346d3adf32ae4b911f8c48960e67644

Further but still failing:

** BUILD FAILED **

The following build commands failed:

CompileC /Users/chafey/srcc/orthanc-stone/orthanc-stone-build/OrthancStone.build/Debug/OrthancStone.build/Objects-normal/x86_64/SDL_events.o /Users/chafey/srcc/orthanc-stone/orthanc-stone-build/SDL2-2.0.4/src/events/SDL_events.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

Hello Sébastien and Chris,

I was able to successfully build Stone on OS X, without a single error or warning.
Target 10.11 with Xcode 7.3.1 on El Capitan 10.11.6
Target 10.12 with Xcode 8.1 (beta 8T47) on Sierra 10.12
The samples OrthancStoneEmpty and OrthancStoneTestPattern are running (red window and green/black window).
The other samples request the WebViewer plugin which is currently not installed in my Orthanc server.
I will dive deeper in the Stone project in the coming days and give you a feedback on my findings.
greetings,

Marco Barnig

Marco, thanks for the feedback! Note however that the WebViewer plugin is not necessary: If it is unavailable, Stone will still work, but progressive download of volumes will be disabled (which only impacts user experience).

Chris, I think your CMake cache is polluted by older build attempts. Please try and again, starting with a fresh build directory.

Cheers,
Sébastien-

I got the latest and managed to build it by removing …/…/Samples/ from the #include’s in the SampleMainSdl.cpp file. I get a connection error to Orthanc when I try to start any of the applications (even though Orthanc is running on localhost:8042):

W1024 07:32:54.097577 IBasicApplication.cpp:210] URL to the Orthanc REST API: http://localhost:8042/

E1024 07:32:54.106630 MessagingToolbox.cpp:211] Cannot connect to your Orthanc server

E1024 07:32:54.106754 IBasicApplication.cpp:267] EXCEPTION: Error in the network protocol

Oh, sorry, the #include’s are now fixed:
https://bitbucket.org/sjodogne/orthanc-stone/commits/55407926aac391af125f9820458b2b7b832bb615

Regarding your connection problem, I cannot reproduce the issue on Linux or Windows. Please could you post a “–verbose” log of both the Stone sample and your Orthanc server? Could you also check whether setting the “RemoteAccessAllowed” to “true” in the configuration file of Orthanc would solve the problem?

TIA,
Sébastien-

when run with --verbose i get a 401 unauthorized. I also tried passing the username and password via command line arguments but got the same 401 unauthorized. I am using the out of the box docker jodogne/orthanc-plugins which has RemoteAccessAllowed: true and am able to access orthanc explorer via localhost:8042 and the API succesfully via CURL.

Chriss-15-MacBook-Pro:debug chafey$ ./OrthancStoneTestPattern --username orthanc --password orthanc --verbose

W1024 08:42:07.891548 IBasicApplication.cpp:174] Initial display size: 1024x768

W1024 08:42:07.891630 IBasicApplication.cpp:179] OpenGL is enabled, disable it with option “–opengl=off” if the application crashes

W1024 08:42:07.891660 IBasicApplication.cpp:210] URL to the Orthanc REST API: http://localhost:8042/

I1024 08:42:07.895032 HttpClient.cpp:638] Error in HTTP request, received HTTP status 401 (Unauthorized)

E1024 08:42:07.895170 MessagingToolbox.cpp:211] Cannot connect to your Orthanc server

E1024 08:42:07.895200 IBasicApplication.cpp:267] EXCEPTION: Error in the network protocol

Chris

Any idea on this? Would love to try it out!!

I’m really sorry, but this problem is absent on Linux and Windows, and I still have no physical access to an Apple computer… it’s thus very difficult for me to give an insight about what is going wrong.

I have just pushed a changelist that corrects a minor bug and thus that might help, so please you could sync and try again?

Also, have you checked the log of the Orthanc server (in “–verbose” mode)? This could allow you to see whether Stone is able to connect to Orthanc (but the latter prevents the connection), or if the problem is within Stone.

Hello Chris,

A zipped file of my OS X Stone release is available at the link http://www.radiologic.fr/downloads/stone_osx.zip (the filesize exceeds the allowed attachment size for this post).

Perhaps it can be of some help.

Since my message a week ago, I have not found the time to explore Stone in more depht.

regards,

Marco Barnig

dear all, how can I install this onto docker?

Hello,

Stone of Orthanc is a SDK. It makes no sense to install it using Docker without creating an application on the top of it.

Sébastien-

Not able to Compile for Raspbian. First block was in the PixmanConfiguration.cmake - I had to change ‘armv7-a’ to ‘armv7l’. only then the make part of the compilation ran. Then I am struck at

"/home/pi/Downloads/sjodogne-orthanc-stone-38c795cc7c48/Applications/IBasicApplication.cpp: In static member function ‘static int OrthancStone::IBasicApplication::ExecuteWithSdl(OrthancStone::IBasicApplication&, int, char**)’:
/home/pi/Downloads/sjodogne-orthanc-stone-38c795cc7c48/Applications/IBasicApplication.cpp:194:20: error: ‘class Orthanc::WebServiceParameters’ has no member named ‘SetUsername’; did you mean ‘GetUsername’?
webService.SetUsername(parameters[“username”].asstd::string());
^~~~~~~~~~~
/home/pi/Downloads/sjodogne-orthanc-stone-38c795cc7c48/Applications/IBasicApplication.cpp:199:20: error: ‘class Orthanc::WebServiceParameters’ has no member named ‘SetPassword’; did you mean ‘GetPassword’?
webService.SetPassword(parameters[“password”].asstd::string());
"
I hope someone has instructions to build it for raspberry pi.

Hello,

This compilation issue is fixed by the following changeset:
https://bitbucket.org/sjodogne/orthanc-stone/commits/f8e801a678ca3a7f56679f366aafd70dd72dab4e

However, bare in mind that the Stone of Orthanc is still a research project under active development, and that its API is continuously evolving.

HTH,
Sébastien-