nifreeze.data package

Four-dimensional data representation in hard-disk and memory.

nifreeze.data.load(filename: Path | str, brainmask_file: Path | str | None = None, motion_file: Path | str | None = None, **kwargs) BaseDataset | DWI | PET[source]

Load 4D data from a filename or an HDF5 file.

Parameters:
  • filename (os.pathlike) – The NIfTI or HDF5 file.

  • brainmask_file (os.pathlike, optional) – A brainmask NIfTI file. If provided, will be loaded and stored in the returned dataset.

  • motion_file (os.pathlike) – A file containing head motion affine matrices (linear).

Returns:

The loaded dataset.

Return type:

BaseDataset

Raises:

ValueError – If the file extension is not supported or the file cannot be loaded.

Submodules