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

Method verify_suffix

monai/data/image_reader.py:1256–1265  ·  view source on GitHub ↗

Verify whether the specified file or files format is supported by Numpy 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

1254 self.kwargs = kwargs
1255
1256 def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
1257 """
1258 Verify whether the specified file or files format is supported by Numpy reader.
1259
1260 Args:
1261 filename: file name or a list of file names to read.
1262 if a list of files, verify all the suffixes.
1263 """
1264 suffixes: Sequence[str] = ["npz", "npy"]
1265 return is_supported_format(filename, suffixes)
1266
1267 def read(self, data: Sequence[PathLike] | PathLike, **kwargs):
1268 """

Callers

nothing calls this directly

Calls 1

is_supported_formatFunction · 0.90

Tested by

no test coverage detected