[Paraview-developers] Filter/pipeline design question - any helpful hints?
cobo
cornelis.bockemuehl at gmail.com
Sat Nov 5 06:53:16 EDT 2016
Good morning all,
Since a couple of weeks I am developing a set of custom filters for some
speciai purpose, and it's amazing how quickly I could manage to achieve
rather good results: add data attributes to models, convert from points to
some grid, etc.! But now I want to perform some more complicated
computations and visualize the results.
Input to my filter is an unordered grid, with every cell having a couple of
attributes. Coloring them by attribute nicely is a great built in feature of
Paraview already!
The filter will add one additional attribute (data array) to the model. This
attribute is not really a number, but only "on" or "off", like 0 or 1.
That's no problem. But in addition to visualizing ANY of the attributes I
now want to have the possibility to visualize this new attribute with some
kind of flag: some pattern, dot, frame on the cell faces that could be black
or white, to be still easily visible among the colors that represent any
other attribute. This pattern would be either on or off, depending on the
new attribute.
Actually I want to see this additional attribute even if I generate a cut
through the model - which makes the job not easier.,.
So far I understand that this is not currently an option in Paraviev, so
some kind of "workaround" would be required, and I do not know which one
would be best. Two variants I am thinking about, but both have their very
clear disadvantages also. Both require the generation of a second 3d
geometry from the first and contain only "items" (unordered grid cells of
different size) at points where the new attribute is 1.
>From then on I see two options:
1. Make this second model a completely independent second model, like a
second output from the filter. The user would be able to turn it on or off,
and color it in a completely independent way from the first. If both models
would be turned on, it would look like there is the first model with some
"patterns" on the faces - which is what I wanted to achieve.
Disadvantage: If I apply a cut filter on the first model, the second would
still be fully 3d - or I manage to apply another cut filter to it as well.
For the user this is a bit tedious because he would have to manage the two
cut planes such that they are identical.
2. Generate one single multi-part model, with the second just another "part"
of the first. This solves the problem with the cut view, and it is still
possible to turn visualization of the parts on or off individually. However,
now I have a problem with the independent coloring of the two parts: So far
I did not find a way to say that part 1 should be colored according to
attribute X and part 2 should be colored in black, white or whatever else I
would define.
Another disadvantage of the second option is the fact that it generates a
much more complex geometrical setup.
I also tried already to achieve the coloring by using a 1-pixel texture for
making part 2 all one color and exclude part 1 by simply not providing
texture coordinates. This works, but disappears if I apply a cut, so not
much gained in comparison to the much simpler option 1...
3. As a 3-rd option I could imagine that there are possibilities that I did
not understand yet that would make my job much easier than I thought?
4. Derive a new cut filter that takes two input ports and works on both
simultaneously...(??)
It is to say that I am an experienced programmer (which is why I am so
quickly "starting" with paraview filters), but I am still rather new to
paraview, reading a lot in the docs, trying around...
Thanks for any helpful hints, considerations or tipps!
Cornelis
--
View this message in context: http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/Filter-pipeline-design-question-any-helpful-hints-tp4865.html
Sent from the The Unofficial ParaView Developers Forum mailing list archive at Nabble.com.
More information about the Paraview-developers
mailing list