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
Michiel Cottaar
fslpy
Commits
9274adf9
Commit
9274adf9
authored
Jan 10, 2018
by
Paul McCarthy
🚵
Browse files
Added trimesh property to Mesh class.
parent
8e974faf
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/mesh.py
View file @
9274adf9
...
...
@@ -27,6 +27,8 @@ import numpy as np
import
six
import
trimesh
import
fsl.utils.transform
as
transform
from
.
import
image
as
fslimage
...
...
@@ -121,6 +123,11 @@ class TriangleMesh(object):
if
fixWinding
:
self
.
__fixWindingOrder
()
self
.
__trimesh
=
trimesh
.
Trimesh
(
self
.
__vertices
,
self
.
__indices
,
process
=
False
,
validate
=
False
)
def
__repr__
(
self
):
"""Returns a string representation of this ``TriangleMesh`` instance.
...
...
@@ -147,6 +154,14 @@ class TriangleMesh(object):
return
self
.
__indices
@
property
def
trimesh
(
self
):
"""Reference to a ``trimesh.Trimesh`` object which can be used for
geometric operations on the mesh.
"""
return
self
.
__trimesh
def
__fixWindingOrder
(
self
):
"""Called by :meth:`__init__` if ``fixWinding is True``. Fixes the
mesh triangle winding order so that all face normals are facing
...
...
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