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->AddInputconnection( this->GetInputConnection( ) ); // 'this' 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't think he would have your head for using the old-fashioned SetInput method. It is just like... old-fashioned, but you don't "touch" 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"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></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]->GetInformationObject(0);<br>
vtkImageData *input = vtkImageData::SafeDownCast(<br>
inInfo->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<vtkImageBlend> blend = vtkSmartPointer<vtkImageBlend>::New();<br>
//blend->AddInputConnection(input->GetOutputPort()); //can't do this<br>
because 'input' is not an algorithm output<br>
blend->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>