I want to read the cell id inside vtkUnstructuredGrid.But vtkCellPicker works very slowly.I want to use vtk to implement the “hover cells on” function of paraview software in vtkUnstructuredGrid to get the cell id. But I don’t know how this function is implemented in paraview, so how can I migrate it to other python code?
this is my old python code,It runs very slowly when the number of cells is large:
picker = vtk.vtkCellPicker()
picker.Pick(clickPos[0], clickPos[1], 0, self.GetDefaultRenderer())
iSel = picker.GetCellId() # very slow
But I found that the “hover cells on” function in paraview reads the cell id very fast.How is it achieved?