[vtkusers] Help writing a filter..

David E DeMarle dave.demarle at kitware.com
Mon Mar 26 09:24:45 EDT 2012


Keep a vtkPolyData * internal variable with the class, and shallow
copy the output you produce in RequestData into that to use next time
around.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Sun, Mar 25, 2012 at 10:33 PM, Ricardo Villegas <ricvilleg at gmail.com> wrote:
> Hello,
>
> I'm writing a filter that receives an input polydata and produces its
> respective output polydata. However, the filter relies in recovering the
> output's point geometry every time the RequestData is invoked after the
> first time, in a similiar way vtkPolyDataSilhouette filter does, for
> changing the output points' coordinates.
>
> I noticed that after first time, every time the filter's RequestData is
> called the output data is lost or missing, so I can't call i.e.
> output->GetPoints( ), because the list of points is empty.
>
> Is there a way I can preserve the output data the filter generates so I can
> directly access and manipulate it in consecutive RequestData calls?
>
> Thanks in advance,
>
> Ricardo
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list