getNiftiFromAnySource(src,
ensure=False,
enforce_dim=None)
| source code
|
Load/access NIfTI data from files or instances.
- Parameters:
src , str , | , NiftiImage - Filename of a NIfTI image or a NiftiImage instance.
ensure (bool) - If True, through ValueError exception if cannot be loaded.
enforce_dim (int or None) - If not None, it is the dimensionality of the data to be enforced,
commonly 4D for the data, and 3D for the mask in case of fMRI.
- Returns:
- NiftiImage | None
- If the source is not supported None is returned.
|