dcmview
dcmview is a fast, temporary DICOM viewer for research and development work.
Point it at one or more DICOM files from the command line or Python, and it
starts a local browser viewer for images, tags, cine playback, and rectangular
ROI annotations. Stop the process and the server is gone.
The main problem it solves is remote-server inspection. Medical imaging research
often happens where the data already live: an SSH session, a shared compute
server, or a locked-down institutional network. Viewing those images usually
means choosing between slow notebook plots, setting up a web viewer on the
server, opening firewall ports, or uploading data and annotations into a
third-party cloud tool. dcmview keeps the workflow local to the machine with
the files: start the viewer, forward the loopback port over SSH when needed, and
inspect the study in seconds.
dcmview is intended for developer and research inspection on secure networks,
not clinical diagnosis. Avoid public-facing server binds; use the default
loopback binding and SSH forwarding for remote workflows.
Why use it?
- Inspect DICOM files where they already are, including remote servers.
- Avoid notebook-based frame rendering for multi-frame studies.
- Keep data off third-party viewers when all you need is quick review.
- Open a browser UI with familiar viewer tools: pan, zoom, scroll, window/level, flips, rotation, tags, and cine playback.
- Load, edit, and export rectangular ROI annotations without modifying source DICOM files.
- Use the same tool from a shell command, Python script, notebook, or VS Code.
- Run as an ephemeral server with no database, config file, or persistent state.
Install
The current public install channels are the Python package, GitHub Releases, and the VS Code Marketplace extension:
| Platform | Recommended channel | Notes |
|---|---|---|
| Linux x64 | dcmview-py or GitHub Releases |
PyPI wheels bundle the dcmview binary. |
| macOS x64 | dcmview-py or GitHub Releases |
PyPI wheels bundle the dcmview binary. |
| macOS arm64 | dcmview-py or GitHub Releases |
PyPI wheels bundle the dcmview binary. |
| Windows x64 | dcmview-py, GitHub Releases, or VS Code Marketplace |
PyPI wheels bundle dcmview.exe. |
| VS Code | VS Code Marketplace | The extension bundles platform-specific binaries for supported hosts. |
| Other platforms | Source build | Build the Rust binary locally and point wrappers at it when needed. |
Install the Python package:
python -m pip install --user dcmview-py
dcmview --help
The package installs both dcmview and dcmview-py; dcmview is the primary
command. If you are using an unsupported platform or a local debug binary, set
DCMVIEW_BINARY to an absolute path to a compatible dcmview executable.
Tagged releases always include a generated Homebrew formula. Publishing that formula to a tap is conditional on the maintainers configuring a separate tap repository; this repository does not currently advertise a public tap command. Use PyPI, the VS Code extension, GitHub Releases, or a source build unless a release announcement names a working tap.
Source builds are available for contributors and unsupported platforms:
cargo install --path .
Build prerequisites for source installs:
- Rust 1.88+
- Node.js 20.19+ and npm at build time
sshonPATHonly when using SSH forwarding helpers
If install or binary discovery fails, see the troubleshooting guide. For all CLI, Python, VS Code, and environment settings, see the configuration reference. For the full documentation map, see the documentation index.
Quick Start
Open one file:
dcmview ./scan.dcm
Scan a study directory recursively:
dcmview ./study_dir
Run without opening a browser, useful on a remote server:
dcmview --no-browser ./study_dir
When ready, dcmview prints a URL:
dcmview: server running at http://127.0.0.1:<port>
Press Ctrl+C to stop the server.
If startup reports skipped files, no valid DICOM files, a port conflict, or a browser launch failure, see the troubleshooting guide.
Remote Server Workflow
The safest default is to keep dcmview bound to loopback on the remote machine
and access it through SSH port forwarding. dcmview is intended for research
and development use on secure networks; do not expose the server directly to a
public network.
On the remote server:
dcmview --no-browser --port 8888 /path/to/dicom_or_study_dir
On your local machine:
ssh -L 8888:localhost:8888 user@remote-server
Then open:
http://localhost:8888
You can also let dcmview use an auto-assigned port by omitting --port; copy
the printed port into your SSH command. The optional --tunnel flags are
available for environments where the dcmview process can start the SSH helper
itself.
The HTTP server is unauthenticated. It binds to 127.0.0.1 by default. If you
bind to 0.0.0.0 or another public interface, use your own network access
controls. Anyone who can reach the server may be able to access image pixels,
DICOM tags, file paths, patient identifiers, study identifiers, and in-memory
annotations.
Python Usage
dcmview-py is a small subprocess wrapper around the Rust binary. It is useful
when a script or notebook has already selected the cases to inspect. For the
full parameter reference, lifecycle details, VS Code bridge behavior, and
notebook-oriented examples, see the Python reference.
from dcmview_py import view
# Blocking call; returns when dcmview exits.
view(["./scan.dcm"], browser=False, timeout=300)
# Non-blocking call.
handle = view(["./study_dir"], browser=False, block=False)
print(handle.url)
handle.stop()
Context manager:
from dcmview_py import view
with view(["./study_dir"], browser=False, block=False) as handle:
print(handle.url)
The module CLI mirrors the Rust options:
python -m dcmview_py --no-browser --timeout 120 ./study_dir
VS Code
The VS Code extension opens DICOM files or folders in a webview backed by the
same local dcmview server. It can also intercept dcmview, dcmview-py, and
python -m dcmview_py launches from new integrated terminals so terminal-based
workflows appear inside VS Code.
See the VS Code extension README for supported platforms, settings, terminal interception behavior, and local testing notes.
Viewer Features
The embedded browser viewer includes:
- File tabs labeled from
PatientID,Modality, andStudyDatewhen present. - Canvas-based image viewing with pan, zoom, scroll, window/level, reset, horizontal/vertical flips, and 90-degree rotation.
- Window presets including DICOM defaults, full dynamic range, and common CT presets.
- Multi-frame controls with previous/next, cine playback, FPS selection, loop, and sweep.
- Lazy DICOM tag browsing with filtering, sequence expansion, binary length display, resizable columns, and click-to-copy values.
- Rectangular ROI annotation display and editing, including draw, select, move, resize, delete, frame scoping, and CSV export.
Common shortcuts:
| Action | Shortcut |
|---|---|
| Previous/next file in the active Explorer ordering | Up/Down arrows |
| Previous/next frame | Left/Right arrows or [ / ] |
| Play/pause cine | Space |
| Window/level tool | W |
| Pan tool | P |
| Zoom tool | Z |
| Scroll tool | S |
| ROI tool | R |
| Reset viewport | Double-click |
Right-drag always zooms, middle-drag always pans, the wheel scrolls frames, and Ctrl/Cmd+wheel zooms.
Annotations
--annotations loads an EMBED-style rectangular ROI CSV into memory:
dcmview --annotations ./embed_annotations.csv ./study_dir
dcmview never modifies the input CSV or DICOM files. Viewer edits stay in
memory and can be downloaded with Export ROIs. For the required columns,
coordinate format, frame scoping rules, validation behavior, and examples, see
the annotation reference.
CLI Reference
dcmview [OPTIONS] <PATH> [PATH ...]
python -m dcmview_py [OPTIONS] <PATH> [PATH ...]
The Python module CLI forwards the same options to the underlying dcmview
binary. Run dcmview --help or python -m dcmview_py --help for command-line
help. For Python wrapper parameters, VS Code settings, environment variables,
filter fields, hidden integration flags, and binary resolution order, see the
configuration reference and
Python reference.
HTTP API
The browser UI uses a small local HTTP API. This API is internal to the viewer
and is not a stable public integration surface; use it only for dcmview
debugging, smoke tests, and local automation.
See the internal API reference for endpoint summaries, progressive scan fields, polling guidance, cache headers, transfer syntax behavior, raw-frame metadata headers, annotation endpoints, and error semantics.
Production builds do not enable cross-origin browser API access for external
debugging tools. To debug the viewer API from another browser origin, build with
cargo build --features debug-api; this enables permissive CORS and prints a
build warning. Do not enable debug-api outside dcmview debugging contexts.
Development
For local development, install frontend dependencies, run the Rust backend, and optionally start the standalone Vite frontend:
npm --prefix frontend ci
dcmview --no-browser --host 127.0.0.1 --port 8888 tests/fixtures
npm --prefix frontend run dev
The repository check driver mirrors CI profiles. For a fast development pass and the full local core suite:
python scripts/check.py quick --install
python scripts/check.py core --install
quick checks version parity, generated frontend contracts, frontend types and
behavior, the production frontend build, strict Rust formatting/lints, and
Python unit tests; it does not run the Rust test suite. core additionally
regenerates and verifies DICOM fixtures, runs the locked Rust suite, and
compiles the VS Code extension.
See the development reference for source builds, frontend proxy behavior, fixture policy, test commands, architecture notes, and cache budget guidance.
Reporting Issues
Use GitHub issues for DICOM compatibility problems, install failures, and feature requests. Do not attach DICOM files, screenshots, logs, paths, patient identifiers, or other sensitive information unless you have fully de-identified them and have approval to share them publicly.
Before filing an issue, check the troubleshooting guide for common install, startup, decode, tunnel, VS Code, and annotation CSV problems.
Report suspected security vulnerabilities privately to the maintainers before public disclosure; see SECURITY.md.
dcmview is not for clinical use, clinical diagnosis, or clinical
decision-making.
License
MIT
Metadata
Release files for dcmview-py 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dcmview_py-0.2.10-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| dcmview_py-0.2.10-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| dcmview_py-0.2.10-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| dcmview_py-0.2.10-py3-none-macosx_10_13_x86_64.whl | Python 3 | none | macOS 10.13+ x86-64 | Details |
Total release size: 22.6 MB
Release files / dcmview_py-0.2.10-py3-none-win_amd64.whl
| Download URL | dcmview_py-0.2.10-py3-none-win_amd64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
126964a47d481dff8f002df36f9b543066b13ec7a96645a6a169aea3ebe5bcef
|
|
BLAKE2b-256 checksum How to use checksums |
2c2f75197cd82124680aa692eaaa0dbd5a82233e0e8e4de699f8eb36096fa214
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / dcmview_py-0.2.10-py3-none-manylinux_2_28_x86_64.whl
| Download URL | dcmview_py-0.2.10-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
fbdb93419d0a8ae319162a3ad8f002ec57e07f5eebf50a52b3f990a29bcd3800
|
|
BLAKE2b-256 checksum How to use checksums |
b8dc06a1304e7cc10a1e2842c208839dab3c4dd0de8566d85f54c654f04cd4b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / dcmview_py-0.2.10-py3-none-macosx_11_0_arm64.whl
| Download URL | dcmview_py-0.2.10-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9ae0281b5a9c64b5cc25b15b415cff49055f2d87af3be566e1893e000146c5ce
|
|
BLAKE2b-256 checksum How to use checksums |
8d3d781537efcca246576bcafe438326294e8b2675974794b656a798f13cae6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / dcmview_py-0.2.10-py3-none-macosx_10_13_x86_64.whl
| Download URL | dcmview_py-0.2.10-py3-none-macosx_10_13_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | Python 3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
d814d9b66d3b545258ba2258c28aa87ebeceda372c058efac95f19d7c71003fc
|
|
BLAKE2b-256 checksum How to use checksums |
5740c6a921721e63ad8a3b7cf05e283105d04c0e23a19a0864c2c79ed297248a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logSecurity for dcmview-py 0.2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for dcmview_py-0.2.10-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.