[vtkusers] Correct way to return input polydata as output from filter
andyjk
andrewkeeling at hotmail.com
Tue Nov 27 03:22:14 EST 2018
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
More information about the vtkusers
mailing list