Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ jobs:
path: dicom-viewer
persist-credentials: false

- name: Checkout wsi-dicom-annotations
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: frames-sg/wsi-dicom-annotations
ref: a623e84405d9be6779e7065a71031228b20849a5
path: wsi-dicom-annotations
persist-credentials: false

- name: Install Linux GUI dependencies
if: runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -108,14 +100,6 @@ jobs:
path: dicom-viewer
persist-credentials: false

- name: Checkout wsi-dicom-annotations
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: frames-sg/wsi-dicom-annotations
ref: a623e84405d9be6779e7065a71031228b20849a5
path: wsi-dicom-annotations
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@a75363d06101555fc97c6c7e1e65670b99104d98 # 1.96.1

Expand Down
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,55 @@
/.DS_Store
*.profraw
*.profdata

# Local tools, credentials, and editor state
.DS_Store
.codex/
.claude/
.local-docs/
.local-tools/
.codex-security-*/
reasonix.toml
.env
.env.*
!.env.example
!.env.sample
*.key
*.pem
*.p12
*.pfx
.vscode/
.idea/
*.swp

# Local dependencies, build outputs, and caches
node_modules/
.venv*/
__pycache__/
*.py[cod]
.pytest_cache/
.ruff_cache/
/dist/
/coverage/
lcov*.info
*.log

# Private writing and execution plans; maintained outside the software repos
/manuscript/
/grant/
/paper/
/papers/
/uscap/
/docs/manuscript/
/docs/USCAP*
/docs/papers/
/docs/benchmarks/paper/
/docs/plans/
/docs/workplans/
/docs/refactor/
/docs/superpowers/
/MIGRATION.md
/migration.md
*.docx
*.pptx
*.pdf
62 changes: 43 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
"crates/dicom-viewer-core",
"crates/metal-wgpu-interop",
]
exclude = ["vendor/lru", "vendor/wayland-scanner"]
exclude = ["vendor/epaint", "vendor/lru", "vendor/wayland-scanner"]

[workspace.package]
edition = "2021"
Expand All @@ -16,10 +16,7 @@ repository = "https://github.com/frames-sg/dicom-viewer"
[workspace.dependencies]
dicom-core = "0.9"
dicom-dictionary-std = "0.9"
dicom-encoding = "0.9"
dicom-object = "0.9"
dicom-parser = "0.9"
dicom-transfer-syntax-registry = { version = "0.9", default-features = false }
eframe = { version = "0.34.2", default-features = false, features = [
"accesskit",
"default_fonts",
Expand All @@ -43,17 +40,18 @@ serde = { version = "1", features = ["derive", "rc"] }
wsi-rs = { version = "0.6.0", git = "https://github.com/frames-sg/wsi-rs.git", rev = "b940ea94f3290e54ca2c5f87823109538709c59d" }
tempfile = "3"
thiserror = "2"
tiff = "0.11.3"
lcms2 = { version = "6.1.1", features = ["static"] }
sha2 = "0.10"
uuid = { version = "1", features = ["serde", "v4"] }
geo = { version = "0.33.1", default-features = false }
rstar = "0.12.2"
peak_alloc = "0.3"
wsi-dicom-annotations = { version = "=0.1.1", path = "../wsi-dicom-annotations" }
wsi-dicom-annotations = { version = "=0.1.2", git = "https://github.com/frames-sg/wsi-dicom-annotations.git", rev = "71851b4a0c286fa9b57326e426962bf1a63a781e" }

# Temporary security patches for advisories without compatible upstream
# releases. See each vendored crate's SECURITY-PATCH.md for removal criteria.
# Dependency patches and the Windows font backend; see SUPPLY_CHAIN.md.
# Security-patched crates retain their SECURITY-PATCH.md removal criteria.
[patch.crates-io]
epaint = { path = "vendor/epaint" }
lru = { path = "vendor/lru" }
wayland-scanner = { path = "vendor/wayland-scanner" }

Expand Down
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

Lightweight desktop viewer for local whole-slide image files through `wsi-rs`.

This application is for research use only. It is not a medical device and is
not intended for diagnosis, treatment decisions, or other clinical use. Use
only research inputs that contain no patient data; the viewer does not perform
de-identification or validate that an input is free of identifying metadata.

The app is intended for checking `wsi-dicom` output locally and for verifying
other wsi-rs-supported WSI inputs. It does not upload files or use DICOMweb.
Its facts panel reads only the technical WSI tags documented below; local file
paths can still be visible in the UI and in screenshots.

See [Architecture](docs/ARCHITECTURE.md) for ownership, scheduling, cache, and
Metal interoperability invariants, the [pathology annotation
workflow](docs/ANNOTATION_WORKFLOW.md), and the [research release
workflow](docs/ANNOTATION_WORKFLOW.md), and the [release
checklist](docs/RELEASE.md) for distribution gates.

## Build
Expand All @@ -27,6 +22,15 @@ complete revisions, so no sibling codec checkout is required.
cargo run -p dicom-viewer
```

Build the standalone Windows GUI executable on an x86-64 Windows host with:

```powershell
cargo build -p dicom-viewer --bin dicom-viewer --release --locked
```

The Windows build statically links the MSVC runtime, so the resulting
`target\release\dicom-viewer.exe` requires no application-specific sidecar DLLs.

wgpu is the only presentation backend on every platform. On macOS, ordinary
builds automatically enable `wsi-rs` Metal decoding and use the renderer's
exact Metal device; resident RGB tiles are converted to RGBA by a wgpu compute
Expand Down Expand Up @@ -81,7 +85,7 @@ space, wsi-rs source caches, or GPU driver overhead.
DICOM inspection rejects metadata beyond explicit resource limits before the
eager object parser runs: 1 MiB of file-meta data, 16 MiB per primitive value,
128 MiB of cumulative primitive values, two million metadata tokens, and 64
nested sequences. These are research-viewer safety limits rather than DICOM
nested sequences. These are viewer safety limits rather than DICOM
conformance claims.

## Pathology annotation workspace
Expand Down Expand Up @@ -129,10 +133,20 @@ contract](docs/FRAMES_PATHOLOGY_GEOJSON_V1.md), [tumor-mask compatibility
adapter](docs/TUMOR_MASK_COMPATIBILITY.md), and [workspace storage/privacy
notes](docs/WORKSPACE_STORAGE.md).

### Annotation dependency source

Annotations 0.1.2 is pinned to immutable Git revision
`71851b4a0c286fa9b57326e426962bf1a63a781e` in `frames-sg/wsi-dicom-annotations`.
That revision owns the shared metadata reader and headless CLI. CI checks out only
the viewer; Cargo resolves the owner without a sibling directory or local overlay.
The dependency remains versioned and locked. A later registry migration requires
publication of the matching API and a reviewed lockfile refresh.

### Headless annotation interoperability probe

`annotation_probe` is a thin CLI over the separately versioned
`wsi-dicom-annotations` library. It exposes ANN/SEG parsing and rewriting plus
`annotation_probe` is maintained in the `wsi-dicom-annotations` repository as the
`wsi-annotation-probe` package. Build it there with
`cargo build -p wsi-annotation-probe --bin annotation_probe --locked`. It exposes ANN/SEG parsing and rewriting plus
Rust-owned GeoJSON and raster conversion without the GUI. It writes one
schema-versioned JSON object to stdout; warnings and human-readable failures go
to stderr.
Expand Down Expand Up @@ -207,8 +221,6 @@ Dual-licensed under either [MIT](LICENSE-MIT) or

## Current Scope

- Research-use-only operation with non-patient inputs; no clinical claims or
de-identification workflow.
- Desktop-only `egui/eframe` app with a unified wgpu renderer.
- Open one wsi-rs-supported WSI file or a folder of DICOM instances.
- View WSI levels as tiled RGB/RGBA pixels through `wsi-rs`.
Expand Down
Loading
Loading