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

Method test_patch_iter

tests/data/test_grid_dataset.py:79–84  ·  view source on GitHub ↗
(self, in_type, input_parameters, image, expected, coords)

Source from the content-addressed store, hash-verified

77
78 @parameterized.expand(TEST_CASES_PATCH_ITER)
79 def test_patch_iter(self, in_type, input_parameters, image, expected, coords):
80 input_image = in_type(image)
81 patch_iterator = PatchIter(**input_parameters)(input_image)
82 for (result_image, result_loc), expected_patch, coord in zip(patch_iterator, expected, coords):
83 assert_allclose(result_image, in_type(expected_patch), type_test=True, device_test=True)
84 assert_allclose(result_loc, coord, type_test=True, device_test=True)
85
86 @parameterized.expand(TEST_CASES_PATCH_ITER)
87 def test_patch_iterd(self, in_type, input_parameters, image, expected, coords):

Callers

nothing calls this directly

Calls 2

PatchIterClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected