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

BF: Transform->affine changes. Make sure we don't generate an empty affine for

coefficient fields
parent c20e7c85
No related branches found
No related tags found
No related merge requests found
...@@ -337,9 +337,9 @@ class Nifti(notifier.Notifier, meta.Meta): ...@@ -337,9 +337,9 @@ class Nifti(notifier.Notifier, meta.Meta):
# get the shape/size of the coefficient # get the shape/size of the coefficient
# field about right # field about right
knotpix = header.get_zooms()[:3] knotpix = header.get_zooms()[:3]
refpix = (header.get('intent_p1', 1), refpix = (header.get('intent_p1', 1) or 1,
header.get('intent_p2', 1), header.get('intent_p2', 1) or 1,
header.get('intent_p3', 1)) header.get('intent_p3', 1) or 1)
voxToWorldMat = affine.concat( voxToWorldMat = affine.concat(
affine.scaleOffsetXform(refpix, 0), affine.scaleOffsetXform(refpix, 0),
affine.scaleOffsetXform(knotpix, 0)) affine.scaleOffsetXform(knotpix, 0))
......
...@@ -69,7 +69,7 @@ class MGHImage(fslimage.Image): ...@@ -69,7 +69,7 @@ class MGHImage(fslimage.Image):
self.__voxToSurfMat = vox2surf self.__voxToSurfMat = vox2surf
self.__surfToVoxMat = affine.invert(vox2surf) self.__surfToVoxMat = affine.invert(vox2surf)
self.__surfToWorldMat = affine.concat(affine, self.__surfToVoxMat) self.__surfToWorldMat = affine.concat(xform, self.__surfToVoxMat)
self.__worldToSurfMat = affine.invert(self.__surfToWorldMat) self.__worldToSurfMat = affine.invert(self.__surfToWorldMat)
......
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