[vtkusers] Problem with vtkLegendActor with VTK 6 Python Wrappings
Gelman, Joshua
jgelman at decisionvis.com
Sun Aug 11 05:00:35 EDT 2013
Before I report this as a bug, I was just curious if anyone else could
confirm this or had any other insight. I'm still not sure if this is a bug
or a problem on my end. Basically, when I try to use vtkLegendActor in
Python, I get the following error:
ERROR: In ..\..\..\VTKSrc\Filters\General\vtkTransformPolyDataFilter.cxx,
line 84 vtkTransformPolyDataFilter (09ED64F8): No input data
It doesn't crash my program, but the error shows up in the console as many
number of times as self.legend.SetNumberOfEntries(n) is set. This same
error does NOT occur with my build of VTK 5.10.1.
Below is a sample program I threw together that generates the error on my
end. Any insight would be greatly appreciated.
Many thanks,
--Josh
#################################
import vtk
square = vtk.vtkCubeSource()
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputData(square.GetOutput())
legendBox = vtk.vtkLegendBoxActor()
legendBox.SetNumberOfEntries(1)
legendBox.SetEntry(0, square.GetOutput(), "Test", [1,1,0])
ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
ren.AddActor(legendBox)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin);
renWin.Render()
iren.Start()
#################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130811/506c790a/attachment.htm>
More information about the vtkusers
mailing list