mrpro.phantoms.brainweb.BrainwebVolumes
- class mrpro.phantoms.brainweb.BrainwebVolumes[source]
Bases:
Dataset
Dataset of 3D qMRI parameters based on Brainweb dataset.
This dataset provides 1 mm isotropic 3D brain data of various quantitative MRI (qMRI) parameters based on the segmentations provided by the Brainweb [AubertBroche2006] dataset.
References
[AubertBroche2006]Aubert-Broche, B., Griffin, M., Pike, G.B., Evans, A.C., & Collins, D.L. (2006). Twenty New Digital Brain Phantoms for Creation of Validation Image Data Bases. IEEE Transactions on Medical Imaging, 25 (11), 1410-1416. https://doi.org/10.1109/TMI.2006.883453
- __init__(folder: str | Path = CACHE_DIR, what: Sequence[Literal['r1', 'r2', 'm0', 't1', 't2', 'mask', 'tissueclass', 'skl', 'gry', 'wht', 'csf', 'mrw', 'dura', 'fat', 'fat2', 'mus', 'm-s', 'ves']] = ('m0', 'r1', 'r2'), parameters: Mapping[Literal['skl', 'gry', 'wht', 'csf', 'mrw', 'dura', 'fat', 'fat2', 'mus', 'm-s', 'ves'], BrainwebTissue] = VALUES_3T_RANDOMIZED, mask_values: Mapping[str, float | None] = DEFAULT_VALUES, seed: int | Literal['index', 'random'] = 'random') None [source]
Initialize Dataset.
- Parameters:
folder (
str
|Path
, default:CACHE_DIR
) – The directory containing Brainweb HDF5 fileswhat (
Sequence
[Union
[Literal
['r1'
,'r2'
,'m0'
,'t1'
,'t2'
,'mask'
,'tissueclass'
],Literal
['skl'
,'gry'
,'wht'
,'csf'
,'mrw'
,'dura'
,'fat'
,'fat2'
,'mus'
,'m-s'
,'ves'
]]], default:('m0', 'r1', 'r2')
) –What to return for each subject. Possible values are:
r1: R1 relaxation rate.
r2: R2 relaxation rate.
m0: M0 magnetization.
t1: T1 relaxation time.
t2: T2 relaxation time.
mask: mask indicating valid data.
tissueclass: (majority) class index.
Brainweb class name: raw percentage of the specific tissue class (see below for possible values).
parameters (
Mapping
[Literal
['skl'
,'gry'
,'wht'
,'csf'
,'mrw'
,'dura'
,'fat'
,'fat2'
,'mus'
,'m-s'
,'ves'
],BrainwebTissue
], default:VALUES_3T_RANDOMIZED
) –Parameters for each tissue class. The Brainweb tissue classes are:
skl: skull
gry: gray matter
wht: white matter
csf: cerebrospinal fluid
mrw: bone marrow
dura: dura
fat: fat
fat2: fat and tissue
mus: muscle
m-s: skin
ves: vessels
mask_values (
Mapping
[str
,float
|None
], default:DEFAULT_VALUES
) – Default values to use for masked out regions.seed (
Union
[int
,Literal
['index'
,'random'
]], default:'random'
) – Random seed. Can be an int, the stringsindex
to use subject index as seed, orrandom
for random seed.
- static download(output_directory: str | PathLike = CACHE_DIR, workers: int = 4, progress: bool = False, compress: bool = False) None [source]
Download Brainweb data.
- Parameters:
output_directory (
str
|PathLike
, default:CACHE_DIR
) – Directory to save the data.workers (
int
, default:4
) – Number of parallel downloads.progress (
bool
, default:False
) – Show progress bar.compress (
bool
, default:False
) – Use compression for HDF5 files. Saves disk space but might slow down or speed up access, depending on the file system and access pattern.
- __eq__(value, /)
Return self==value.
- __new__(**kwargs)