Orthanc plugin showcasing Rust integration with Orthanc.
- S3 storage (CRUD)
- Change notification
This repository showcases how you can use the Orthanc C/C++ SDK to build a safe plugin.
The sample makes use of
- Tokio for the async runtime
- Rusoto for the S3 integration
- Bindgen for code generation from C/C++ headers
A local ".env" file is used to configure the plugin. In the absense of the configuration file, environment variables can be used to specify s3 parameters.
RUST_LOG="debug"
S3_ENDPOINT="http://localhost:9000"
S3_ACCESS_KEY="minio-root-user"
S3_SECRET_KEY="minio-root-password"
S3_BUCKET="orthanc"
S3_REGION="eu-central-1"
Using the provided example Makefile you can download and compile orthanc in order to link the Rust plugin.
make orthanc release
You can use Docker compose to start a local minio to simulate an endpoint that implements the S3 protocol. Start the following command in a dedicated terminal session.
docker compose up
make run-orthanc
The plugin should load. Now simply upload some DICOMs and inspect the logs
You can inspect the S3 contents using the Minio dashboard
A sample docker file includes how to run the plugin inside a matching version or Orthanc
make docker-image run-orthanc-docker
or
docker run --rm -it --net=host -v $PWD/.env:/.env:ro orthanc-rust-samples:<COMMIT-ID>
Created a license because AGPL scares me. ¯_(ツ)_/¯
These plugins for Orthanc are licensed under the AGPL license.