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

Method test_resample

tests/transforms/test_resampler.py:156–161  ·  view source on GitHub ↗
(self, input_param, input_data, expected_val)

Source from the content-addressed store, hash-verified

154class TestResample(unittest.TestCase):
155 @parameterized.expand(TESTS)
156 def test_resample(self, input_param, input_data, expected_val):
157 g = Resample(**input_param)
158 result = g(**input_data)
159 if "device" in input_data:
160 self.assertEqual(result.device, input_data["device"])
161 assert_allclose(result, expected_val, rtol=1e-4, atol=1e-4, type_test=False)
162
163
164if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

ResampleClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected