[vtkusers] vtk video example problem

Leonid Dulman leonid_dulman at yahoo.co.uk
Fri Jun 18 01:36:03 EDT 2010

Hi vtk users
I tried to execute next simple example for video in VTK 5.6 Windows

package require vtktcl
#  renderWindow to display video and the video (640x480) fits the entire window.
# The following codes may help you to achieve the same thing. You need to make your
# renderWindow have a size of 640x480 first.

vtkImageReader2 mpeg
mpeg SetFileName random.mpg
mpeg Update

vtkVideoSource grabber
grabber SetInput [mpeg GetOutput]

vtkVideoSource  videoImageImport
videoImageImport  SetImportVoidPointer grabber
videoImageImport  SetWholeExtent  0  [expr 640-1]  0  [expr 480-1]  0  0
videoImageImport  SetDataExtentToWholeExtent
videoImageImport  SetDataScalarTypeToUnsignedChar
videoImageImport  SetNumberOfScalarComponents  3
videoImageImport  SetDataSpacing  1  1  1
videoImageImport  SetDataOrigin [expr  -640/2] [expr -480/2] 0 

vtkImageActor  videoImageActor
videoImageActor  SetInput [videoImageImport GetOutput]
vtkRenderer  videoRenderer
videoRenderer  AddActor videoImageActor

vtkCamera  videoCamera
videoCamera  SetPosition  0  0  500
videoCamera  SetClippingRange  1  1000
videoCamera  ComputeViewPlaneNormal
videoCamera  ParallelProjectionOn
videoCamera  SetParallelScale [expr 480/2]
videoRenderer SetActiveCamera videoCamera 

But got next message

ERROR: In ..\..\VTK\Filtering\vtkAlgorithm.cxx, line 742
vtkVideoSource (03DAED00): Attempt to connect input port index 0 for an algorithm with 0 input ports.

There is my mistake ? Thank you for any help. Leonid

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100618/9186247e/attachment.htm>

More information about the vtkusers mailing list