forked from gacevedobolton/myVTKPythonLibrary
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfilterPDataIntoUGrid.py
32 lines (24 loc) · 1.14 KB
/
filterPDataIntoUGrid.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### University of California at San Francisco (UCSF), USA ###
### Swiss Federal Institute of Technology (ETH), Zurich, Switzerland ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
import vtk
import myVTKPythonLibrary as myVTK
########################################################################
def filterPDataIntoUGrid(
pdata,
verbose=1):
myVTK.myPrint(verbose, "*** filterPDataIntoUGrid ***")
filter_append = vtk.vtkAppendFilter()
if (vtk.vtkVersion.GetVTKMajorVersion() >= 6):
filter_append.SetInputData(pdata)
else:
filter_append.SetInput(pdata)
filter_append.Update()
return filter_append.GetOutput()