Skip to content

Commit a7ad08c

Browse files
committed
FIX: recompute targets for serialized per-volume resampling
1 parent 34c651f commit a7ad08c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nitransforms/resampling.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ async def _apply_serial(
110110
for t in range(n_resamplings):
111111
xfm_t = transform if (n_resamplings == 1 or transform.ndim < 4) else transform[t]
112112

113-
if targets is None:
114-
targets = ImageGrid(spatialimage).index( # data should be an image
113+
targets_t = targets
114+
if targets_t is None:
115+
targets_t = ImageGrid(spatialimage).index( # data should be an image
115116
_as_homogeneous(xfm_t.map(ref_ndcoords), dim=ref_ndim)
116117
)
117118

@@ -127,7 +128,7 @@ async def _apply_serial(
127128
partial(
128129
ndi.map_coordinates,
129130
data_t,
130-
targets,
131+
targets_t,
131132
output=output[..., t],
132133
order=order,
133134
mode=mode,

0 commit comments

Comments
 (0)