Skip to content

Commit fb142d5

Browse files
oestebaneffigies
andcommitted
fix: test minor items
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
1 parent ebc926d commit fb142d5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sdcflows/utils/tests/test_tools.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,15 @@ def test_deoblique_and_zooms(padding, factor):
4242

4343
# Generate an example reference image
4444
ref_data = np.zeros((20, 30, 40), dtype=np.float32)
45-
ref_affine = np.eye(4)
46-
ref_affine[:3, :3] = np.diag([1.0, 1.2, 0.8]) # Set zooms to (2, 3, 4)
45+
ref_affine = np.diag([1.0, 1.2, 0.8, 1.0])
4746
ref_img = nb.Nifti1Image(ref_data, ref_affine)
4847
ref_zooms = np.array(ref_img.header.get_zooms()[:3])
4948

5049
# Generate an example oblique image
5150
ob_data = np.ones_like(ref_data)
52-
rotate = np.eye(4)
5351

5452
# Rotate 90 degrees around x-axis
55-
rotate[:3, :3] = np.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]])
53+
rotate = np.array([[0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 0], [0, 0, 0, 1]])
5654
ob_img = nb.Nifti1Image(ob_data, rotate @ ref_affine)
5755

5856
# Call function with default parameters

0 commit comments

Comments
 (0)