We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34c651f commit a7ad08cCopy full SHA for a7ad08c
nitransforms/resampling.py
@@ -110,8 +110,9 @@ async def _apply_serial(
110
for t in range(n_resamplings):
111
xfm_t = transform if (n_resamplings == 1 or transform.ndim < 4) else transform[t]
112
113
- if targets is None:
114
- targets = ImageGrid(spatialimage).index( # data should be an image
+ targets_t = targets
+ if targets_t is None:
115
+ targets_t = ImageGrid(spatialimage).index( # data should be an image
116
_as_homogeneous(xfm_t.map(ref_ndcoords), dim=ref_ndim)
117
)
118
@@ -127,7 +128,7 @@ async def _apply_serial(
127
128
partial(
129
ndi.map_coordinates,
130
data_t,
- targets,
131
+ targets_t,
132
output=output[..., t],
133
order=order,
134
mode=mode,
0 commit comments