<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi vtk users<br>I tried to execute next simple example for video in VTK 5.6 Windows<br><br>package require vtktcl<br># renderWindow to display video and the video (640x480) fits the entire window.<br># The following codes may help you to achieve the same thing. You need to make your<br># renderWindow have a size of 640x480 first.<br><br>vtkImageReader2 mpeg<br>mpeg SetFileName random.mpg<br>mpeg Update<br><br>vtkVideoSource grabber<br>grabber SetInput [mpeg GetOutput]<br><br>vtkVideoSource videoImageImport<br>videoImageImport SetImportVoidPointer grabber<br>videoImageImport SetWholeExtent 0 [expr 640-1] 0 [expr 480-1] 0 0<br>videoImageImport SetDataExtentToWholeExtent<br>videoImageImport SetDataScalarTypeToUnsignedChar<br>videoImageImport SetNumberOfScalarComponents
3<br>videoImageImport SetDataSpacing 1 1 1<br>videoImageImport SetDataOrigin [expr -640/2] [expr -480/2] 0 <br><br>vtkImageActor videoImageActor<br>videoImageActor SetInput [videoImageImport GetOutput]<br>vtkRenderer videoRenderer<br>videoRenderer AddActor videoImageActor<br><br>vtkCamera videoCamera<br>videoCamera SetPosition 0 0 500<br>videoCamera SetClippingRange 1 1000<br>videoCamera ComputeViewPlaneNormal<br>videoCamera ParallelProjectionOn<br>videoCamera SetParallelScale [expr 480/2]<br>videoRenderer SetActiveCamera videoCamera <br><br>But got next message<br><br>ERROR: In ..\..\VTK\Filtering\vtkAlgorithm.cxx, line 742<br>vtkVideoSource (03DAED00): Attempt to connect input port index 0 for an algorithm with 0 input ports.<br><br>There is my mistake ? Thank you for any help. Leonid<br></td></tr></table><br>