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

Method RecursiveProcess

IO/XML/Testing/Python/TestXMLHyperTreeGrid.py:189–204  ·  view source on GitHub ↗
(self, cursor, scalar, outMask)

Source from the content-addressed store, hash-verified

187 return 1
188
189 def RecursiveProcess(self, cursor, scalar, outMask):
190 if cursor.IsLeaf():
191 ind = cursor.GetGlobalNodeIndex()
192 if scalar.GetValue(ind) == self._selectValue:
193 discard = False
194 else:
195 discard = True
196 outMask.SetValue(ind, discard)
197 else:
198 discard = True
199 for ichild in range(cursor.GetNumberOfChildren()):
200 cursor.ToChild( ichild )
201 if not self.RecursiveProcess( cursor, scalar, outMask ):
202 discard = False
203 cursor.ToParent()
204 outMask.SetValue(cursor.GetGlobalNodeIndex(), discard)
205
206 def RequestData(self, vtkself, request, inInfo, outInfo):
207 inp = self.GetInputData(inInfo, 0, 0)

Callers 1

RequestDataMethod · 0.95

Calls 8

rangeClass · 0.50
IsLeafMethod · 0.45
GetGlobalNodeIndexMethod · 0.45
GetValueMethod · 0.45
SetValueMethod · 0.45
GetNumberOfChildrenMethod · 0.45
ToChildMethod · 0.45
ToParentMethod · 0.45

Tested by

no test coverage detected