[vtkusers] vtkWindowToImageFilter and vtkImageViewer
Wolfram H Volpi
whv88240 at Bayou.UH.EDU
Tue Nov 7 18:22:26 EST 2000
Please help me find why the viewer displays all black.
I suspect I a doing something wrong with vtkWindowToImageFilter.
The code is below:
#iren and iren_sub look good
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin2
iren Initialize
vtkRenderWindowInteractor iren_sub
iren_sub SetRenderWindow renWin2_sub
iren_sub Initialize
#modified from rtImageTclExamples.tcl and stCone.tcl
vtkWindowToImageFilter wtif
wtif SetInput renWin2
vtkWindowToImageFilter wtif_sub
wtif_sub SetInput renWin2_sub
#vtkImagePSNR imgDiff2
vtkImageDifference imgDiff2
imgDiff2 SetImage [wtif_sub GetOutput]
imgDiff2 SetInput [wtif GetOutput]
#view is black
vtkImageViewer view
view SetColorWindow 256
view SetColorLevel 128
view SetInput [imgDiff2 GetOutput]
view Render
Thank you for your help,
Wolfv.
More information about the vtkusers
mailing list