Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
a473baa7
Commit
a473baa7
authored
Feb 23, 2021
by
Paul McCarthy
🚵
Browse files
BF: Handle de-generate case of a surface which contains a single triangle
parent
3c57660e
Changes
2
Hide whitespace changes
Inline
Side-by-side
fsl/data/gifti.py
View file @
a473baa7
...
...
@@ -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
)
...
...
fsl/data/mesh.py
View file @
a473baa7
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment