[vtkusers] vtkRenderLargeImage and vtkTextActor

Christian Pfaffel-Janser flash at itp.tu-graz.ac.at
Mon Jun 20 04:55:41 EDT 2005


Hello all!

When I use vtkRenderLargeImage and vtkTextActor, I see that the text
is replicated in each tile. The code looks like this:


####################### snip ######################
from vtkpython import *

sphere = vtk.vtkSphereSource()
sphereMapper = vtk.vtkPolyDataMapper()
sphereMapper.SetInput(sphere.GetOutput())
sphereActor = vtk.vtkActor()
sphereActor.SetMapper(sphereMapper)

textActor = vtk.vtkTextActor()
textActor.SetInput("This is a sphere")

ren = vtk.vtkRenderer()
ren.AddActor2D(textActor)
ren.AddActor(sphereActor)

renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)

iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.Initialize()
iren.Start()


renderLarge = vtkRenderLargeImage()
renderLarge.SetInput(ren)
renderLarge.SetMagnification(4)

pswriter = vtkPNMWriter()
pswriter.SetFileName("t.pnm")
pswriter.SetInput(renderLarge.GetOutput())
pswriter.Write()
####################### snip ######################

I am using version 4.4.2 and I would appreciate any hint or help on
what I can do to obtain only a single line of text.

Regards and thanks,
Christian

-- 
Dipl.-Ing. Christian Pfaffel-Janser <flash at itp.tugraz.at>
Technische Universität Graz                 Telefon: +43 / 316 / 873 - 81 90
Institut für Theoretische Physik            Telefax: +43 / 316 / 873 - 86 78
Petersgasse 16, A-8010 Graz           http://itp.tugraz.at/~flash/pubkey.gpg



More information about the vtkusers mailing list