[vtkusers] vtkImageMapper and vtkPolyDataMapper
Alexander Fiksel
alexf at coherentsolutions.com
Fri Mar 26 23:38:19 EST 2004
For some reason, the vtkImageMapper prevents vtkPolyDataMapper to be
displayed on Windows XP computers.
Here is the test code
********************************
package require vtk
package require vtkinteraction
package require vtktesting
vtkImageEllipsoidSource ellipse
vtkImageMapper mapImage
mapImage SetInput [ellipse GetOutput]
mapImage SetColorWindow 255
mapImage SetColorLevel 127.5
vtkActor2D img
img SetMapper mapImage
// This line shows up on Windows 2000, but doesn't appear on XP
vtkLineSource line
line SetPoint1 0 0 0
line SetPoint2 100 100 0
vtkPolyDataMapper2D lineMapper
lineMapper SetInput [ line GetOutput]
vtkActor2D lineActor
lineActor SetMapper lineMapper
vtkRenderer ren1
ren1 AddActor2D lineActor
ren1 AddActor2D img
vtkRenderWindow renWin
renWin AddRenderer ren1
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
iren AddObserver UserEvent {wm deiconify .vtkInteract} renWin Render
iren Initialize wm withdraw .
******************************
On Windows 2000 the line shows just fine. On Windows XP the line is
absent. If I remove the image actor, the line becomes visible. Any ideas
why?
Alex
More information about the vtkusers
mailing list