diff --git a/fsl/data/mesh.py b/fsl/data/mesh.py index 2bc563b877f7c50d21f13ebfab505c64cb73d376..ee0681a213237391a9d9906191fb13557b0d109e 100644 --- a/fsl/data/mesh.py +++ b/fsl/data/mesh.py @@ -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 diff --git a/fsl/data/vtk.py b/fsl/data/vtk.py index 1a05070ee77d58b76fd907f22417393ecf45dca2..e34d4146dd0d1fe9828783782f9524ec89964596 100644 --- a/fsl/data/vtk.py +++ b/fsl/data/vtk.py @@ -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):