|
29 | 29 | from nitransforms.linear import LinearTransformsMapping
|
30 | 30 | from skimage.morphology import ball
|
31 | 31 | import scipy.ndimage as nd
|
| 32 | +from nireports.interfaces.reporting.base import SimpleBeforeAfterRPT as SimpleBeforeAfter |
32 | 33 |
|
33 | 34 | from sdcflows import transform as tf
|
34 | 35 | from sdcflows.interfaces.bspline import bspline_grid
|
@@ -120,10 +121,6 @@ def test_displacements_field(tmpdir, testdata_dir, outdir, pe_dir, rotation, fli
|
120 | 121 | assert np.all((np.sqrt(((ours - theirs) ** 2).sum()) / ours.size) < 1e-1)
|
121 | 122 |
|
122 | 123 | if outdir:
|
123 |
| - from niworkflows.interfaces.reportlets.registration import ( |
124 |
| - SimpleBeforeAfterRPT as SimpleBeforeAfter, |
125 |
| - ) |
126 |
| - |
127 | 124 | orientation = "".join([ax[bool(f)] for ax, f in zip(("RL", "AP", "SI"), flip)])
|
128 | 125 |
|
129 | 126 | SimpleBeforeAfter(
|
@@ -204,10 +201,6 @@ def test_apply_transform(tmpdir, outdir, datadir, pe0, hmc, fmap):
|
204 | 201 | error = np.sqrt(((corrected.dataobj - realigned.dataobj) ** 2))
|
205 | 202 |
|
206 | 203 | if outdir:
|
207 |
| - from niworkflows.interfaces.reportlets.registration import ( |
208 |
| - SimpleBeforeAfterRPT as SimpleBeforeAfter, |
209 |
| - ) |
210 |
| - |
211 | 204 | # Do not include the first volume in the average to enhance differences
|
212 | 205 | realigned_data = np.asanyarray(corrected.dataobj)[..., 1:].mean(-1)
|
213 | 206 | realigned_data[realigned_data < 0] = 0
|
@@ -241,10 +234,6 @@ def test_apply_transform(tmpdir, outdir, datadir, pe0, hmc, fmap):
|
241 | 234 | error_margin = 200 # test oracle is pretty bad here - needs revision.
|
242 | 235 |
|
243 | 236 | if outdir:
|
244 |
| - from niworkflows.interfaces.reportlets.registration import ( |
245 |
| - SimpleBeforeAfterRPT as SimpleBeforeAfter, |
246 |
| - ) |
247 |
| - |
248 | 237 | # Do not include the first volume in the average to enhance differences
|
249 | 238 | realigned_data = np.asanyarray(corrected.dataobj)[..., 1:].mean(-1)
|
250 | 239 | realigned_data[realigned_data < 0] = 0
|
|
0 commit comments