The selected dataset must be one of the following types (or a subclass of one of them): vtkRectilinearGrid, vtkPolyData.