Overview

This document provides technical documentation for the dicom Go library, a high-performance toolkit designed for reading, writing, and manipulating DICOM (Digital Imaging and Communications in Medicine) medical image files. The library prioritizes performance, correctness, adherence to the DICOM standard, and developer ergonomics within the Go ecosystem.

Key Goals:

  • Performance: Efficiently parse and process DICOM files, including large multi-frame images.
  • Correctness: Adhere closely to the DICOM standard for reliable data interpretation.
  • Feature Richness: Support various DICOM features, including different transfer syntaxes, native and encapsulated pixel data, sequences, and character sets.
  • Usability: Offer a clear, idiomatic Go API that is easy to integrate into other applications.

Core Features:

  • Parsing of DICOM datasets from files or io.Reader interfaces.
  • Writing Dataset objects back to DICOM files.
  • Support for various transfer syntaxes (Implicit/Explicit VR, Little/Big Endian).
  • Handling of multi-frame image data (Native and Encapsulated).
  • Streaming API for processing image frames as they are parsed.
  • Element-by-element parsing capabilities.
  • Structured representation of DICOM elements (Dataset, Element, Value).
  • Helper packages for specific DICOM data types (Time, Person Name, UID).
  • Command-line utility (dicomutil) for basic DICOM inspection and image extraction.