The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
subject: string
source: struct<dataset: string, doi: string, paper_doi: string, license: string, scan: string>
child 0, dataset: string
child 1, doi: string
child 2, paper_doi: string
child 3, license: string
child 4, scan: string
grid: struct<shape: list<item: int64>, voxel_size_mm: list<item: double>, affine: list<item: list<item: do (... 7 chars omitted)
child 0, shape: list<item: int64>
child 0, item: int64
child 1, voxel_size_mm: list<item: double>
child 0, item: double
child 2, affine: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
protocol: struct<bvals_s_mm2: list<item: double>, bvecs: list<item: list<item: double>>, bvec_frame: string, T (... 40 chars omitted)
child 0, bvals_s_mm2: list<item: double>
child 0, item: double
child 1, bvecs: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
child 2, bvec_frame: string
child 3, TE_s: null
child 4, delta_s: null
child 5, Delta_s: null
fod: struct<basis: string, lmax: int64, frame: string>
child 0, basis: string
child 1, lmax: int64
child 2, frame: string
fractions: list<item: string>
child 0, item: string
reconstruction: struct<tool: string, commit: string, responses: string, solver: string, sh_order: int64>
child 0, tool: string
child 1, commit: string
child 2, responses: string
child 3, solver: string
child 4, sh_order: int64
parcellation: struct<tool: string, atlas: string, n_regions: int64>
child 0, tool: string
child 1, atlas: string
child 2, n_regions: int64
built_by: struct<disco_space_commit: string, date: timestamp[s]>
child 0, disco_space_commit: string
child 1, date: timestamp[s]
fod_peak_counts_in_wm: struct<2: int64, 5: int64, 4: int64, 1: int64, 6: int64, 3: int64, 7: int64>
child 0, 2: int64
child 1, 5: int64
child 2, 4: int64
child 3, 1: int64
child 4, 6: int64
child 5, 3: int64
child 6, 7: int64
to
{'fractions': {'sum_median': Value('float64'), 'sum_p99': Value('float64'), 'n_wm_gt_half': Value('int64'), 'n_mask': Value('int64')}, 'fod_peak_counts_in_wm': {'2': Value('int64'), '5': Value('int64'), '4': Value('int64'), '1': Value('int64'), '6': Value('int64'), '3': Value('int64'), '7': Value('int64')}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
subject: string
source: struct<dataset: string, doi: string, paper_doi: string, license: string, scan: string>
child 0, dataset: string
child 1, doi: string
child 2, paper_doi: string
child 3, license: string
child 4, scan: string
grid: struct<shape: list<item: int64>, voxel_size_mm: list<item: double>, affine: list<item: list<item: do (... 7 chars omitted)
child 0, shape: list<item: int64>
child 0, item: int64
child 1, voxel_size_mm: list<item: double>
child 0, item: double
child 2, affine: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
protocol: struct<bvals_s_mm2: list<item: double>, bvecs: list<item: list<item: double>>, bvec_frame: string, T (... 40 chars omitted)
child 0, bvals_s_mm2: list<item: double>
child 0, item: double
child 1, bvecs: list<item: list<item: double>>
child 0, item: list<item: double>
child 0, item: double
child 2, bvec_frame: string
child 3, TE_s: null
child 4, delta_s: null
child 5, Delta_s: null
fod: struct<basis: string, lmax: int64, frame: string>
child 0, basis: string
child 1, lmax: int64
child 2, frame: string
fractions: list<item: string>
child 0, item: string
reconstruction: struct<tool: string, commit: string, responses: string, solver: string, sh_order: int64>
child 0, tool: string
child 1, commit: string
child 2, responses: string
child 3, solver: string
child 4, sh_order: int64
parcellation: struct<tool: string, atlas: string, n_regions: int64>
child 0, tool: string
child 1, atlas: string
child 2, n_regions: int64
built_by: struct<disco_space_commit: string, date: timestamp[s]>
child 0, disco_space_commit: string
child 1, date: timestamp[s]
fod_peak_counts_in_wm: struct<2: int64, 5: int64, 4: int64, 1: int64, 6: int64, 3: int64, 7: int64>
child 0, 2: int64
child 1, 5: int64
child 2, 4: int64
child 3, 1: int64
child 4, 6: int64
child 5, 3: int64
child 6, 7: int64
to
{'fractions': {'sum_median': Value('float64'), 'sum_p99': Value('float64'), 'n_wm_gt_half': Value('int64'), 'n_mask': Value('int64')}, 'fod_peak_counts_in_wm': {'2': Value('int64'), '5': Value('int64'), '4': Value('int64'), '1': Value('int64'), '6': Value('int64'), '3': Value('int64'), '7': Value('int64')}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
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, sessionses-s1Ax1, the first scan, of MASiVar (OpenNeurods003416, 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.pyin 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'sdwi2response 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 byCsdCvxpyOptimizer(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
mtnormalisewould 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
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.
- Downloads last month
- 91