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.
- Allow to have multiple destinations for one source.
- A destination can be DICOM or DICOMWeb.
- Provides filtering options for image providers by AE Title and/or hostname to ensure source authenticity.
- Provides filtering options for SOP Class UID to send only specific SOP Class UIDs.
- Use expressions to filter images from the DICOM tag values.
- Each destination can be configured with a specific de-identification profile
- Build your own de-identification profile
- Import and export the de-identification profiles to share them with other users.
Prerequisites:
- JDK 21
- Maven 3
Execute the maven command mvn clean install -P production in the root directory of the project.
To configure and run Karnak with docker, see karnak-docker.
- Launch the components needed by Karnak (see below "Configure Postgres database with docker")
- Enable Spring and Spring Boot for the project
- Create a Spring Boot launcher from main of StartApplication.java
- Working Directory must be the mvc directory
- In VM Options:
- Add
-Djava.library.path="/tmp/dicom-opencv". Note: the tmp folder must be adapted according to your system anddicom-opencvis mandatory as the last folder. - Optional: Add
-Dvaadin.productionMode=trueto enable production mode
- Add
- In Environment variables, add the following values. The following values work with our default
configuration define with docker used for the development (see: "Configure locally Postgres database with docker") :
- Mandatory:
ENVIRONMENT=DEV
- Optional:
DB_PASSWORD=5!KAnN@%98%dDB_PORT=5433DB_USER=karnakDB_NAME=karnakDB_HOST=localhostDB_ENCRYPTION_KEY=fsGuSZRIEr$HwlTDPglZg*Vl7WtJCZz6RLvqoMKWSA!KARNAK_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=undefined
- Mandatory:
- Go in the
dockerfolder located in the root project folder. - To configure third-party components used by karnak, please refer to these links:
- Adapt the values if necessary (copy
.env.exampleinto.envand modify it) - Execute command:
- start:
docker compose up -d - show the logs:
docker compose logs -f - stop:
docker compose down
- start:
Minimum docker version: 20.10
Go on the root folder and launch the following command:
- Full independent build:
docker build -t local/karnak:latest -f Dockerfile . - Build from compile package:
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:
- backend: spring data (entities, repositories, converters, validators), enums, spring configurations, spring security, cache, spring services, models...
- frontend : Vaadin components: logic services, graphic components, views
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 providerOIDC_CLIENT_SECRET: client secret of the identity providerOIDC_ISSUER_URI: issuer URI of the identity provider