# HG changeset patch # User Sebastien Jodogne # Date 1697037045 -7200 # Node ID a6d5373e471c3a3eb96c40c872b3f25e9bdd358b # Parent fdb012c86a753d36084e43058a1c7dde1083c77e# Parent 3ef91da066363da03970342f5c1126e65b3b3d37 integration mainline->deep-learning diff -r fdb012c86a75 -r a6d5373e471c Applications/Samples/Common/RtViewerApp.h --- a/Applications/Samples/Common/RtViewerApp.h Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/Samples/Common/RtViewerApp.h Wed Oct 11 17:10:45 2023 +0200 @@ -36,7 +36,6 @@ #include "../../../OrthancStone/Sources/Volumes/DicomVolumeImage.h" #include -#include #include #if ORTHANC_ENABLE_SDL diff -r fdb012c86a75 -r a6d5373e471c Applications/Samples/Common/RtViewerView.h --- a/Applications/Samples/Common/RtViewerView.h Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/Samples/Common/RtViewerView.h Wed Oct 11 17:10:45 2023 +0200 @@ -36,7 +36,6 @@ #include "../../../OrthancStone/Sources/Volumes/VolumeSceneLayerSource.h" #include -#include #include namespace OrthancStone diff -r fdb012c86a75 -r a6d5373e471c Applications/Samples/RtViewerPlugin/CMakeLists.txt --- a/Applications/Samples/RtViewerPlugin/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/Samples/RtViewerPlugin/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -119,6 +119,8 @@ ${ORTHANC_CORE_SOURCES} ) +DefineSourceBasenameForTarget(RtViewerPlugin) + set_target_properties(RtViewerPlugin PROPERTIES VERSION ${ORTHANC_PLUGIN_VERSION} SOVERSION ${ORTHANC_PLUGIN_VERSION}) diff -r fdb012c86a75 -r a6d5373e471c Applications/Samples/WebAssembly/CMakeLists.txt --- a/Applications/Samples/WebAssembly/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/Samples/WebAssembly/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -46,7 +46,7 @@ endif() set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ENVIRONMENT=web") -set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") +set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456") # 256MB + resize set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1") @@ -66,6 +66,7 @@ SET(ENABLE_DCMTK OFF) # Not necessary SET(ENABLE_GOOGLE_TEST OFF) SET(ENABLE_LOCALE ON) # Necessary for text rendering +SET(ENABLE_MODULE_JOBS OFF) SET(ORTHANC_SANDBOXED ON) # this will set up the build system for Stone of Orthanc and will @@ -91,6 +92,9 @@ ${AUTOGENERATED_SOURCES} ) +DefineSourceBasenameForTarget(OrthancStone) + + ################################################################################ # Define the WASM module @@ -106,6 +110,8 @@ ../Common/RtViewerView.h ) +DefineSourceBasenameForTarget(RtViewerWasm) + set_target_properties(RtViewerWasm PROPERTIES COMPILE_FLAGS "${WASM_FLAGS}" @@ -146,6 +152,8 @@ SingleFrameViewer/SingleFrameViewer.cpp ) +DefineSourceBasenameForTarget(SingleFrameViewerWasm) + set_target_properties(SingleFrameViewerWasm PROPERTIES COMPILE_FLAGS "${WASM_FLAGS}" @@ -174,3 +182,10 @@ ${CMAKE_CURRENT_BINARY_DIR}/SingleFrameViewerWasm.wasm DESTINATION ${ORTHANC_STONE_INSTALL_PREFIX}/SingleFrameViewer/ ) + + +# Boost::Math begs for -std=c++14 since Boost 1.82.0 +set_property(TARGET OrthancStone PROPERTY CXX_STANDARD 14) +set_property(TARGET RtViewerWasm PROPERTY CXX_STANDARD 14) +set_property(TARGET SingleFrameViewerWasm PROPERTY CXX_STANDARD 14) + diff -r fdb012c86a75 -r a6d5373e471c Applications/StoneWebViewer/NEWS --- a/Applications/StoneWebViewer/NEWS Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/StoneWebViewer/NEWS Wed Oct 11 17:10:45 2023 +0200 @@ -7,7 +7,8 @@ ----------- * Prevent dragging series before they are ready -* Open the first loaded series only if it is part of a selected study. +* Open the first loaded series only if it is part of a selected study +* Fix compatibility with Emscripten 3.1.47 Version 2.5 (2022-12-05) diff -r fdb012c86a75 -r a6d5373e471c Applications/StoneWebViewer/Plugin/CMakeLists.txt --- a/Applications/StoneWebViewer/Plugin/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/StoneWebViewer/Plugin/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -132,6 +132,8 @@ ${ORTHANC_CORE_SOURCES} ) +DefineSourceBasenameForTarget(StoneWebViewer) + set_target_properties(StoneWebViewer PROPERTIES VERSION ${STONE_WEB_VIEWER_VERSION} SOVERSION ${STONE_WEB_VIEWER_VERSION}) diff -r fdb012c86a75 -r a6d5373e471c Applications/StoneWebViewer/WebAssembly/CMakeLists.txt --- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -38,7 +38,7 @@ endif() set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ENVIRONMENT=web") -set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") +set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456") # 256MB + resize set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1") @@ -60,6 +60,7 @@ SET(ENABLE_DCMTK_TRANSCODING OFF) SET(ENABLE_GOOGLE_TEST OFF) SET(ENABLE_LOCALE ON) # Necessary for text rendering +SET(ENABLE_MODULE_JOBS OFF) SET(ENABLE_PUGIXML ON) # Necessary for OsiriX annotations SET(ORTHANC_SANDBOXED ON) SET(ENABLE_PROTOBUF ON) # Necessary for deep learning @@ -99,7 +100,7 @@ # Create the wrapper to call C++ from JavaScript # --------------------------------------------------------------- -set(LIBCLANG "libclang-4.0.so.1" CACHE PATH "Version of clang to generate the code model") +set(LIBCLANG "libclang.so.1" CACHE PATH "Version of clang to generate the code model") set(STONE_WRAPPER ${CMAKE_CURRENT_BINARY_DIR}/stone.js) include(FindPython3 OPTIONAL RESULT_VARIABLE HAS_CMAKE_PYTHON3) @@ -153,6 +154,9 @@ StoneWebViewer.cpp ) +# Boost::Math begs for -std=c++14 since Boost 1.82.0 +set_property(TARGET StoneWebViewer PROPERTY CXX_STANDARD 14) + DefineSourceBasenameForTarget(StoneWebViewer) set_target_properties(StoneWebViewer diff -r fdb012c86a75 -r a6d5373e471c Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt --- a/Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneModule/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -47,7 +47,7 @@ endif() set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ENVIRONMENT=web") -set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") +set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456") # 256MB + resize @@ -124,6 +124,9 @@ LINK_FLAGS "${WASM_LINKER_FLAGS}" ) +# Boost::Math begs for -std=c++14 since Boost 1.82.0 +set_property(TARGET StoneWebViewer PROPERTY CXX_STANDARD 14) + # Make sure to have the wrapper generated add_dependencies(StoneWebViewer StoneWrapper) diff -r fdb012c86a75 -r a6d5373e471c CITATION.cff --- a/CITATION.cff Wed Jul 12 21:21:11 2023 +0200 +++ b/CITATION.cff Wed Oct 11 17:10:45 2023 +0200 @@ -12,8 +12,8 @@ orcid: 'https://orcid.org/0000-0001-6685-7398' identifiers: - type: url - value: 'http://hdl.handle.net/2078.1/257268' - description: Rendering Medical Images using WebAssembly + value: 'http://hdl.handle.net/2078.1/277125' + description: On the Use of WebAssembly for Rendering and Segmenting Medical Images repository-code: 'https://hg.orthanc-server.com/orthanc-stone/' url: 'https://www.orthanc-server.com/' license: AGPL-3.0-or-later diff -r fdb012c86a75 -r a6d5373e471c OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake --- a/OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Wed Jul 12 21:21:11 2023 +0200 +++ b/OrthancStone/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake Wed Oct 11 17:10:45 2023 +0200 @@ -181,6 +181,9 @@ elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "b2e08d83e21d") # WSI 1.1 (framework pre-1.10.0), to remove "-std=c++11" set(ORTHANC_FRAMEWORK_MD5 "2eaa073cbb4b44ffba199ad93393b2b1") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "daf4807631c5") + # DICOMweb 1.15 (framework pre-1.12.2) + set(ORTHANC_FRAMEWORK_MD5 "c644aff2817306b3207c98c92e43f35f") endif() endif() endif() diff -r fdb012c86a75 -r a6d5373e471c OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt --- a/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt Wed Jul 12 21:21:11 2023 +0200 +++ b/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt Wed Oct 11 17:10:45 2023 +0200 @@ -40,7 +40,7 @@ endif() set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ENVIRONMENT=web") -set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") +set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456") # 256MB + resize set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1") @@ -58,11 +58,12 @@ include(${CMAKE_SOURCE_DIR}/../CMake/OrthancStoneWebAssemblyParameters.cmake) -SET(ENABLE_DCMTK ON) # Necessary for the tests of the Orthanc framework -SET(ENABLE_PUGIXML ON) # Necessary for the tests of the Orthanc framework +SET(ENABLE_DCMTK ON) # Necessary for the tests of the Orthanc framework SET(ENABLE_GOOGLE_TEST OFF) SET(ENABLE_LOCALE ON) # Necessary for text rendering -SET(ENABLE_LUA ON) # Necessary for the tests of the Orthanc framework +SET(ENABLE_LUA ON) # Necessary for the tests of the Orthanc framework +SET(ENABLE_MODULE_JOBS OFF) +SET(ENABLE_PUGIXML ON) # Necessary for the tests of the Orthanc framework SET(ORTHANC_SANDBOXED ON) # this will set up the build system for Stone of Orthanc and will @@ -121,6 +122,9 @@ ${ORTHANC_STONE_SOURCES} ) +# Boost::Math begs for -std=c++14 since Boost 1.82.0 +set_property(TARGET UnitTests PROPERTY CXX_STANDARD 14) + DefineSourceBasenameForTarget(UnitTests) diff -r fdb012c86a75 -r a6d5373e471c README --- a/README Wed Jul 12 21:21:11 2023 +0200 +++ b/README Wed Oct 11 17:10:45 2023 +0200 @@ -111,6 +111,14 @@ take place (for instance, multi-threading). +Contributing +------------ + +Instructions for contributing to the Orthanc project are included in +the Orthanc Book: +https://book.orthanc-server.com/developers/repositories.html + + Licensing --------- @@ -127,28 +135,28 @@ Stone of Orthanc using the two following BibTeX entries: @Article{Jodogne2018, - author="Jodogne, S{\'e}bastien", - title="The {O}rthanc Ecosystem for Medical Imaging", - journal="Journal of Digital Imaging", - year="2018", - month="Jun", - day="01", - volume="31", - number="3", - pages="341--352", - issn="1618-727X", - doi="10.1007/s10278-018-0082-y", - url="https://doi.org/10.1007/s10278-018-0082-y" + title = {The Orthanc Ecosystem for Medical Imaging}, + author = {Jodogne, S{\'e}bastien}, + journal = {Journal of Digital Imaging}, + volume = {31}, + number = {3}, + pages = {341-352}, + issn = {1618-727X}, + doi = {10.1007/s10278-018-0082-y}, + publisher = {Springer Science and Business Media LLC}, + year = {2018}, + url = {https://doi.org/10.1007/s10278-018-0082-y} } -@inproceedings{Jodogne2022, - author="Jodogne, S{\'e}bastien", - title="Rendering Medical Images using {WebAssembly}", - booktitle="Proc. of the 15th International Joint Conference on Biomedical Engineering Systems and Technologies", - year="2022", - month="Feb", - volume="2", - pages="43--51", - doi="10.5220/0000156300003123", - url="http://hdl.handle.net/2078.1/257268" +@Article{Jodogne2023, + title = {On the Use of WebAssembly for Rendering and Segmenting Medical Images}, + author = {Jodogne, S{\'e}bastien}, + journal = {Biomedical Engineering Systems and Technologies}, + volume = {1814}, + number = {1}, + pages = {393-414}, + issn = {1865-0937}, + doi = {10.1007/978-3-031-38854-5_20}, + year = {2023}, + url = {http://hdl.handle.net/2078.1/277125} } diff -r fdb012c86a75 -r a6d5373e471c RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp --- a/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Wed Jul 12 21:21:11 2023 +0200 +++ b/RenderingPlugin/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Wed Oct 11 17:10:45 2023 +0200 @@ -1670,15 +1670,16 @@ return true; } +#ifdef _MSC_VER +#define ORTHANC_SCANF sscanf_s +#else +#define ORTHANC_SCANF sscanf +#endif + // Parse the version - int aa, bb, cc; - if ( -#ifdef _MSC_VER - sscanf_s -#else - sscanf -#endif - (version, "%4d.%4d.%4d", &aa, &bb, &cc) != 3 || + int aa, bb, cc = 0; + if ((ORTHANC_SCANF(version, "%4d.%4d.%4d", &aa, &bb, &cc) != 3 && + ORTHANC_SCANF(version, "%4d.%4d", &aa, &bb) != 2) || aa < 0 || bb < 0 || cc < 0)