diff --git a/fsl/data/gifti.py b/fsl/data/gifti.py index d75c73a79a1f66d2fb8617848d48d4e11f7e9a36..077b7c4e14eea3c84064b45d9d69f9253a5ed742 100644 --- a/fsl/data/gifti.py +++ b/fsl/data/gifti.py @@ -229,7 +229,7 @@ def loadGiftiMesh(filename): 'at least one pointset array'.format(filename)) vertices = [ps.data for ps in pointsets] - indices = triangles[0].data + indices = np.atleast_2d(triangles[0].data) if len(vdata) == 0: vdata = None else: vdata = prepareGiftiVertexData(vdata, filename) diff --git a/fsl/data/mesh.py b/fsl/data/mesh.py index b03a628e2eec368f592a1d84a913b1302d9e2d00..b31e101e4ec4c4d2b0359c42c3fe10a21e01853e 100644 --- a/fsl/data/mesh.py +++ b/fsl/data/mesh.py @@ -687,7 +687,7 @@ def calcFaceNormals(vertices, indices): fnormals = np.cross((v1 - v0), (v2 - v0)) fnormals = affine.normalise(fnormals) - return fnormals + return np.atleast_2d(fnormals) def calcVertexNormals(vertices, indices, fnormals):