|
40 | 40 | "dimension": 4,
|
41 | 41 | "space": "left-posterior-superior",
|
42 | 42 | "sizes": [3, 4, 4, 1],
|
43 |
| - "space directions": [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], |
44 |
| - "space origin": [0.0, 0.0, 0.0], |
| 43 | + "space directions": [[0.7, 0.0, 0.0], [0.0, 0.0, -0.8], [0.0, 0.9, 0.0]], |
| 44 | + "space origin": [1.0, 5.0, 20.0], |
45 | 45 | },
|
46 | 46 | ]
|
47 | 47 |
|
@@ -110,6 +110,10 @@ def test_read_with_header(self, data_shape, filename, expected_shape, dtype, ref
|
110 | 110 | np.testing.assert_allclose(image_array, test_image)
|
111 | 111 | self.assertIsInstance(image_header, dict)
|
112 | 112 | self.assertTupleEqual(tuple(image_header["spatial_shape"]), expected_shape)
|
| 113 | + np.testing.assert_allclose( |
| 114 | + image_header["affine"], |
| 115 | + np.array([[-0.7, 0.0, 0.0, -1.0], [0.0, 0.0, -0.9, -5.0], [0.0, -0.8, 0.0, 20.0], [0.0, 0.0, 0.0, 1.0]]), |
| 116 | + ) |
113 | 117 |
|
114 | 118 | @parameterized.expand([TEST_CASE_8])
|
115 | 119 | def test_read_with_header_index_order_c(self, data_shape, filename, expected_shape, dtype, reference_header):
|
|
0 commit comments