#dataset #dicom #medical #image

dev dicom-test-files

A collection of DICOM files for testing DICOM parsers

8 releases

0.4.0 Mar 1, 2026
0.3.1 Jun 21, 2025
0.3.0 Mar 1, 2024
0.2.1 Jul 13, 2022
0.1.2 May 30, 2020

#1346 in Parser implementations

Download history 178/week @ 2026-02-15 127/week @ 2026-02-22 62/week @ 2026-03-01 206/week @ 2026-03-08 144/week @ 2026-03-15 54/week @ 2026-03-22 98/week @ 2026-03-29 118/week @ 2026-04-05 102/week @ 2026-04-12 259/week @ 2026-04-19 414/week @ 2026-04-26 6/week @ 2026-05-03 38/week @ 2026-05-10 73/week @ 2026-05-17 89/week @ 2026-05-24 144/week @ 2026-05-31

346 downloads per month
Used in 4 crates

Custom license

50KB
536 lines

A collection of DICOM files for testing DICOM parsers.

To avoid users having to download all the files they are downloaded as they are needed and cached in the /target directory.

The path function will automatically download the requested file and return a file path.

use dicom_test_files::path;

let liver = path("pydicom/liver.dcm")?;
// then open the file as you will (e.g. using DICOM-rs)
let dicom_data = dicom::object::open(liver);

Source of data

By default, all data sets are hosted in the dicom-test-files project's main repository, in the data folder. Inspect this folder to know what DICOM test files are available.

To override this source, you can set the environment variable DICOM_TEST_FILES_URL to the base path of the data set's raw contents (usually ending with data or data/).

set DICOM_TEST_FILES_URL=https://raw.githubusercontent.com/Me/dicom-test-files/new/more-dicom/data
cargo test

DICOM Test Files

dicom-test-files on crates.io

This repository collects together example DICOM files from various sources. The intention is that they can be used for testing across many different libraries.

See the documentation for instructions of use.

Known limitations

The Rust functions cannot be used from doc-tests as they are not executed from within the target directory.

Dependencies

~13–28MB
~492K SLoC