[vtkusers] VTK for tree visualization: how to modify the visibility of individual vertex/edge

Eric E. Monson emonson at cs.duke.edu
Wed Nov 10 11:48:22 EST 2010


On Nov 10, 2010, at 10:24 AM, Jeff Baumes wrote:

> On Wed, Nov 10, 2010 at 8:56 AM, Xinghua Lou <xinghua.lou at iwr.uni-heidelberg.de> wrote:
> Dear all,
> 
> I am developing some Infovis applications based on VTK by following the TreeLayout.cxx example in VTK/Examples/Infovis. One problem I have now is that I don' know how to modify the visibility of certain vertex or edge. I tried to google this question but can not find a clear answer. Can anyone give me some hints? Any suggestion is highly appreciated. Thank you.
> 
> 
> There is no direct way to do this in VTK at the view level. You may instead filter the graph to prune vertices/edges (see vtkExtractSelectedGraph) and display the resulting graph in the view.
> 
> Jeff

If you want certain parts of the graph to not exist any more and have the layout adjust accordingly, then follow Jeff's advice.

If you want the layout to stay the same (so all vertices and edges still exist) but just have some vertices or edges disappear, you might be able to create a view theme to color the elements with a lookup table where some attribute value gets mapped to alpha = 0 so they become transparent. Then you just need to change the attribute values on the edges and vertices so those elements disappear when you want them to.

-Eric


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101110/062ba469/attachment.htm>


More information about the vtkusers mailing list