[vtkusers] Love pipeline? Hate pipeline?

Leon Chen liming.leon at gmail.com
Fri Jul 29 14:20:30 EDT 2005


Hi all,

The pipeline in VTK is really a nice mechanisim for the visualization,
and it is quite easy. For example, the filter, you just need to set
the input, then get the output, when it is rendered, everything will
be done automatically.

But, sometimes I am really annoyed by this pipeline...or maybe I am
just too bad to manipulate it...

For example, there is a vtkPolyData - poly1, and a polytopolyfilter-
filter1, I have set the input of the filter1 to poly1, no problem.
so  filter1->getoutput() is the output of the filter

Now I want to modify filter1->getoutput(), but maybe something else use this...

How can I make a copy of the filter1->getoutput()? I tried the
deepcopy, but didn't work. Then I tried to vtkPolyData *poly2 =
filter1->getoutput(). I just modify the poly2, everything went well
now. But I haven't tested if the filter1->getoutput() was changed --
in C++ I think the '=' just give poly2 the address of
filter1->getoutput(), isn't it? it is a pointer.

In other words, the pipeline connects the data very tightly, then what
can i do if i want them become not so dependent? such as add a
temporary data of a very short life time?


Any helpful idea is welcome, thank you!


Leon



More information about the vtkusers mailing list