An application translating incoming DICOM DIMSE messages to a DICOMWeb Client or providing a DICOMWeb Server forwarding messsages to a DIMSE Client. Use it as a Windows or a Linux systemd service.
  • Rust 91.3%
  • JavaScript 5.7%
  • CSS 1.3%
  • HTML 1.3%
  • PowerShell 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
christof.schadt 5543b7a020
All checks were successful
CI / build-and-test (push) Successful in 5m14s
Release / build-release (push) Successful in 18m6s
Merge pull request 'atna-audit' (#84) from atna-audit into main
Reviewed-on: #84
2026-11-12 08:38:18 +01:00
.forgejo/workflows chore: rename from dicom-broker to dicom-gateway 2026-07-09 20:41:43 +02:00
.vscode chore: rename from dicom-broker to dicom-gateway 2026-07-09 20:41:43 +02:00
doc feat: act as Audit Record Repository 2026-11-06 15:59:54 +01:00
hap chore: test HAPI FHIR server via docker 2026-07-13 20:05:37 +02:00
pipelines/examples feat: add configuration parameters to scripts 2026-10-08 16:02:34 +02:00
src feat: act as Audit Record Repository 2026-11-06 15:59:54 +01:00
tools/readbench chore: parallel reads 2026-09-18 08:42:57 +02:00
.gitattributes chore: add lf 2026-09-28 08:57:40 +02:00
.gitignore chore: update file name 2026-11-06 08:01:15 +01:00
build_all.sh chore: update arc42 documentation 2026-09-27 07:41:10 +02:00
Cargo.lock feat: audit repository store with hash chain 2026-10-27 17:02:33 +01:00
Cargo.toml feat: audit repository store with hash chain 2026-10-27 17:02:33 +01:00
config.toml add: scripting engine 2026-10-08 15:20:44 +02:00
install-service.ps1 feat: tray application 2026-07-31 22:36:33 +02:00
install-service.sh feat: tray application 2026-07-31 22:36:33 +02:00
INSTALL.md chore: update arc42 documentation 2026-09-27 07:41:10 +02:00
LICENSE chore: rename from dicom-broker to dicom-gateway 2026-07-09 20:41:43 +02:00
README.md chore: move architecture documentation 2026-09-29 05:20:31 +02:00
rust-toolchain.toml chore: update everything but gui 2026-07-03 13:26:25 +02:00
uninstall-services.ps1 fix: observe services 2026-08-31 15:03:46 +02:00

DICOM Gateway

A DICOM gateway written in Rust, bridging DIMSE and DICOMWeb transports, including TLS handling. Designed to run as a Windows Service or a Linux systemd service.

CI

Release Build

DICOM Gateway TUI

Use Cases

Securing a DIMSE endpoint

Having a legacy DICOM DIMSE application that needs a secure DICOM DIMSE backend?

Create a DIMSE-DIMSE gateway with a DIMSE TLS backend and communicate securely with another DIMSE TLS endpoind.

Communicating with a DICOMWeb server

Having a legacy DICOM DIMSE appliccation that needs to communicate with a DICOMWeb server?

Create a DIMSE-DICOMWeb gateway that connects your legacy application to a DICOMWeb server. Optionally, including TLS (but maybe better to use a reverse proxy).

Communicating with DICOMWeb server using json only

Having a DICOMWeb application that only supports application/dicom-multipart and not json for the exchange of the DICOM messages using WADO-RS?

Create a DICOMWeb-DICOMWeb backend that re-encodes your DICOM messages.

Features

Frontends (inbound)

Frontend Protocol TLS
DIMSE SCP C-FIND, C-GET, C-MOVE, C-STORE, C-ECHO DICOM-TLS (PS3.15)
DICOMWeb HTTP (application/dicom) QIDO-RS, WADO-RS, STOW-RS, SEND-RS HTTPS
DICOMWeb HTTP (application/dicom+json) QIDO-RS, WADO-RS, STOW-RS, SEND-RS HTTPS

Additional Frontend

Frontend Protocol TLS
FHIR R4 HTTP Patient, ImagingStudy (read + search) HTTPS (shared with DICOMWeb)

The FHIR R4 frontend is only available with the Local Archive backend. It mounts alongside the DICOMWeb HTTP server (same port, same TLS) and allows querying DICOM information via FHIR. Retrieval can then be performed via DICOM (DIMSE or DICOMweb). The ImagingStudy.endpoint parameter points to the DICOMweb endpoint.

Backends (outbound)

Backend Protocol TLS
DICOMWeb http (application/dicom) QIDO-RS, WADO-RS, STOW-RS, SEND-RS HTTPS via URL scheme
DICOMWeb http (application/dicom+json) QIDO-RS, WADO-RS, STOW-RS, SEND-RS HTTPS via URL scheme
DIMSE SCU C-FIND, C-GET, C-STORE DICOM-TLS (PS3.15)

Additional Backend

Backend Protocol TLS
Local Archive SQLite + filesystem —
FHIR Patient, ImagingStudy (search, create, update) HTTPS

The local archive allows the DICOM gateway to work as a DICOM archive which can be access via DICOM DIMSE, DICOMweb and FHIR (for querying only).

For the "Local Archive" backend, the DIMSE SCP and DICOMWeb/FHIR (http) frontends can all run simultaneously (frontend.mode = "both") and share the same TLS certificate. See "Operation mapping" below.

Operation mapping

Inbound Outbound
C-FIND QIDO-RS query / Local Archive lookup
C-GET WADO-RS retrieve / Local Archive read
C-MOVE SEND-RS or WADO-RS / Local Archive read → C-STORE SCU to move destination
C-STORE STOW-RS store / Local Archive write
C-ECHO Check /health endpoint (fallback: make HEAD request)
QIDO-RS C-FIND / Local Archive lookup
WADO-RS C-GET or C-MOVE / Local Archive read
STOW-RS C-STORE / Local Archive write
SEND-RS C-MOVE
DELETE (non-standard) Local Archive delete (archive backend only, [archive] allow_delete)

Documentation


Authentication

What the gateway does with a client credential depends on the configured backend.

Archive backend — access control. Optional JWT Bearer token authentication can be enabled via the [auth] config section. When present, it is enforced on the DICOMWeb and FHIR HTTP frontends (Authorization: Bearer) and on the DIMSE SCP frontend (PS3.7 User Identity Negotiation, type 5); unrecognized or missing tokens are rejected. Tokens are issued in the browser admin UI (Configuration → Frontend → Authentication); only their SHA-256 hash is stored.

Gateway backends (DICOMWeb, DIMSE SCU) — transparent relay. The gateway validates nothing of its own. Whatever credential a client presents is forwarded byte-for-byte to the backend target, which decides whether to trust it; clients presenting no credential are not rejected. This is unconditional — [auth] is not required and has no effect in this mode. Restrict access at transport level (mTLS) or by network controls instead.

For clients that cannot authenticate at all (e.g. an older DIMSE SCU without User Identity Negotiation) reaching a backend that requires a credential, a fallback token can be configured on the backend connection (dicomweb.auth_token / dimse_client.auth_token). It is used only when the client presented nothing; a client-presented token is always relayed instead. See Authentication.


FHIR Server / Integration

When the archive backend is active, a small FHIR server frontend can expose stored DICOM data via Patient and ImagingStudy resources. It is possible to subscribe to these resources for updates via a rest-hook.

The archive backend can also connect to a FHIR server and create/update Patient and ImagingStudy resources there, along with an optional OAuth authentication.


Configuration

The gateway is configured via a TOML file (default: config.toml). Run with --config /path/to/config.toml.

See doc/manual/03_configuration_reference.md for the full key reference, TLS options, and C-MOVE destination setup.


Building & Installation

See INSTALL.md for build instructions, systemd and Windows Service setup, and how to run interactively.

Authors

Original Author:

Christof Schadt (christof dot schadt at mailbox dot org)

Icon

Icon by Freepik - Flaticon