# HG changeset patch # User Sebastien Jodogne # Date 1755788304 -7200 # Node ID ff6e57d0d4746b761ca73b484bcdee57b77c8c82 # Parent ae9124e7edeeedc23818ee7a1993bb123a3557d4 updated instructions for samples diff -r ae9124e7edee -r ff6e57d0d474 Samples/Basic/NOTES.txt --- a/Samples/Basic/NOTES.txt Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/Basic/NOTES.txt Thu Aug 21 16:58:24 2025 +0200 @@ -30,7 +30,7 @@ (4) Start Orthanc: On Ubuntu 20.04 or 22.04 (replace "mainline" with the version of the -Java plugin for Orthanc): +Java plugin for Orthanc, cf. "../global.properties"): # LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/ \ ORTHANC_JAVA_VERSION=mainline \ diff -r ae9124e7edee -r ff6e57d0d474 Samples/Basic/configuration.json --- a/Samples/Basic/configuration.json Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/Basic/configuration.json Thu Aug 21 16:58:24 2025 +0200 @@ -4,7 +4,9 @@ **/ { - "Plugins" : [ "../../Plugin/Build" ], + "Plugins" : [ + "../../Plugin/Build" + ], "Java" : { "Enabled" : true, "Classpath" : "target/OrthancBasic-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar:../../JavaSDK/OrthancJavaSDK.jar", diff -r ae9124e7edee -r ff6e57d0d474 Samples/Dcm4Che/NOTES.txt --- a/Samples/Dcm4Che/NOTES.txt Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/Dcm4Che/NOTES.txt Thu Aug 21 16:58:24 2025 +0200 @@ -8,26 +8,35 @@ # 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/Dcm4Che # 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): +Java plugin for Orthanc, cf. "../global.properties"): # LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/ \ ORTHANC_JAVA_VERSION=mainline \ Orthanc ./configuration.json -(4) Send an arbitrary DICOM file to Java: +(5) Send an arbitrary DICOM file to Java: # curl http://localhost:8042/dcm4che-parse --data-binary @sample.dcm diff -r ae9124e7edee -r ff6e57d0d474 Samples/Dcm4Che/configuration.json --- a/Samples/Dcm4Che/configuration.json Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/Dcm4Che/configuration.json Thu Aug 21 16:58:24 2025 +0200 @@ -7,7 +7,7 @@ "Plugins" : [ "../../Plugin/Build" ], "Java" : { "Enabled" : true, - "Classpath" : "target/OrthancDcm4Che-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar", + "Classpath" : "target/OrthancDcm4Che-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar:../../JavaSDK/OrthancJavaSDK.jar", "InitializationClass" : "Main" } } diff -r ae9124e7edee -r ff6e57d0d474 Samples/FHIR/NOTES.txt --- a/Samples/FHIR/NOTES.txt Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/FHIR/NOTES.txt Thu Aug 21 16:58:24 2025 +0200 @@ -3,35 +3,46 @@ Note that contrarily to the "Basic" and "Dcm4Che" samples that can run using Java 1.8, this Java plugin requires Java 11. + (1) Make sure to build the C++ plugin: # 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/FHIR # 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): +Java plugin for Orthanc, cf. "../global.properties"): # LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server/ \ ORTHANC_JAVA_VERSION=mainline \ Orthanc ./configuration.json IMPORTANT: The DICOMweb plugin must be installed in the current -directory. +directory to support the "ImagingStudy" FHIR resource that makes use +of DICOMweb. -(4) Access the FHIR server. For instance, using the FHIRPACK +(5) Access the FHIR server. For instance, using the FHIRPACK command-line client (https://gitlab.com/fhirpack/main): On Ubuntu 20.04: diff -r ae9124e7edee -r ff6e57d0d474 Samples/FHIR/configuration.json --- a/Samples/FHIR/configuration.json Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/FHIR/configuration.json Thu Aug 21 16:58:24 2025 +0200 @@ -10,7 +10,7 @@ ], "Java" : { "Enabled" : true, - "Classpath" : "target/OrthancFHIR-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar", + "Classpath" : "target/OrthancFHIR-${ORTHANC_JAVA_VERSION}-jar-with-dependencies.jar:../../JavaSDK/OrthancJavaSDK.jar", "InitializationClass" : "Main" } } diff -r ae9124e7edee -r ff6e57d0d474 Samples/MammographyDeepLearning/NOTES.txt --- a/Samples/MammographyDeepLearning/NOTES.txt Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/MammographyDeepLearning/NOTES.txt Thu Aug 21 16:58:24 2025 +0200 @@ -8,11 +8,20 @@ # 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/MammographyDeepLearning # mvn compile package @@ -23,17 +32,17 @@ (i.e., "win-x86_64", "osx-x86_64", or "osx-aarch64"). -(3) Start Orthanc: +(4) Start Orthanc: On Ubuntu 20.04 or 22.04 (replace "mainline" with the version of the -Java plugin for Orthanc): +Java plugin for Orthanc, cf. "../global.properties"): # LD_LIBRARY_PATH=/usr/lib/jvm/java-11-openjdk-amd64/lib/server/ \ ORTHANC_JAVA_VERSION=mainline \ Orthanc ./configuration.json IMPORTANT: The DICOMweb plugin must be installed in the current -directory. +directory to run the Stone Web viewer. -(4) Open the Orthanc Explorer interface at: http://localhost:8042/ +(5) Open the Orthanc Explorer interface at: http://localhost:8042/ diff -r ae9124e7edee -r ff6e57d0d474 Samples/MammographyDeepLearning/configuration.json --- a/Samples/MammographyDeepLearning/configuration.json Thu Aug 21 16:39:23 2025 +0200 +++ b/Samples/MammographyDeepLearning/configuration.json Thu Aug 21 16:58:24 2025 +0200 @@ -10,7 +10,7 @@ ], "Java" : { "Enabled" : true, - "Classpath" : "target/OrthancMammographyDeepLearning-${ORTHANC_JAVA_VERSION}.jar", + "Classpath" : "target/OrthancMammographyDeepLearning-${ORTHANC_JAVA_VERSION}.jar:../../JavaSDK/OrthancJavaSDK.jar", "InitializationClass" : "Main" } }