htg.InitializeNonOrientedCursor(cursor, 5, True) cursor.SetGlobalIndexStart(offsetIndex) idx = cursor.GetGlobalNodeIndex() scalarArray.InsertTuple1(idx, 15) print('#', scalarArray.GetNumberOfTuples()) print('DataRange: ', scalarArray.GetRange()) isFilter = False # Depth Limiter Filter depth = None if True: print('With Depth Limiter Filter (HTG)') depth = vtk.vtkHyperTreeGridDepthLimiter() depth.SetInputData(htg) depth.SetDepth(1) isFilter = True else: print('Without Depth Limiter Filter (HTG)') depth = htg # Threshold Filter threshold = None if True: print('With Threshold Filter (HTG)') threshold = vtk.vtkHyperTreeGridThreshold() if isFilter: threshold.SetInputConnection(depth.GetOutputPort()) else:
# ROOT CELL 11 htg.InitializeNonOrientedCursor(cursor, 11, True) cursor.SetGlobalIndexStart(offsetIndex) idx = cursor.GetGlobalNodeIndex() scalarArray.InsertTuple1(idx, 12) print('#',scalarArray.GetNumberOfTuples()) print('DataRange: ',scalarArray.GetRange()) isFilter = False # Depth Limiter Filter depth = None if True: print('With Depth Limiter Filter (HTG)') depth = vtk.vtkHyperTreeGridDepthLimiter() depth.SetInputData(htg) depth.SetDepth(2) isFilter = True else: print('Without Depth Limiter Filter (HTG)') depth = htg # Threshold Filter threshold = None if True: print('With Threshold Filter (HTG)') threshold = vtk.vtkHyperTreeGridThreshold() if isFilter: threshold.SetInputConnection(depth.GetOutputPort()) else: