Sign inSign up

osirixfoundation/karnak

By osirixfoundation

•Updated 3 months ago

DICOM gateway for publishing images in Kheops and for de-identification

Image
0

7.7K

osirixfoundation/karnak repository overview

License Maven build

Sonar Sonar Sonar Sonar Sonar

Karnak is a DICOM gateway for data de-identification and DICOM attribute normalization.

Karnak manages a continuous DICOM flow with a DICOM listener as input and a DICOM and/or DICOMWeb as output.

Karnak documentation⁠ is available online.

⁠Application Features

⁠Gateway

  • Allows to build mapping between a source and one or more destinations
  • Each destination can be DICOM or DICOMWeb
  • Filter the images providers by AETitle and/or hostname (ot ensure the authenticity of the source)

⁠de-identification

  • Each destination can be configured with a specific de-identification profile
  • Configuration for sending only specific SopClassUIDs
  • Build your own de-identification profile⁠ or add modifications to the basic DICOM profile
  • Import and export the de-identification profiles

⁠Build Karnak

Prerequisites:

Use the following commands to build the two dependencies (dcm4che20 and weasis-dicom-tools):

⁠dcm4che20
  1. git clone https://github.com/nroduit/dcm4che20.git
  2. git checkout image
  3. mvn source:jar install
⁠weasis-dicom-tools
  1. git clone https://github.com/nroduit/weasis-dicom-tools.git
  2. git checkout dcm4che6
  3. mvn clean install
⁠Karnak

Execute the maven command mvn clean install -P production in the root directory of the project.

⁠Run Karnak

To configure and run Karnak with docker-compose, see karnak-docker⁠.

⁠Debug Karnak

⁠Debug in IntelliJ

  • Launch the components needed by Karnak (see below "Configure locally Mainzelliste and Postgres database with docker-compose")

  • 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"
    • 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 Mainzelliste and Postgres database with docker-compose") :
      • Mandatory:
        • ENVIRONMENT=DEV
      • Optional:
        • DB_PASSWORD=5!KAnN@%98%d
        • DB_PORT=5433
        • DB_USER=karnak
        • DB_NAME=karnak
        • DB_HOST=localhost
        • MAINZELLISTE_HOSTNAME=localhost
        • MAINZELLISTE_HTTP_PORT=8083
        • MAINZELLISTE_ID_TYPES=pid
        • MAINZELLISTE_API_KEY=changeThisApiKey
        • KARNAK_ADMIN=admin
        • KARNAK_PASSWORD=admin
        • KARNAK_LOGS_MAX_FILE_SIZE=100MB
        • KARNAK_LOGS_MIN_INDEX=1
        • KARNAK_LOGS_MAX_INDEX=10
        • KARNAK_CLINICAL_LOGS_MAX_FILE_SIZE=100MB
        • KARNAK_CLINICAL_LOGS_MIN_INDEX=1
        • KARNAK_CLINICAL_LOGS_MAX_INDEX=10

    Note: the tmp folder must be adapted according to your system and the dicom-opencv must the last folder.

⁠Configure locally Mainzelliste and Postgres database with docker-compose

Minimum docker-compose version: 1.22

  • Go in the docker folder 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.example into .env and modify it)
  • Execute command:
    • start: docker-compose up -d
    • show the logs: docker-compose logs -f
    • stop: docker-compose down

⁠Docker

Minimum docker version: 19.03

⁠Build with Dockerfile

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 production
    • docker build -t local/karnak:latest -f mvc/src/main/docker/Dockerfile .

⁠Run image from Docker Hub

See karnak-docker⁠

⁠Docker environment variables

See environment variables⁠

⁠Architecture

This project provides two modules:

  • karnak-data: the data model for persistence of the gateway configuration
  • karnak-mvc: the services and UI for updating the data model

⁠Workflow

Workflow

⁠Pipeline

Workflow

Tag summary

Content type

Image

Digest

sha256:62b111626…

Size

322.5 MB

Last updated

10 months ago

docker pull osirixfoundation/karnak