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

Function test_create_image

Modules/Python/test/pytest/test_image.py:20–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_create_image():
21 image = mitk.Image()
22 image.initialize("float32", [64, 64, 64])
23
24 assert image.get_dimension() == 3
25 assert image.get_dimension(0) == 64
26
27 array = image.as_numpy()
28 assert array.shape == (64, 64, 64)
29 assert array.dtype == np.float32
30
31
32def test_image_constructor(tmp_path):

Callers

nothing calls this directly

Calls 2

ImageMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected