def image_to_texture ( image ) : vtex = vtk . vtkTexture ( ) vtex . SetInputDataObject ( image ) vtex . Update ( ) return vtex
python png to texture2d
Converts vtkImageData to a vtkTexture
def image_to_texture(image):
    """Converts ``vtkImageData`` to a ``vtkTexture``"""
    vtex = vtk.vtkTexture()
    vtex.SetInputDataObject(image)
    vtex.Update()
    return vtex