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

Method verify_suffix

monai/data/image_reader.py:1491–1501  ·  view source on GitHub ↗

Verify whether the specified `filename` is supported by pynrrd 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

1489 self.kwargs = kwargs
1490
1491 def verify_suffix(self, filename: Sequence[PathLike] | PathLike) -> bool:
1492 """
1493 Verify whether the specified `filename` is supported by pynrrd reader.
1494
1495 Args:
1496 filename: file name or a list of file names to read.
1497 if a list of files, verify all the suffixes.
1498
1499 """
1500 suffixes: Sequence[str] = ["nrrd", "seg.nrrd"]
1501 return has_nrrd and is_supported_format(filename, suffixes)
1502
1503 def read(self, data: Sequence[PathLike] | PathLike, **kwargs) -> Sequence[Any] | Any:
1504 """

Callers 1

test_verify_suffixMethod · 0.95

Calls 1

is_supported_formatFunction · 0.90

Tested by 1

test_verify_suffixMethod · 0.76