[vtkusers] Using standard icons with vtkButtonWidget look edgy and aliased.

Eleftherios Garyfallidis garyfallidis at gmail.com
Tue Jul 14 19:13:23 EDT 2015


Hello all,

I am using the button widget with the texture button representation in the
following way:

image1 = vtk.vtkPNGReader()

image1.SetFileName('infinity.png')

image1.Update()


 button_rep = vtk.vtkTexturedButtonRepresentation2D()

button_rep.SetNumberOfStates(2)

button_rep.SetButtonTexture(0, image1.GetOutput())

button_rep.SetButtonTexture(1, image1.GetOutput())


 button = vtk.vtkButtonWidget()

button.SetInteractor(iren)

button.SetRepresentation(button_rep)

....


The input file is a standard 32x32 PNG icon from icomoon.


Currently I am getting this result. See for example the top right corner
with the

infinity symbol.


https://dl.dropboxusercontent.com/u/2481924/Screenshot%20from%202015-07-14%2018%3A51%3A52.png


You will notice that it looks edgy and not smooth.


How can I improve the rendering of this icon? So that it looks smoother
with less aliasing?

What is provided by VTK for this purpose?


Best regards,

Eleftherios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150714/befe36d4/attachment.html>


More information about the vtkusers mailing list