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 :<br>
<br>* the next time the filter updates the output will be replaced<br><br>* more than one thing can be connected to a given filter's output, so changing the output or its contents will cause inconsistency<br><br clear="all">
David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x109<br>
<br><br><div class="gmail_quote">On Tue, Sep 15, 2009 at 6:23 PM, John Platt <span dir="ltr"><<a href="mailto:jcplatt@dsl.pipex.com">jcplatt@dsl.pipex.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,<br>I am having trouble moving an output between
filters using SetOutput() as follows.</font></div>
<div><br><font face="Arial" size="2">1. Single filter, f1.<br>
vtkPolyData* myOutput = vtkPolyData::New();</font></div>
<div><font face="Arial" size="2">
<div><font face="Arial" size="2"> f1->SetOutput( myOutput
);</font></div>
<div> </div> vtkAppendPolyData* myAppend =
vtkAppendPolyData::New();</font></div>
<div><font face="Arial" size="2"> myAppend->AddInput( myOutput
);</font></div>
<div><font face="Arial" size="2"></font><font face="Arial" size="2"></font><font face="Arial" size="2"></font><br><font face="Arial" size="2">"myOutput" is displayed
correctly.</font></div><font face="Arial"></font>
<div><br><font face="Arial" size="2">2. Append filter f2 to
f1.<br> f1->SetOutput( 0 );<br>
f2->SetInputConnection( f1->GetOutputPort() );<br>
f2->SetOutput( myOutput );</font></div><font face="Arial" size="2">
<div><br>"myOutput" does not appear to see the changes made by filter
f2.<br></div>
<div>3. Remove filter f2.<br>
f 2->Delete();<br> f1->SetOutput( myOutput
);<br></div>
<div>ERROR: In
/home/john/VTK/vtk-5.4.2/VTK/Filtering/vtkStreamingDemandDrivenPipeline.cxx,
line 747<br>vtkStreamingDemandDrivenPipeline : No maximum number of pieces has
been set in the information for output port 0 on algorithm vtkf1"<br></div>
<div>Any help on using SetOutput() would be greatly appreciated.</div>
<div> </div>
<div>Thanks.</div>
<div> </div><font color="#888888">
<div>John.</div></font></font></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>