[Paraview-developers] Where does the vtkSelection come from?

Cornelis Bockemühl cornelis.bockemuehl at gmail.com
Tue Jan 17 11:45:29 EST 2017


All day I am already struggling now with some possibly very "simple"
problem: I am trying to write a filter that applies some operations only to
selected cells of an "unstructured grid".

I am taking the "extract selection" filter as an example. This filter takes
the "data" stuff at input port 0 and a vtkSelection object at input port 1,
then does the proper processing. However, from a user perspective the
filter is attached to one single input data set with selections. Like
exactly the unstructured grid with some cells selected: I can easily
extract them with the "extract selection" filter - and I do not have to
specify a second data item for input port 1!

But if I am simulating exactly the code in the server XML (specifying two
input ports, for "input" and "selection"), then copying all the relevant
stuff from the cxx files of vtkPVExtractSelection.cxx,
vtkExtractSelection.cxx and vtkExtractSelecitonBase.cxx - I do not get the
same behaviour!

Instead I am getting exactly what I would have expected otherwise: my
filter asks for a second input data item - but what should I choose? And
then it stops because indeed it does not find any vtkSelection data object
at port 1.

While the latter looks somehow logical to me I still wonder how the extract
seleciton filter does the apparent "magic" of having that selection object
at port 1 for further processing!

Any hint where I should have a look into the code, or what else I might
have forgotten?

As I said I simulated the server XML and the cxx code, but now I guess that
maybe there are still other places in the code where I should have a look??

Thanks in advance for any helpful hints!
Cornelis

-- 
Cornelis Bockemühl
Basel, Schweiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170117/d4c3c2aa/attachment.html>


More information about the Paraview-developers mailing list