vtkDataSet* output = input->NewInstance();

vtkDataSetAlgorithm::RequestDataObject() already does this though. You
shouldn't need to. See that method for details.

-berk

On Fri, Feb 19, 2010 at 6:35 AM, Fred Fred <[email protected]> wrote:

>  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.
> Is there a one-line way to do it, ie avoiding if (input->IsA("vtkPolyData")
> output=vtkPolyData::New(); else if ... ?
>
>
> ------------------------------
> Avec Internet Explorer, surfez en toute discrétion sur internet Cliquez
> ici ! <http://clk.atdmt.com/FRM/go/182932252/direct/01/>
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to