vtkDataSet* output = input->NewInstance();<br><br>vtkDataSetAlgorithm::RequestDataObject() already does this though. You shouldn't need to. See that method for details.<br><br>-berk<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 6:35 AM, Fred Fred <span dir="ltr"><<a href="mailto:stan1313@hotmail.fr">stan1313@hotmail.fr</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>
My problem is as follow: I am writing a vtkDataSetAlgorithm filter and I need to create the ouput dataset, which must be of the same type as the input.<br>Is there a one-line way to do it, ie avoiding if (input->IsA("vtkPolyData") output=vtkPolyData::New(); else if ... ?<br>
<br>                                            <br><hr>Avec Internet Explorer, surfez en toute discrétion sur internet <a href="http://clk.atdmt.com/FRM/go/182932252/direct/01/" target="_blank">Cliquez ici !</a></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 ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>