File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -259,22 +259,14 @@ def apply(
259
259
targets = None
260
260
ref_ndcoords = _ref .ndcoords
261
261
262
- if hasattr (transform , "to_field" ) and callable (transform .to_field ):
263
- targets = ImageGrid (spatialimage ).index (
264
- _as_homogeneous (
265
- transform .to_field (reference = reference ).map (ref_ndcoords ),
266
- dim = _ref .ndim ,
267
- )
268
- )
269
- else :
270
- # Targets' shape is (Nt, 3, Nv) with Nv = Num. voxels, Nt = Num. timepoints.
271
- targets = (
272
- ImageGrid (spatialimage ).index (
273
- _as_homogeneous (transform .map (ref_ndcoords ), dim = _ref .ndim )
274
- )
275
- if targets is None
276
- else targets
262
+ # Targets' shape is (Nt, 3, Nv) with Nv = Num. voxels, Nt = Num. timepoints.
263
+ targets = (
264
+ ImageGrid (spatialimage ).index (
265
+ _as_homogeneous (transform .map (ref_ndcoords ), dim = _ref .ndim )
277
266
)
267
+ if targets is None
268
+ else targets
269
+ )
278
270
279
271
if targets .ndim == 2 :
280
272
targets = targets .T [np .newaxis , ...]
You can’t perform that action at this time.
0 commit comments