Karnak is a DICOM gateway designed for data de-identification and DICOM attribute normalization. It manages continuous DICOM data streams, functioning as a DICOM listener for input and supporting both DICOM and DICOMWeb formats for output.
For detailed usage instructions, refer to the Karnak User Guide.
Prerequisites: - JDK 21 - Maven 3
Execute the maven command mvn clean install -P production in the root directory of the project.
Note: When the tests are not skipped, it requires to run locally the cache, see below Run locally the database and the cache with docker.
To configure and run Karnak with docker, see karnak-docker.
-Djava.library.path="/tmp/dicom-opencv". Note: the tmp folder must be adapted according to your system and dicom-opencv is mandatory as the last folder.-Dvaadin.productionMode=true to enable production modeENVIRONMENT=DEVDB_PASSWORD=5!KAnN@%98%dDB_PORT=5433DB_USER=karnakDB_NAME=karnakDB_HOST=localhostKARNAK_ADMIN=adminKARNAK_PASSWORD=adminKARNAK_LOGS_MAX_FILE_SIZE=100MBKARNAK_LOGS_MIN_INDEX=1KARNAK_LOGS_MAX_INDEX=10KARNAK_CLINICAL_LOGS_MAX_FILE_SIZE=100MBKARNAK_CLINICAL_LOGS_MIN_INDEX=1KARNAK_CLINICAL_LOGS_MAX_INDEX=10IDP=undefinedOIDC_CLIENT_ID=undefinedOIDC_CLIENT_SECRET=undefinedOIDC_ISSUER_URI=undefineddocker folder located in the root project folder..env.example into .env and modify it)docker compose up -ddocker compose logs -fdocker compose downMinimum docker version: 20.10
Go on the root folder and launch the following command:
docker build -t local/karnak:latest -f Dockerfile .mvn clean install -P productiondocker build -t local/karnak:latest -f src/main/docker/Dockerfile .See karnak-docker
See all the environment variables
This project is divided in two parts:
An OpenID Connect identity provider can be configured by using the environment variables:
- IDP: when this environment variable has the value 'oidc', the following environment
variables will configure the OpenID Connect identity provider. Any other value will load the in
memory user configuration.
- OIDC_CLIENT_ID: client id of the identity provider
- OIDC_CLIENT_SECRET: client secret of the identity provider
- OIDC_ISSUER_URI: issuer URI of the identity provider
$ claude mcp add karnak \
-- python -m otcore.mcp_server <graph>