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

Method RequestData

IO/XML/Testing/Python/TestXMLHyperTreeGrid.py:206–223  ·  view source on GitHub ↗
(self, vtkself, request, inInfo, outInfo)

Source from the content-addressed store, hash-verified

204 outMask.SetValue(cursor.GetGlobalNodeIndex(), discard)
205
206 def RequestData(self, vtkself, request, inInfo, outInfo):
207 inp = self.GetInputData(inInfo, 0, 0)
208 out = self.GetOutputData(outInfo, 0)
209 out.ShallowCopy(inp)
210
211 scalar = inp.GetPointData().GetArray('scalar')
212 assert(scalar)
213
214 outMask = vtkBitArray()
215 outMask.SetNumberOfTuples(out.GetNumberOfVertices())
216
217 cursor = vtkHyperTreeGridNonOrientedCursor()
218 for treeId in range(inp.GetMaxNumberOfTrees()):
219 inp.InitializeNonOrientedCursor( cursor, treeId )
220 self.RecursiveProcess( cursor, scalar, outMask )
221
222 out.SetMask( outMask )
223 return 1
224
225myAlgo = MyAlgorithm()
226myAlgo.SetSelectValue(1) # 1 or -1

Callers

nothing calls this directly

Calls 14

RecursiveProcessMethod · 0.95
GetNumberOfVerticesMethod · 0.80
GetMaxNumberOfTreesMethod · 0.80
vtkBitArrayClass · 0.50
rangeClass · 0.50
GetInputDataMethod · 0.45
GetOutputDataMethod · 0.45
ShallowCopyMethod · 0.45
GetArrayMethod · 0.45
GetPointDataMethod · 0.45

Tested by

no test coverage detected