# HG changeset patch # User Sebastien Jodogne # Date 1755188037 -7200 # Node ID 1bc05cacb6fc1b905cf8bd4121fe48277b071609 # Parent cc91717e2354a7c19621ef381b85085f9be4e861 fix samples diff -r cc91717e2354 -r 1bc05cacb6fc .hgignore --- a/.hgignore Thu Aug 14 17:27:40 2025 +0200 +++ b/.hgignore Thu Aug 14 18:13:57 2025 +0200 @@ -5,6 +5,8 @@ *.orig *~ CodeGeneration/__pycache__/ +JavaSDK/Build/ +JavaSDK/OrthancJavaSDK.jar JavaSDK/i/ Plugin/Build/ Plugin/ThirdPartyDownloads/ diff -r cc91717e2354 -r 1bc05cacb6fc JavaSDK/CMakeLists.txt --- a/JavaSDK/CMakeLists.txt Thu Aug 14 17:27:40 2025 +0200 +++ b/JavaSDK/CMakeLists.txt Thu Aug 14 18:13:57 2025 +0200 @@ -90,3 +90,8 @@ WORKING_DIRECTORY ${JAVADOC_OUTPUT_DIR} COMMENT "Generating SDK documentation with javadoc" VERBATIM ) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/OrthancJavaSDK.jar + DESTINATION . + ) diff -r cc91717e2354 -r 1bc05cacb6fc Samples/Basic/NOTES.txt --- a/Samples/Basic/NOTES.txt Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/Basic/NOTES.txt Thu Aug 14 18:13:57 2025 +0200 @@ -8,17 +8,26 @@ # cd ../../Plugin/ # mkdir Build # cd Build -# cmake .. -DCMAKE_BUILD_TYPE=Release +# cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_ORTHANC_SDK=OFF # make -j4 -(2) Compile the Java plugin using Maven: +(2) Make sure to build the Java wrapper: + +# cd ../../JavaSDK/ +# mkdir Build +# cd Build +# cmake .. -DUSE_SYSTEM_ORTHANC_SDK=OFF -DCMAKE_INSTALL_PREFIX=.. +# make -j4 install + + +(3) Compile the Java plugin using Maven: # cd ../../Samples/Basic # mvn compile package -(3) Start Orthanc: +(4) Start Orthanc: On Ubuntu 20.04 or 22.04 (replace "mainline" with the version of the Java plugin for Orthanc): @@ -28,7 +37,7 @@ Orthanc ./configuration.json -(4) Call the REST API implemented by the Java plugin: +(5) Call the REST API implemented by the Java plugin: # curl http://localhost:8042/java Hello from Java! diff -r cc91717e2354 -r 1bc05cacb6fc Samples/Basic/configuration.json --- a/Samples/Basic/configuration.json Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/Basic/configuration.json Thu Aug 14 18:13:57 2025 +0200 @@ -7,7 +7,7 @@ "Plugins" : [ "../../Plugin/Build" ], "Java" : { "Enabled" : true, - "Classpath" : "target/OrthancBasic-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar", + "Classpath" : "target/OrthancBasic-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar:../../JavaSDK/OrthancJavaSDK.jar", "InitializationClass" : "Main" } } diff -r cc91717e2354 -r 1bc05cacb6fc Samples/Basic/pom.xml --- a/Samples/Basic/pom.xml Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/Basic/pom.xml Thu Aug 14 18:13:57 2025 +0200 @@ -40,26 +40,6 @@ - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${project.basedir}/../../JavaSDK/be/uclouvain/orthanc - - - - - - org.codehaus.mojo @@ -88,5 +68,15 @@ ${orthanc_java.version} + + + + OrthancJavaSDK + OrthancJavaSDK + system + mainline + ${project.basedir}/../../JavaSDK/OrthancJavaSDK.jar + + diff -r cc91717e2354 -r 1bc05cacb6fc Samples/Dcm4Che/pom.xml --- a/Samples/Dcm4Che/pom.xml Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/Dcm4Che/pom.xml Thu Aug 14 18:13:57 2025 +0200 @@ -40,26 +40,6 @@ - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${project.basedir}/../../JavaSDK/be/uclouvain/orthanc - - - - - - org.codehaus.mojo @@ -95,11 +75,22 @@ + + + + OrthancJavaSDK + OrthancJavaSDK + system + mainline + ${project.basedir}/../../JavaSDK/OrthancJavaSDK.jar + + org.dcm4che dcm4che-core 5.29.1 + diff -r cc91717e2354 -r 1bc05cacb6fc Samples/FHIR/pom.xml --- a/Samples/FHIR/pom.xml Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/FHIR/pom.xml Thu Aug 14 18:13:57 2025 +0200 @@ -41,26 +41,6 @@ - - - org.codehaus.mojo - build-helper-maven-plugin - - - add-source - generate-sources - - add-source - - - - ${project.basedir}/../../JavaSDK/be/uclouvain/orthanc - - - - - - org.codehaus.mojo @@ -102,6 +82,16 @@ + + + OrthancJavaSDK + OrthancJavaSDK + system + mainline + ${project.basedir}/../../JavaSDK/OrthancJavaSDK.jar + + + org.json json diff -r cc91717e2354 -r 1bc05cacb6fc Samples/MammographyDeepLearning/pom.xml --- a/Samples/MammographyDeepLearning/pom.xml Thu Aug 14 17:27:40 2025 +0200 +++ b/Samples/MammographyDeepLearning/pom.xml Thu Aug 14 18:13:57 2025 +0200 @@ -120,6 +120,17 @@ + + + + OrthancJavaSDK + OrthancJavaSDK + system + mainline + ${project.basedir}/../../JavaSDK/OrthancJavaSDK.jar + + + ai.djl api