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

Method test_identical_spatial

tests/transforms/test_resized.py:130–136  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

128 set_track_meta(True)
129
130 def test_identical_spatial(self):
131 test_input = {"X": np.ones((1, 10, 16, 17))}
132 xform = Resized("X", (-1, 16, 17))
133 out = xform(test_input)
134 out["Y"] = 2 * out["X"]
135 transform_inverse = Invertd(keys="Y", transform=xform, orig_keys="X")
136 assert_allclose(transform_inverse(out)["Y"].array, np.ones((1, 10, 16, 17)) * 2)
137
138 def test_consistent_resize(self):
139 spatial_size = (16, 16, 16)

Callers

nothing calls this directly

Calls 3

ResizedClass · 0.90
InvertdClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected