[vtkusers] Error using SetOutput()

John Platt jcplatt at dsl.pipex.com
Tue Sep 15 18:23:59 EDT 2009


Hi,
I am having trouble moving an output between filters using SetOutput() as follows.

1. Single filter, f1.
    vtkPolyData* myOutput = vtkPolyData::New();
    f1->SetOutput( myOutput );

    vtkAppendPolyData* myAppend =  vtkAppendPolyData::New();
    myAppend->AddInput( myOutput );

"myOutput" is displayed correctly.

2. Append filter f2 to f1.
    f1->SetOutput( 0 );
    f2->SetInputConnection( f1->GetOutputPort() );
    f2->SetOutput( myOutput );

"myOutput" does not appear to see the changes made by filter f2.

3. Remove filter f2.
    f 2->Delete();
    f1->SetOutput( myOutput );

ERROR: In /home/john/VTK/vtk-5.4.2/VTK/Filtering/vtkStreamingDemandDrivenPipeline.cxx, line 747
vtkStreamingDemandDrivenPipeline : No maximum number of pieces has been set in the information for output port 0 on algorithm vtkf1"

Any help on using SetOutput() would be greatly appreciated.

Thanks.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090915/3465e1ed/attachment.htm>


More information about the vtkusers mailing list