James Percival

My Github Pages material

Last updated : 30th August 2018

Adding a logo to a ParaView window


The vtkLogoWidget class exists to allow logo insertion in standard VTK render instances, but what about in ParaView? It turns out you can still use it fine. Run the following script in the ParaView python shell, or even make it a macro!

from paraview.simple import *
import vtk 

image = vtk.vtkPNGReader()
image.SetFileName('Logo.png')
image.Update()

rep = vtk.vtkLogoRepresentation()
rep.SetImage(image.GetOutput())

widget = vtk.vtkLogoWidget()
widget.SetRepresentation(rep)
widget.SetInteractor(GetRenderView().GetInteractor())
widget.On()

tags: paraview