DICOM in pure Go, from the first byte to the network.
One static binary. Section line A–A: the file above, the wire below.
Install
The script picks the build, checks it against the release’s SHA256SUMS, and puts it on your PATH:
curl -fsSL https://raw.githubusercontent.com/amrshadid/go-dicom/main/install.sh | sh
- Apple Silicon (M1 and later)
go-dicom-macos-arm64 - Intel
go-dicom-macos-amd64
Downloaded through a browser instead? Clear the quarantine flag: xattr -d com.apple.quarantine go-dicom
Every build is on the latest release with its SHA256SUMS.
Contents
- Getting startedinstall, read a file, change it
- Guidesfiles, pixels, network, web
- Command lineevery command and option
- Packagesevery public package
- Conformancethe DICOM statement
- Contributingbugs, features, security
The Go counterpart of pydicom and pynetdicom, with a command line for the jobs people use dcmtk for.
§ 1
Files
Read and write every transfer syntax, with each element’s byte offsets. Bounded reads for untrusted input, DICOM JSON and XML.
§ 2
Pixel data
RLE, JPEG, JPEG-LS, JPEG 2000, HTJ2K and JPEG XL, decoded and encoded in pure Go. Transcoding never re-codes lossy pixels.
§ 3
Networking
SCU and SCP for C-ECHO, C-STORE, C-FIND, C-MOVE, C-GET and the N-services, over TLS, every PDU loggable.
§ 4
DICOMweb
A client and a server for QIDO-RS, WADO-RS and STOW-RS: metadata, frames, rendered images and bulk data.
§ 5
De-identification
PS3.15 Annex E profiles and options, and text burned into the pixels blacked out, compressed images included.
§ 6
Validation
An instance checked against what its SOP class requires: modules, attribute types and conditions, enumerated values.
How it fits together
Everything meets in the data set. Files are read into it and written from it, pixel data is decoded and encoded through it, and the DIMSE and DICOMweb services send and receive it.
Fig. 1. The packages around the data set. Red: where everything meets.
Every package →Use case · medical imaging archive
NoPACs
An imaging archive in one Go module: it receives DICOM from scanners and PACS, de-identifies it by profile, archives each study to a directory or S3 with checksums, and serves it back over DIMSE and DICOMweb, as a core that research and clinical platforms are built on.
networkC-STORE, C-FIND, C-MOVE, C-GET, worklist, MPPSdicomwebQIDO-RS, WADO-RS, STOW-RSanonymizede-identification profilesdataset · filereaderevery header it reads and indexes
Notice
NoPACs is in early development with no release yet, and is not a cleared medical device. Send it only synthetic or public test data until you have checked a profile.
Built something on go-dicom?
Share it in Discussions and it can be listed here.
Open to contributors
Bug reports, feature requests, fixes, tests and documentation are all welcome. Each kind of report has its place:
A bug
Open a bug report
A feature
Request a feature
A question
Start a discussion
A vulnerability
Report it privately
Never include real patient data in a report. Code changes go in a pull request against develop; how to contribute →