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 5d08d91 commit 2a8e2d6Copy full SHA for 2a8e2d6
niworkflows/interfaces/tests/test_bids.py
@@ -308,6 +308,13 @@ def test_DerivativesDataSink_build_path(
308
309
for out, exp in zip(output, expectation):
310
assert Path(out).relative_to(tmp_path) == Path(base) / exp
311
+ # Regression - some images were given nan scale factors
312
+ if out.endswith(".nii") or out.endswith(".nii.gz"):
313
+ img = nb.load(out)
314
+ with nb.openers.ImageOpener(out) as fobj:
315
+ hdr = img.header.from_fileobj(fobj)
316
+ assert not np.isnan(hdr["scl_slope"])
317
+ assert not np.isnan(hdr["scl_inter"])
318
for out, chksum in zip(output, checksum):
319
assert sha1(Path(out).read_bytes()).hexdigest() == chksum
320
0 commit comments