Skip to content
Snippets Groups Projects
Commit 23ff16c8 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: DeformationField.transform works with single set of coords

parent 0e5e0aa7
No related branches found
No related tags found
No related merge requests found
......@@ -251,7 +251,9 @@ class DeformationField(NonLinearTransform):
if from_ is None: from_ = self.refSpace
if to is None: to = self.srcSpace
coords = np.asanyarray(coords)
coords = np.asanyarray(coords)
outshape = coords.shape
coords = coords.reshape((-1, 3))
# We may need to pre-transform the
# coordinates so they are in the
......@@ -299,7 +301,7 @@ class DeformationField(NonLinearTransform):
outcoords = np.full(coords.shape, np.nan)
outcoords[voxmask] = disps
return outcoords
return outcoords.reshape(outshape)
class CoefficientField(NonLinearTransform):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment