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
1b97e99a
Commit
1b97e99a
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Mesh.__init__ accepts fixWinding for initial vertex set.
parent
91148e64
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/data/mesh.py
+9
-1
9 additions, 1 deletion
fsl/data/mesh.py
fsl/data/vtk.py
+6
-3
6 additions, 3 deletions
fsl/data/vtk.py
with
15 additions
and
4 deletions
fsl/data/mesh.py
+
9
−
1
View file @
1b97e99a
...
...
@@ -136,7 +136,12 @@ class Mesh(notifier.Notifier, meta.Meta):
"""
def
__init__
(
self
,
indices
,
name
=
'
mesh
'
,
dataSource
=
None
,
vertices
=
None
):
def
__init__
(
self
,
indices
,
name
=
'
mesh
'
,
dataSource
=
None
,
vertices
=
None
,
fixWinding
=
False
):
"""
Create a ``Mesh`` instance.
Before a ``Mesh`` can be used, some vertices must be added via the
...
...
@@ -151,6 +156,9 @@ class Mesh(notifier.Notifier, meta.Meta):
:arg vertices: Initial vertex set to add - given the key
``
'
default
'
``.
:arg fixWinding: Ignored if ``vertices is None``. Passed through to the
:meth:`addVertices` method along with ``vertices``.
"""
self
.
__name
=
name
...
...
This diff is collapsed.
Click to expand it.
fsl/data/vtk.py
+
6
−
3
View file @
1b97e99a
...
...
@@ -60,9 +60,12 @@ class VTKMesh(fslmesh.Mesh):
raise
RuntimeError
(
'
All polygons in VTK file must be
'
'
triangles ({})
'
.
format
(
infile
))
fslmesh
.
Mesh
.
__init__
(
self
,
indices
,
name
,
dataSource
)
self
.
addVertices
(
data
,
'
default
'
,
fixWinding
=
fixWinding
)
fslmesh
.
Mesh
.
__init__
(
self
,
indices
,
name
,
dataSource
,
vertices
=
data
,
fixWinding
=
fixWinding
)
def
loadVTKPolydataFile
(
infile
):
...
...
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