Perspecta Viewer is a native desktop DICOM viewer written in Rust (egui/eframe), focused on fast loading, responsive interaction, and simple launch integration from external systems.
- Open local DICOM files (
.dcm) in single-image mode. - Open 2-image (
1x2) and 4-image (2x2) mammography layouts with consistent viewport ordering. - Decode DICOM
PixelDatathroughdicom-pixeldata(including encapsulated data). - JPEG 2000 support via
openjp2. - Real-time window/level controls for grayscale workflows.
- Multi-frame cine playback (
Ckey or UI control). - Mouse-wheel zoom + drag pan in single-image and multi-view (
1x2/2x2) mammo views. - Typical DICOM mouse conventions (single modifier):
Shift + wheelfor frame navigation,Shift + dragfor window/level. - Metadata side panel for quick inspection.
- Launch through a custom URL scheme (
perspecta://...). - Launch directly from DICOMweb (study/series/instance aware).
This project is currently an MVP and actively evolving.
- Rust toolchain (stable)
- Platform graphics support compatible with
eframe(OpenGL stack available) - Optional on Linux:
xdg-utilsfor URL scheme registration
cargo run --releaseYou can also use Make targets:
make run
make run-releasecargo run -- "example-data/image.dcm"
cargo run -- "example-data/RCC.dcm" "example-data/LCC.dcm"
cargo run -- "example-data/RCC.dcm" "example-data/LCC.dcm" "example-data/RMLO.dcm" "example-data/LMLO.dcm"1file: opens the standard single-image view.2files: opens the mammography1x2layout.4files: opens the mammography2x2layout.
perspecta://open?path=example-data%2Fimage.dcm
perspecta://open?path=example-data%2FRCC.dcm&path=example-data%2FLCC.dcm&path=example-data%2FRMLO.dcm&path=example-data%2FLMLO.dcm
perspecta://open?group=example-data%2FRCC.dcm|example-data%2FLCC.dcm|example-data%2FRMLO.dcm|example-data%2FLMLO.dcm&group=example-data%2Freport.dcm&open_group=0
perspecta://open?dicomweb=http%3A%2F%2Flocalhost%3A8042%2Fdicom-web&study=<StudyInstanceUID>&series=<SeriesInstanceUID>
perspecta://open?dicomweb=http%3A%2F%2Flocalhost%3A8042&study=<StudyInstanceUID>&user=<username>&password=<password>
| Parameter | Purpose |
|---|---|
path, file |
Add one local file path |
paths, files |
Add multiple local file paths (comma- or pipe-separated) |
group |
Add one local preload group (must contain 1, 2, or 4 paths) |
groups |
Add multiple local preload groups separated by ; |
open_group |
Select which preloaded group opens first (default 0) |
dicomweb |
DICOMweb base URL (or full URL containing study/series/instance path segments) |
study |
StudyInstanceUID (required for DICOMweb launch) |
series |
SeriesInstanceUID (optional) |
instance |
SOPInstanceUID (optional) |
group_series |
DICOMweb grouped preload by series UID lists (each group must contain 1, 2, or 4) |
user, password |
Optional HTTP basic auth credentials (must be provided together) |
auth |
Alternative auth format: username:password (percent-encoded) |
Notes:
- URL values should be percent-encoded.
- If
dicomwebis provided as a server root (for examplehttp://localhost:8042), Perspecta normalizes it to/dicom-web. - You cannot mix local grouped launch (
group=...) with DICOMweb launch in the same URI.
const dicomwebBase = "http://localhost:8042/dicom-web";
const studyUID = "<StudyInstanceUID>";
const seriesUID = "<SeriesInstanceUID>";
const uri = `perspecta://open?dicomweb=${encodeURIComponent(
dicomwebBase
)}&study=${encodeURIComponent(studyUID)}&series=${encodeURIComponent(seriesUID)}`;
window.location.href = uri;cargo build --release
make install-protocol-linuxThis writes a desktop entry under ~/.local/share/applications.
C: toggle cine modeTab: next history itemShift+Tab: previous history itemCmd/Ctrl+W: close window
- Hover + mouse wheel: zoom in/out (single-image and
1x2/2x2mammo viewports) Shift+ mouse wheel: previous/next frame (multi-frame images)Shift+ drag (monochrome images): adjust window/level- Click + drag: pan when zoomed in
- Double click: reset zoom/pan for the active viewport
Common commands:
make check
make test
make fmt-check
make clippyOptional live-reload workflow:
make install-watch
make devsrc/main.rs: app entry point and native window setupsrc/app.rs: UI, state management, interactions, history/cine workflowsrc/dicom.rs: DICOM parsing and pixel extractionsrc/dicomweb.rs: DICOMweb metadata/download bridgesrc/renderer.rs: grayscale and RGB rendering pathssrc/launch.rs: CLI +perspecta://parserscripts/register-protocol-linux.sh: Linux URL scheme registration helper
- Some compressed transfer syntaxes may still depend on codec availability at runtime.
- No full study/series stack browser yet.
- No MPR, measurement tools, or advanced annotation workflow yet.
- Broader transfer syntax and codec coverage.
- Stronger study/series navigation and indexing.
- Background decode + smarter cache strategy for large studies.
- Expanded clinical tools (VOI LUT workflows, overlays, measurements).
- More reader productivity controls and presets.
MIT License. See LICENSE.