Skip to content

Commit 825eb5f

Browse files
jhlegarretaoesteban
andcommitted
REF: Remove image change percentage function
Remove image change percentage function from the `analysis.utils` module as it is a metric of image similarity rather than a metric of motion. Co-authored-by: Oscar Esteban <code@oscaresteban.es>
1 parent e45b2e5 commit 825eb5f

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

nitransforms/tests/test_analysis.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from nitransforms.analysis.utils import (
1111
compute_fd_from_motion,
1212
compute_fd_from_transform,
13-
compute_percentage_change,
1413
displacements_within_mask,
1514
extract_motion_parameters,
1615
identify_spikes,
@@ -135,34 +134,6 @@ def test_extract_motion_parameters(affine, expected_trans, expected_rot):
135134
assert np.allclose(params[3:], expected_rot)
136135

137136

138-
@pytest.mark.parametrize(
139-
"reference, test, mask, expected",
140-
[
141-
(
142-
np.array([[1.0, 2.0], [0.0, 4.0]]),
143-
np.array([[2.0, 1.0], [3.0, 8.0]]),
144-
np.array([[True, True], [True, True]]),
145-
np.array([[(2.0 - 1.0) / 1.0, (1.0 - 2.0) / 2.0], [0, (8.0 - 4.0) / 4.0]]) * 100,
146-
),
147-
(
148-
np.zeros((2,2)),
149-
np.ones((2,2)),
150-
np.ones((2,2), dtype=bool),
151-
np.zeros((2,2)),
152-
),
153-
(
154-
np.array([[5, 10], [15, 20]]),
155-
np.array([[10, 5], [30, 10]]),
156-
np.array([[False, True], [True, False]]),
157-
np.array([[0, (5-10)/10], [(30-15)/15, 0]]) * 100,
158-
),
159-
],
160-
)
161-
def test_compute_percentage_change_param(reference, test, mask, expected):
162-
result = compute_percentage_change(reference, test, mask)
163-
np.testing.assert_array_almost_equal(result, expected)
164-
165-
166137
def test_identify_spikes(request):
167138
rng = request.node.rng
168139

0 commit comments

Comments
 (0)