Hi David D.,<br><br>If I understood well, you write VTK pipeline inside a VTK filter. If so, I also do that *very* often. My way avoids to get the input data, just connects the input:<br>blend-&gt;AddInputconnection( this-&gt;GetInputConnection( ) ); // &#39;this&#39; being your vtkAlgorithm-derived filter.<br>
<br>Secondly, I read with interest the thread in which David G. taught about VTK pipelining. And I don&#39;t think he would have your head for using the old-fashioned SetInput method. It is just like... old-fashioned, but you don&#39;t &quot;touch&quot; at the data. It is unfair because you add some -maybe- unuseful static cast, but the integrity of the pipeline is still preserved.<br>
<br>David G. can you confirm my feelings?<br><br>Jerome<br><br><div class="gmail_quote">2009/12/15 David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The first thing I typically do (and I got this by looking at existing<br>
filters) at the beginning of a RequestData() is:<br>
<br>
 vtkInformation *inInfo = inputVector[0]-&gt;GetInformationObject(0);<br>
  vtkImageData *input = vtkImageData::SafeDownCast(<br>
      inInfo-&gt;Get(vtkDataObject::DATA_OBJECT()));<br>
<br>
However, now I have an actual object, so I have to do things like the following:<br>
<br>
  vtkSmartPointer&lt;vtkImageBlend&gt; blend = vtkSmartPointer&lt;vtkImageBlend&gt;::New();<br>
  //blend-&gt;AddInputConnection(input-&gt;GetOutputPort()); //can&#39;t do this<br>
because &#39;input&#39; is not an algorithm output<br>
  blend-&gt;AddInput(input);<br>
<br>
David G. would have my head for this! How should this be done instead?<br>
<br>
Thanks,<br>
<br>
David D.<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>
</blockquote></div><br>