getNiftiFromAnySource(src,
ensure=False,
enforce_dim=None,
scale_data=True)
| 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.
scale_data (bool) - NIfTI header specifies scl_slope and scl_inter for scaling and
offsetting the data. By default those will get applied to the data
(change in behavior post 0.4.6).
- Returns:
- NiftiImage | None
- If the source is not supported None is returned.
|