
dcmnorm
Fast, open-source DICOM toolkit in Rust: parse, render, transcode, reformat, and network.
Ships as a CLI, a Rust library, and Node.js/Python/Java bindings.

🔗 Live demo: try the Node bindings in your browser — upload a .dcm file (or pick a bundled
sample) and see its JSON metadata, a JPEG of every frame, and per-step timings.
Install
| |
|---|
CLIs (dcmnorm, dcmtalk) | uv tool install dcmnorm or pipx install dcmnorm; curl -sSL pohcee.com/dcmnorm | sh (Linux, macOS); release archives and .deb; cargo install dcmnorm-cli dcmtalk (builds from source) |
| Python | pip install dcmnorm (CPython 3.9+ for import dcmnorm; the wheel also carries the CLIs) |
| Node.js | npm install dcmnorm (Node 18+) |
| Java | com.pohcee:dcmnorm plus com.pohcee:dcmnorm-natives for your platform (Java 11+), below |
| Rust | cargo add dcmnorm (crates.io) |
Java, Maven (linux-x86_64 shown; also linux-aarch_64, osx-aarch_64, osx-x86_64,
windows-x86_64, or ${os.detected.classifier} with the os-maven-plugin):
<dependency>
<groupId>com.pohcee</groupId>
<artifactId>dcmnorm</artifactId>
<version>${dcmnorm.version}</version>
</dependency>
<dependency>
<groupId>com.pohcee</groupId>
<artifactId>dcmnorm-natives</artifactId>
<version>${dcmnorm.version}</version>
<classifier>linux-x86_64</classifier>
<scope>runtime</scope>
</dependency>
Gradle (Kotlin DSL):
dependencies {
implementation("com.pohcee:dcmnorm:$dcmnormVersion")
runtimeOnly("com.pohcee:dcmnorm-natives:$dcmnormVersion:linux-x86_64")
}
Rust (Cargo.toml):
[dependencies]
dcmnorm = { git = "https://github.com/pohcee/dcmnorm", tag = "v0.15.0" }
More options (the agent plugin, Docker, building from source): docs/install.md.
Quick start
CLI:
dcmnorm scan.dcm # DICOM → JSON
dcmnorm scan.dcm frame.png # render a frame
dcmnorm scan.dcm out.dcm --transfer-syntax 1.2.840.10008.1.2.1 # transcode to Explicit VR LE
dcmnorm cine.dcm cine.mp4 # multi-frame → MP4
dcmnorm --mpr coronal series/*.dcm coronal.png # multiplanar reformat
dcmnorm --register current/ prior/ prior-to-current.dcm # rigid registration → DICOM REG
dcmtalk echoscu somepacs.example.com:11112 # verify a PACS connection
Python:
import dcmnorm
from dcmnorm import Tag, TransferSyntax
ds = dcmnorm.read("scan.dcm", until_pixel_data=True) # metadata only, PixelData not read
print(ds.get_string(Tag.StudyInstanceUID), ds.number_of_frames)
frame = dcmnorm.render_pixels("scan.dcm", 0) # 8-bit pixels: frame.data, frame.shape
dcmnorm.transcode_to("scan.dcm", TransferSyntax.ExplicitVRLittleEndian, "out.dcm")
Node.js:
const { read, renderPixels, transcodeTo, Tag, TransferSyntax } = require("dcmnorm");
const ds = await read("scan.dcm", { untilPixelData: true });
console.log(ds.getString(Tag.StudyInstanceUID), ds.numberOfFrames);
const { width, height, channels, pixels } = await renderPixels("scan.dcm", 0);
await transcodeTo("scan.dcm", TransferSyntax.ExplicitVRLittleEndian, "out.dcm");
Java: