Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
9274adf9
Commit
9274adf9
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Added trimesh property to Mesh class.
parent
8e974faf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/mesh.py
+15
-0
15 additions, 0 deletions
fsl/data/mesh.py
with
15 additions
and
0 deletions
fsl/data/mesh.py
+
15
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment