|
Download README.md from SubstrateCommons/masivar-brain: direct link, hf CLI and curl.
- Browser
- Download file 6.26 kB
-
https://huggingface.co/datasets/SubstrateCommons/masivar-brain/resolve/main/README.md
- Command line
-
hf download hf://datasets/SubstrateCommons/masivar-brain/README.md
-
curl -L -o README.md https://huggingface.co/datasets/SubstrateCommons/masivar-brain/resolve/main/README.md
6.26 kB
| license: cc0-1.0 | |
| pretty_name: "MASiVar sub-cIs1 as a replay phantom: the MT-CSD FOD field, tissue fractions and an 84-region parcellation" | |
| tags: | |
| - diffusion-mri | |
| - replay | |
| - phantom | |
| - connectome | |
| # MASiVar `sub-cIs1` as a compositional replay phantom | |
| The input of the brain Space (`rfick/brain-zero`, dmrai-lab/disco-space#8): one real scan reconstructed **once, offline, | |
| by dmipy-fit alone** into the arrays a compositional replay phantom composes with replay packs. Nothing here is a | |
| diffusion-weighted image: the subject's DWI is not redistributed (it is on OpenNeuro under CC0); this dataset is what | |
| multi-tissue CSD made of it, plus a parcellation of the subject's T1. | |
| ## Source | |
| * Subject `sub-cIs1`, session `ses-s1Ax1`, the first scan, of **MASiVar** (OpenNeuro `ds003416`, version 2.0.2, | |
| DOI 10.18112/openneuro.ds003416.v2.0.2; Cai et al., *MASiVar: Multisite, Multiscanner, and Multisubject | |
| Acquisitions for Studying Variability in Diffusion Weighted MRI*, Magnetic Resonance in Medicine 2021, | |
| DOI 10.1002/mrm.28926). Licence of the source: CC0. | |
| * The scan: 3 T, 2.5 mm isotropic, five shells b = 1000 / 1500 / 2000 / 2500 / 3000 s/mm² with 96 directions each and | |
| one b = 0 per shell (485 measurements), taken from the dataset's PreQual v1.0.0 derivative (denoised, susceptibility-, | |
| eddy- and motion-corrected), the five per-shell files merged. The sidecars record no echo time or pulse timing. | |
| * The T1: `ses-s1Ax2`, 1 mm. | |
| ## What is in it | |
| | file | content | | |
| |---|---| | |
| | `manifest.json` | the subject, the source DOIs and licence, the grid (shape, voxel size, affine), the protocol (b-values, image-frame directions), the FOD basis, the reconstruction record (tool, commit, responses, solver), the parcellation record | | |
| | `fod_wm.npy` | `(X, Y, Z, 45)` float32: the white-matter FOD as real spherical harmonics to order 8 in the image frame, as dmipy-fit's CSD emits them (tournier07 ordering), 0 outside the mask | | |
| | `fractions.npy` | `(X, Y, Z, 3)` float16: the geometric WM / GM / CSF fractions of the multi-tissue fit, clipped to [0, 1] | | |
| | `mask.npy` | `(X, Y, Z)` bool: the brain mask (median-Otsu on the mean b = 0) | | |
| | `labels.npy` | `(X, Y, Z)` int16: the 84 Desikan-Killiany + subcortical regions (MRtrix `fs_default` order: left 34 cortical then 8 subcortical, then right), 0 elsewhere | | |
| | `regions.json` | the 84 regions (id, FreeSurfer label, name, hemisphere, lobe) and the 14 lobar groups (7 lobes × 2 hemispheres) | | |
| | `stop_mask.npy` | `(X, Y, Z)` bool: where a streamline may continue (cerebral and cerebellar white matter, brain stem); leaving it ends the streamline | | |
| | `mean_b0.npy` | `(X, Y, Z)` float32: the mean b = 0 image, the page's background | | |
| | `checks/` | `msmt_sample.npz`, a fixed-seed sample of 2,000 voxels' signal, coefficients and fractions (the reference for dmipy-fit#39's fast solver); `sanity_summary.json`; an axial slice with the FOD's principal directions | | |
| ## How it was made | |
| * **Reconstruction, dmipy-fit only** (`tools/build_brain_asset.py` in dmrai-lab/disco-space): three-tissue response | |
| functions estimated from the data (`three_tissue_response_dhollander16`, Dhollander 2016, selected from the brain | |
| mask eroded by 3 passes as MRtrix3's `dwi2response dhollander -erode 3`, the WM response by Tournier 2013's | |
| iterative single-fibre selection), then multi-shell multi-tissue CSD (`MultiCompartmentSphericalHarmonicsModel`, | |
| Jeurissen 2014, `solver="csd_msmt_torch"`: the batched interior-point solver of dmipy-fit#40, every voxel to a | |
| KKT tolerance of 1e-13) at order 8 with the responses' S0 folded in, so the fractions are geometric. The whole | |
| brain (71,052 voxels × 485 measurements) took 24 s on a CPU. The dmipy-fit commit is in the manifest. | |
| Revision 1 of this dataset held the same fit by `CsdCvxpyOptimizer` (OSQP, 87 minutes on a CPU), whose inexact | |
| solutions left negative FOD lobes; revision 2 replaced it with the interior-point solver; revision 3 corrects the | |
| response selection: revision 2 selected its WM response from the un-eroded mask by FA, which took 300 noise voxels | |
| of FA ≈ 1 at the brain's edge and outside it (131 unlabelled by SynthSeg), so its WM response had 0.77 of white | |
| matter's b = 0 and every white-matter voxel's fractions came out 1.2 to 1.3 times too large (median sum 1.24 in | |
| cerebral WM). With the eroded mask and Tournier 2013, 282 of the 300 selected voxels lie in cerebral WM and the | |
| fit's b = 0 is 0.997 of the measured (IQR 0.992-1.003) in every tissue class. | |
| * **The sum of the fractions.** Multi-tissue CSD does not constrain WM + GM + CSF to one: each response carries one | |
| image-wide b = 0 amplitude while the measured b = 0 varies voxel by voxel (receive field, partial volume, T2), so | |
| the sum follows the measured b = 0 (Pearson 0.81 in interior white matter). Median sum 0.90 (IQR 0.80-0.98 in | |
| cerebral WM, 0.82-1.04 in cortical GM), 20,177 of 71,052 voxels above one, mostly in the cerebellum (median 1.4, | |
| where b = 0 is 1.6-1.8 times the cerebral white matter's) and the brain stem. No smooth field explains it (a cubic | |
| polynomial or a 30 mm Gaussian explains 0.3 of the variance of its logarithm), so a consumer that needs shares of | |
| a voxel divides by the sum where it exceeds one (the brain Space does, and counts the voxels it did it to), as | |
| MRtrix3's `mtnormalise` would after its smooth correction. | |
| * **Parcellation** (`tools/build_parcellation.py`): SynthSeg `--parc --robust` (Billot et al.) on the T1, a rigid | |
| mutual-information registration of the T1 onto the mean b = 0, and a plurality vote of 64 sub-points per diffusion | |
| voxel. All 84 nodes are present; per-label volume 578 to 20,656 mm³ (median 4,844). | |
| ## Use | |
| ```python | |
| import json, numpy as np | |
| from huggingface_hub import snapshot_download | |
| d = snapshot_download("SubstrateCommons/masivar-brain", repo_type="dataset") | |
| man = json.load(open(f"{d}/manifest.json")); fod = np.load(f"{d}/fod_wm.npy"); fr = np.load(f"{d}/fractions.npy") | |
| ``` | |
| The brain Space composes these with the replay packs of `SubstrateCommons/cactus-axons` (white matter) and | |
| `SubstrateCommons/grey-matter-spheres` (grey matter) through dmipy-sim's phantom route. | |
| Please cite Cai et al. 2021 and the OpenNeuro dataset when you use this. | |