Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions nitransforms/tests/test_nonlinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import numpy as np
import nibabel as nb
from nitransforms.resampling import apply
from nitransforms.base import TransformError
from nitransforms.nonlinear import (
BSplineFieldTransform,
Expand Down Expand Up @@ -62,17 +61,8 @@ def test_bsplines_references(testdata_path):
testdata_path / "someones_bspline_coefficients.nii.gz"
).to_field()

with pytest.raises(TransformError):
apply(
BSplineFieldTransform(
testdata_path / "someones_bspline_coefficients.nii.gz"
),
testdata_path / "someones_anatomy.nii.gz",
)

apply(
BSplineFieldTransform(testdata_path / "someones_bspline_coefficients.nii.gz"),
testdata_path / "someones_anatomy.nii.gz",
BSplineFieldTransform(
testdata_path / "someones_bspline_coefficients.nii.gz",
reference=testdata_path / "someones_anatomy.nii.gz",
)

Expand Down Expand Up @@ -154,8 +144,8 @@ def test_densefield_map(get_testdata, image_orientation, ongrid):
) < 0.5


def test_map_bspline_vs_displacement(tmp_path, testdata_path):
"""Cross-check B-Splines and deformation field."""
def test_densefield_map_vs_bspline(tmp_path, testdata_path):
"""Cross-check B-Splines and displacements field."""
os.chdir(str(tmp_path))

img_name = testdata_path / "someones_anatomy.nii.gz"
Expand Down
Loading