MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / verify_suffix

Method verify_suffix

monai/data/image_reader.py:1062–1072  ·  view source on GitHub ↗

Verify whether the specified file or files format is supported by Nibabel reader. Args: filename: file name or a list of file names to read. if a list of files, verify all the suffixes.

(self, filename: Sequence[PathLike] | PathLike)

Source from the content-addressed store, hash-verified

1060 f.read(b)
1061
1062 def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
1063 """
1064 Verify whether the specified file or files format is supported by Nibabel reader.
1065
1066 Args:
1067 filename: file name or a list of file names to read.
1068 if a list of files, verify all the suffixes.
1069
1070 """
1071 suffixes: Sequence[str] = ["nii", "nii.gz"]
1072 return has_nib and is_supported_format(filename, suffixes)
1073
1074 def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
1075 """

Callers

nothing calls this directly

Calls 1

is_supported_formatFunction · 0.90

Tested by

no test coverage detected