only import vtk classes that were used

This commit is contained in:
Christoph Kords 2013-05-06 16:55:44 +00:00
parent 2371bd9f57
commit 278198121d
1 changed files with 13 additions and 3 deletions

View File

@ -2,9 +2,19 @@
# -*- coding: utf-8 -*-
#
from optparse import OptionParser, Option
from vtk import *
import os,numpy,string,math
from optparse import OptionParser, Option
from vtk import vtkUnstructuredGridReader, \
vtkWarpVector, \
vtkCellCenters, \
vtkDataSetSurfaceFilter, \
vtkPoints, \
vtkCellArray, \
vtkVertex, \
vtkPolyData, \
vtkSelectEnclosedPoints, \
vtkKdTree, \
vtkIdList
# -----------------------------
@ -294,7 +304,7 @@ for filename in filenames:
vertex.GetPointIds().SetId(0,i) # each vertex consists of exactly one (index 0) point with ID "i"
vertices.InsertNextCell(vertex)
pointgrid = vtk.vtkPolyData()
pointgrid = vtkPolyData()
pointgrid.SetPoints(points)
pointgrid.SetVerts(vertices)
pointgrid.Update()