MCPcopy Create free account
hub / github.com/MITK/MITK / test_image_array_protocol

Function test_image_array_protocol

Modules/Python/test/pytest/test_image_numpy.py:69–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68
69def test_image_array_protocol():
70 image = mitk.Image(np.zeros((4, 5, 6), dtype=np.uint8))
71
72 array = np.asarray(image)
73 assert array.shape == (4, 5, 6)
74 assert array.dtype == np.uint8
75
76 array_float = np.asarray(image, dtype=np.float32)
77 assert array_float.dtype == np.float32

Callers

nothing calls this directly

Calls 1

ImageMethod · 0.45

Tested by

no test coverage detected