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
346 downloads per month
Used in 4 crates
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
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