We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca32ba commit a536ed3Copy full SHA for a536ed3
nibabel/tests/test_processing.py
@@ -443,3 +443,13 @@ def test_conform():
443
assert c.dataobj.dtype.type == anat.dataobj.dtype.type
444
assert aff2axcodes(c.affine) == ('L', 'P', 'I')
445
assert isinstance(c, Nifti2Image)
446
+
447
+ # TODO: support nD images in `conform` in the future, but for now, test that we get
448
+ # errors on non-3D images.
449
+ func = nib.load(pjoin(DATA_DIR, 'functional.nii'))
450
+ with pytest.raises(ValueError):
451
+ conform(func)
452
453
+ conform(anat, out_shape=(100, 100))
454
455
+ conform(anat, voxel_size=(2, 2))
0 commit comments