compatibility for vtk 6 and 5