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

BF: Small fixes

parent 366b0d2d
No related branches found
No related tags found
No related merge requests found
...@@ -637,14 +637,15 @@ def _readDisplacementField(group): ...@@ -637,14 +637,15 @@ def _readDisplacementField(group):
src, ref, pre, post, init, srcSpace, refSpace = _readNonLinearCommon(group) src, ref, pre, post, init, srcSpace, refSpace = _readNonLinearCommon(group)
field = np.array(group['Transform']) field = np.array(group['Transform'])
dtype = group['Representation'] dtype = group.attrs['Representation']
field = nonlinear.DisplacementField(field, field = nonlinear.DisplacementField(field,
src=src, src=src,
ref=ref, ref=ref,
srcSpace=srcSpace, srcSpace=srcSpace,
refSpace=refSpace, refSpace=refSpace,
dispType=dtype, dispType=dtype,
srcToRefMat=init) srcToRefMat=init,
xform=ref.voxToWorldMat)
return field return field
...@@ -660,7 +661,7 @@ def _writeDisplacementField(group, field): ...@@ -660,7 +661,7 @@ def _writeDisplacementField(group, field):
group.attrs['SubType'] = 'displacement' group.attrs['SubType'] = 'displacement'
group.attrs['Representation'] = field.displacementType group.attrs['Representation'] = field.displacementType
xform = np.field.data.astype(np.float64) xform = field.data.astype(np.float64)
group.create_dataset('Transform', data=xform) group.create_dataset('Transform', data=xform)
......
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