# DICOM Whole-Slide Conversion

Canonical page: https://frames-sg.com/dicom-whole-slide-conversion/

`wsi-dicom` converts supported whole-slide image files into DICOM VL Whole Slide Microscopy instances. It provides a Rust API, command-line tool and optional native GUI.

`wsi-rs` opens the scanner source. Frames codec crates provide supported JPEG, JPEG 2000 and HTJ2K primitives. `wsi-dicom` owns export planning, metadata validation, transfer-syntax routing, reporting, staged publication and DICOM writer errors.

## Workflow

- Read any source supported by the selected `wsi-rs` release.
- Provide governed metadata JSON or FHIR input, or explicitly select research placeholder metadata.
- Select an ICC policy using source profiles, sRGB fallback, a governed calibration registry or an explicit profile.
- Route compatible compressed payloads or supported encode paths into tiled DICOM VL WSI instances.
- Convert explicitly mapped QuPath GeoJSON into supported ANN, SEG and SR objects through `wsi-dicom-annotations`.
- Run intrinsic checks and, when installed, optional external DICOM validators.

The converter never guesses clinical terminology from QuPath class names. Passing repository validation is engineering evidence, not a claim of formal DICOM certification.

## Install and example

```sh
cargo install wsi-dicom
wsi-dicom convert slide.ndpi --out dicom-out --research-placeholder --icc source-or-srgb
```

- [API documentation](https://docs.rs/wsi-dicom)
- [Source repository](https://github.com/frames-sg/wsi-dicom)
- [Annotations repository](https://github.com/frames-sg/wsi-dicom-annotations)
- [Whole-slide imaging in Rust](https://frames-sg.com/whole-slide-imaging-rust/)
