Commit 23ff16c8 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: DeformationField.transform works with single set of coords

parent 0e5e0aa7
......@@ -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):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment