modelarrayio.utils.misc.detect_modality_from_path
- modelarrayio.utils.misc.detect_modality_from_path(path: str) str[source]
Return
'cifti','mif', or'nifti'based on file extension.- Parameters:
path (str) – File path whose extension is used to identify the neuroimaging modality.
- Returns:
One of
'cifti','mif', or'nifti'.- Return type:
str
- Raises:
ValueError – If the extension is not recognised.