[vtkusers] Error using SetOutput()

David E DeMarle dave.demarle at kitware.com
Wed Sep 16 13:34:03 EDT 2009


Are you sure you want to SetOutput? For the most part (that is everywhere
other than within the filter which typically gets its own output from the
executive and populates it) , filter outputs shouldn't be messed with for
two reasons :

* the next time the filter updates the output will be replaced

* more than one thing can be connected to a given filter's output, so
changing the output or its contents will cause inconsistency

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Tue, Sep 15, 2009 at 6:23 PM, John Platt <jcplatt at dsl.pipex.com> wrote:

>  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.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090916/fb5d7156/attachment.htm>


More information about the vtkusers mailing list