Correct way to return input polydata as output from filter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Correct way to return input polydata as output from filter

andyjk
Basics please!

I have a function:
void foo(vtksmartpointer<vtkpolydata>& in_out);

In foo I run several filters in a pipeline, starting with in_out as an
input.

My first question:
To return the modified in_out, currently I create a temporary polydata, get
the final filter output, then deepcopy temporary to in_out. Is this the best
way?

Second question:
I find if I don't pass smartpointer by reference, things don't work. This
can be shown with the VTK test for normals demo too (which passes
polydata*). I have to change to referenced smartpointers to get the results
of the function to persist. Somehow I think this is wrong?





--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers