vreg.fetch#
- vreg.fetch(dataset=None, clear_cache=False, download_all=False) Volume3D [source]#
Fetch a dataset included in vreg
- Parameters:
dataset (str, optional) – name of the dataset. See below for options.
clear_cache (bool, optional) – When a dataset is fetched, it is downloaded and then stored in a local cache memory for faster access next time it is fetched. Set clear_cache=True to delete all data in the cache memory. Default is False.
download_all (bool, optional) – By default only the dataset that is fetched is downloaded. Set download_all=True to download all datasets at once. This will cost some time but then offers fast and offline access to all datasets afterwards. This will take up around 300 MB of space on your hard drive. Default is False.
- Returns:
Data as a vreg.Volume3D (for 3D scans) or a list of Volume3D objects (for 2D multislice scans).
- Return type:
Example
Fetch the kidneys mask and the T1-map, and display as overlay:
>>> import vreg >>> import vreg.plot as plt
Get the data:
>>> kidneys = vreg.fetch('kidneys') >>> T1 = vreg.fetch('T1')
Plot as overlays:
>>> plt.overlay_2d(T1, kidneys)
Notes
The following datasets can be fetched:
‘Dixon_out_phase’: A 3D coronal opposed-phase volume from a DIXON scan of the abdomen.
‘kidneys’: A 3D mask covering the kidneys on the coronal DIXON scan.
‘left_kidney’: A 3D mask covering the left kidney on the DIXON scan.
‘right_kidney’: A 3D mask covering the right kidney on the DIXON scan.
‘MTR’: A 3D magnetization transfer ratio volume with oblique orientation aligned with the axis of the kidneys.
‘T1’: A 5-slice 2D T1-map through the kidneys in oblique orientations aligned with the axis of the kidneys.
‘T2star’: A 5-slice 2D T2* map through the kidneys in oblique orientations aligned with the axis of the kidneys.
Examples using vreg.fetch
#
Coronal, sagittal, axial and oblique