Stone of Orthanc

426 views
Skip to first unread message

Sébastien Jodogne

unread,
Oct 14, 2016, 10:51:03 AM10/14/16
to Orthanc Users
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:

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-

Chris Hafey

unread,
Oct 15, 2016, 7:01:27 AM10/15/16
to Orthanc Users
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 :)

Sébastien Jodogne

unread,
Oct 15, 2016, 7:13:13 AM10/15/16
to Orthanc Users
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 :)

Regards,
Sébastien-

Chris Hafey

unread,
Oct 15, 2016, 8:09:34 AM10/15/16
to Orthanc Users
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".

Sébastien Jodogne

unread,
Oct 15, 2016, 8:56:25 AM10/15/16
to Orthanc Users
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:

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-


On Saturday, October 15, 2016 at 2:09:34 PM UTC+2, Chris Hafey wrote:
Here is the output: [...]

Chris Hafey

unread,
Oct 15, 2016, 9:56:29 AM10/15/16
to Orthanc Users
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.

Sébastien Jodogne

unread,
Oct 17, 2016, 7:43:43 AM10/17/16
to Orthanc Users
I've just pushed a changelist that should fix the compilation on OS X, please could you give another try?

Chris Hafey

unread,
Oct 18, 2016, 8:37:44 AM10/18/16
to Orthanc Users
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)

Marco Barnig

unread,
Oct 18, 2016, 5:55:48 PM10/18/16
to Orthanc Users
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

Sébastien Jodogne

unread,
Oct 19, 2016, 2:55:52 AM10/19/16
to Orthanc Users
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-

Chris Hafey

unread,
Oct 24, 2016, 8:33:52 AM10/24/16
to Orthanc Users
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

Sébastien Jodogne

unread,
Oct 24, 2016, 8:52:15 AM10/24/16
to Orthanc Users
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-

Chris Hafey

unread,
Oct 24, 2016, 9:42:31 AM10/24/16
to Orthanc Users
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

Chris Hafey

unread,
Oct 26, 2016, 5:51:54 AM10/26/16
to Orthanc Users
Any idea on this?  Would love to try it out!!

Sébastien Jodogne

unread,
Oct 26, 2016, 6:13:23 AM10/26/16
to Orthanc Users
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.

Marco Barnig

unread,
Oct 26, 2016, 3:56:36 PM10/26/16
to Orthanc Users
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

sandor...@gmail.com

unread,
Jul 12, 2017, 1:41:25 AM7/12/17
to Orthanc Users
dear all, how can I install this onto docker?

Sébastien Jodogne

unread,
Jul 12, 2017, 2:18:29 AM7/12/17
to Orthanc Users, sandor...@gmail.com
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-
Message has been deleted

Harkant Singh

unread,
Aug 27, 2018, 11:10:23 AM8/27/18
to Orthanc Users
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"].as<std::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"].as<std::string>());
"
I hope someone has instructions to build it for raspberry pi.

Sébastien Jodogne

unread,
Aug 28, 2018, 3:00:53 PM8/28/18
to Orthanc Users
Hello,

This compilation issue is fixed by the following changeset:

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-

Harkant Singh

unread,
Sep 18, 2018, 2:26:18 AM9/18/18
to Orthanc Users
Thanks, that helped me proceed quite ahead.
But now I got 

[ 99%] Linking CXX executable OrthancStoneSingleVolume
libOrthancStone.a(pixman-arm-simd.c.o): In function `arm_simd_fill':
pixman-arm-simd.c:(.text+0x54): undefined reference to `pixman_composite_src_n_8_asm_armv6'
pixman-arm-simd.c:(.text+0x8c): undefined reference to `pixman_composite_src_n_8888_asm_armv6'
pixman-arm-simd.c:(.text+0xc4): undefined reference to `pixman_composite_src_n_0565_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_8_8':
pixman-arm-simd.c:(.text+0x130): undefined reference to `pixman_composite_src_8_8_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_0565_0565':
pixman-arm-simd.c:(.text+0x198): undefined reference to `pixman_composite_src_0565_0565_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_8888_8888':
pixman-arm-simd.c:(.text+0x1f8): undefined reference to `pixman_composite_src_8888_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_8888_8888_normal_SRC':
pixman-arm-simd.c:(.text+0x354): undefined reference to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_8888_8888_pad_SRC':
pixman-arm-simd.c:(.text+0x5cc): undefined reference to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6'
pixman-arm-simd.c:(.text+0x5fc): undefined reference to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6'
pixman-arm-simd.c:(.text+0x62c): undefined reference to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_8888_8888_none_SRC':
pixman-arm-simd.c:(.text+0x8c4): undefined reference to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o):pixman-arm-simd.c:(.text+0x900): more undefined references to `pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6' follow
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_0565_0565_normal_SRC':
pixman-arm-simd.c:(.text+0xcbc): undefined reference to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_0565_0565_pad_SRC':
pixman-arm-simd.c:(.text+0xf44): undefined reference to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6'
pixman-arm-simd.c:(.text+0xf74): undefined reference to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6'
pixman-arm-simd.c:(.text+0xfa4): undefined reference to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `fast_composite_scaled_nearest_armv6_0565_0565_none_SRC':
pixman-arm-simd.c:(.text+0x1248): undefined reference to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o):pixman-arm-simd.c:(.text+0x1284): more undefined references to `pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6' follow
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_n_8888_8888_ca':
pixman-arm-simd.c:(.text+0x1564): undefined reference to `pixman_composite_over_n_8888_8888_ca_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_in_reverse_8888_8888':
pixman-arm-simd.c:(.text+0x15c4): undefined reference to `pixman_composite_in_reverse_8888_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_n_8_8888':
pixman-arm-simd.c:(.text+0x1650): undefined reference to `pixman_composite_over_n_8_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_add_8_8':
pixman-arm-simd.c:(.text+0x16b8): undefined reference to `pixman_composite_add_8_8_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_reverse_n_8888':
pixman-arm-simd.c:(.text+0x1708): undefined reference to `pixman_composite_over_reverse_n_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_n_8888':
pixman-arm-simd.c:(.text+0x1760): undefined reference to `pixman_composite_over_n_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_8888_n_8888':
pixman-arm-simd.c:(.text+0x17dc): undefined reference to `pixman_composite_over_8888_n_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_over_8888_8888':
pixman-arm-simd.c:(.text+0x183c): undefined reference to `pixman_composite_over_8888_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_x888_0565':
pixman-arm-simd.c:(.text+0x18a0): undefined reference to `pixman_composite_src_x888_0565_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_0565_8888':
pixman-arm-simd.c:(.text+0x1904): undefined reference to `pixman_composite_src_0565_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `armv6_composite_src_x888_8888':
pixman-arm-simd.c:(.text+0x1964): undefined reference to `pixman_composite_src_x888_8888_asm_armv6'
libOrthancStone.a(pixman-arm-simd.c.o): In function `arm_simd_blt':
pixman-arm-simd.c:(.text+0x19f0): undefined reference to `pixman_composite_src_8_8_asm_armv6'
pixman-arm-simd.c:(.text+0x1a30): undefined reference to `pixman_composite_src_8888_8888_asm_armv6'
pixman-arm-simd.c:(.text+0x1a88): undefined reference to `pixman_composite_src_0565_0565_asm_armv6'
collect2: error: ld returned 1 exit status
CMakeFiles/OrthancStoneSingleVolume.dir/build.make:251: recipe for target 'OrthancStoneSingleVolume' failed
make[2]: *** [OrthancStoneSingleVolume] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/OrthancStoneSingleVolume.dir/all' failed
make[1]: *** [CMakeFiles/OrthancStoneSingleVolume.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Sébastien Jodogne

unread,
Sep 18, 2018, 2:54:33 AM9/18/18
to Orthanc Users
Have you tried a fully static build, by setting "-DSTATIC_BUILD=ON" on the CMake invocation?

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