MCPcopy Create free account
hub / github.com/Kitware/VTK / _getAttr

Function _getAttr

Utilities/vtk2xml.py:69–85  ·  view source on GitHub ↗
(reader, lst, attr='Scalars')

Source from the content-addressed store, hash-verified

67
68
69def _getAttr(reader, lst, attr='Scalars'):
70 p_a = []
71 c_a = []
72
73 for i in lst:
74 eval('reader.Set%sName(i)'%attr)
75 reader.Update()
76 o = reader.GetOutput()
77 pd = o.GetPointData()
78 cd = o.GetCellData()
79 s = eval('pd.Get%s()'%attr)
80 if s and (s not in p_a):
81 p_a.append(s)
82 s = eval('cd.Get%s()'%attr)
83 if s and (s not in c_a):
84 c_a.append(s)
85 return p_a, c_a
86
87
88def setAllAttributes(reader):

Callers 1

setAllAttributesFunction · 0.85

Calls 6

evalFunction · 0.50
UpdateMethod · 0.45
GetOutputMethod · 0.45
GetPointDataMethod · 0.45
GetCellDataMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected