[Paraview] Instanciating an unknown type

Berk Geveci berk.geveci at kitware.com
Fri Feb 19 06:38:50 EST 2010


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 <stan1313 at hotmail.fr> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100219/a766872d/attachment-0001.htm>


More information about the ParaView mailing list