MRITestData.jl

Query and download free, open-access MRI k-space datasets and load them into MRI reconstruction packages, so reconstruction code can be exercised on real scanner data instead of only synthetic phantoms.

Supported sources:

SourceContentsFormatAccess
MRIDATAmulti-vendor fully-sampled raw k-space (3D knee, brain, …)ISMRMRD .h5direct download
OCMR_SOURCEcardiac multi-coil cine (fully sampled + undersampled)ISMRMRD .h5direct download
CMRXRECON2024multi-coil Cartesian cardiac k-space (Cine, Mapping, Aorta, Tagging, Flow, BlackBlood)MATLAB .mat → ISMRMRDSynapse (token)
CMRXRECON300undersampled multi-coil cardiac k-space + ACS, 300 volunteers (cine + T1/T2 mapping)MATLAB .mat → ISMRMRDSynapse (token)
USC_SPEECH8-channel spiral vocal-tract real-time speech rtMRI (GE 1.5 T), 75 speakersISMRMRD .h5figshare (CC-BY)
M4RAW4-channel fully-sampled Cartesian brain k-space (0.3 T low-field), multi-contrast/repetition, 183 subjectsfastMRI .h5 → ISMRMRDZenodo (CC-BY)
FASTMRIknee, brain, prostate, breast multi-coil k-space (NYU/FAIR)fastMRI .h5 → ISMRMRDform-gated (90-day signed URLs)

All sources are exposed through one uniform pipeline — list_datasets/query → download_dataset → load_raw — yielding a RawAcquisitionData. ISMRMRD files are read via MRIFiles; the .mat and fastMRI-layout sources are converted to a cached ISMRMRD file on first load.

Dataset contents is the authoritative per-source breakdown of every data type — anatomy, contrasts/modalities, sampling, coils, array layout, file counts. This page does not repeat it.

Documentation map

If you want to…Read
understand k-space, ISMRMRD, and what load_raw returnsConcepts & data model
go from install to a reconstructed imageTutorial
look up a termGlossary
filter, browse, cache, reconstructUsage
know exactly what a source containsDataset contents
understand the catalog field namesTaxonomy
fix a credential / download / recon problemFAQ & troubleshooting
know how archive range-extraction works, or regenerate an indexInternals & maintainer notes
check data licenses and required citationsLicensing & legal
Data source terms of use

This package's MIT license covers its code only. Downloaded data is governed by each provider's own license and terms, which you must review and comply with before using, redistributing, or publishing results derived from the data. See Licensing & legal. Call MRITestData.dismiss_terms_notice!() to suppress the startup reminder once you have reviewed the terms.

Installation

The package is not yet registered in the General registry:

using Pkg
Pkg.add(url = "https://github.com/hakkelt/MRITestData.jl")

MRITestData depends on MRIFiles (which pulls in HDF5) but not on any reconstruction package.

Quick start

using MRITestData

# Discover (the dataset index self-updates from upstream; offline-safe)
entries = list_datasets(OCMR_SOURCE; fully_sampled = true)

# Pick where downloads go (once per machine; persisted). Required before any download.
MRITestData.set_download_path!(:cache)   # the package Scratch cache, or pass a directory

# Download (cached) → returns the path to the local .h5 file
path = download_dataset(first(entries))

# Load the raw data
raw = load_raw(path)    # RawAcquisitionData (or pass the entry directly)

The Tutorial continues from here to a reconstructed image.

Citing

If MRITestData.jl helped your work, please cite it (see CITATION.bib in the repository) and cite each dataset provider as their terms require — see Licensing & legal.