io_volume¶
-
nighres.io.
load_volume
(volume)[source]¶ Load volumetric data into a Nibabel SpatialImage
Parameters: volume (niimg) – Volumetric data to be loaded, can be a path to a file that nibabel can load, or a Nibabel SpatialImage Returns: image Return type: Nibabel SpatialImage Notes
Originally created as part of Laminar Python [1]_ .
References
[1] Huntenburg et al. (2017), Laminar Python: Tools for cortical depth-resolved analysis of high-resolution brain imaging data in Python. DOI: 10.3897/rio.3.e12346
Examples using nighres.io.load_volume
¶
-
nighres.io.
save_volume
(filename, volume, dtype='float32', overwrite_file=True)[source]¶ Save volumetric data that is a Nibabel SpatialImage to a file
Parameters: - filename (str) – Full path and filename under which volume should be saved. The extension determines the file format (must be supported by Nibabel)
- volume (Nibabel SpatialImage) – Volumetric data to be saved
- dtype (str, optional) – Datatype in which volumetric data should be stored (default is float32)
- overwrite_file (bool, optional) – Overwrite existing files (default is True)
Notes
Originally created as part of Laminar Python [1]_ .
References
[1] Huntenburg et al. (2017), Laminar Python: Tools for cortical depth-resolved analysis of high-resolution brain imaging data in Python. DOI: 10.3897/rio.3.e12346