()
| 67 | |
| 68 | |
| 69 | def 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 |