Mercurial > hg > orthanc-java
changeset 72:ff6e57d0d474
updated instructions for samples
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 21 Aug 2025 16:58:24 +0200 |
parents | ae9124e7edee |
children | 037a2b0d06ca 0acad1d4eb98 |
files | Samples/Basic/NOTES.txt Samples/Basic/configuration.json Samples/Dcm4Che/NOTES.txt Samples/Dcm4Che/configuration.json Samples/FHIR/NOTES.txt Samples/FHIR/configuration.json Samples/MammographyDeepLearning/NOTES.txt Samples/MammographyDeepLearning/configuration.json |
diffstat | 8 files changed, 53 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- 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 \
--- 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",
--- 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
--- 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" } }
--- 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:
--- 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" } }
--- 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/
--- 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" } }