#dicom #medical #dataset #file-path #image

dev dicom-test-files

A collection of DICOM files for testing DICOM parsers

6 releases

0.3.0 Mar 1, 2024
0.2.1 Jul 13, 2022
0.2.0 May 31, 2020
0.1.2 May 30, 2020

#653 in Parser implementations

Download history 4/week @ 2024-01-01 8/week @ 2024-01-08 19/week @ 2024-01-15 5/week @ 2024-02-05 10/week @ 2024-02-12 35/week @ 2024-02-19 181/week @ 2024-02-26 37/week @ 2024-03-04 31/week @ 2024-03-11 26/week @ 2024-03-18 21/week @ 2024-03-25 76/week @ 2024-04-01 29/week @ 2024-04-08 13/week @ 2024-04-15

142 downloads per month
Used in 4 crates

Custom license

44KB
486 lines

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.


lib.rs:

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

Dependencies

~7–17MB
~245K SLoC