Skip to content

Commit d5a30c0

Browse files
committed
test: compare composite H5 mapping against ANTs
1 parent e1c263d commit d5a30c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nitransforms/tests/test_io.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,13 +783,13 @@ def test_itk_h5_field_order_fortran(tmp_path):
783783

784784
def test_composite_h5_map_against_ants(testdata_path, tmp_path):
785785
"""Map points with NiTransforms and compare to ANTs."""
786-
h5file, _ = _load_composite_testdata(testdata_path)
786+
h5file = testdata_path / "regressions" / "ants_t1_to_mniComposite.h5"
787+
if not h5file.exists():
788+
pytest.skip("Composite transform test data not available")
789+
787790
points = np.array([[0.0, 0.0, 0.0], [1.0, 2.0, 3.0]])
788791
csvin = tmp_path / "points.csv"
789-
with open(csvin, "w") as f:
790-
f.write("x,y,z\n")
791-
for row in points:
792-
f.write(",".join(map(str, row)) + "\n")
792+
np.savetxt(csvin, points, delimiter=",", header="x,y,z", comments="")
793793

794794
csvout = tmp_path / "out.csv"
795795
cmd = f"antsApplyTransformsToPoints -d 3 -i {csvin} -o {csvout} -t {h5file}"

0 commit comments

Comments
 (0)