<br><br><div class="gmail_quote">On Wed, Nov 10, 2010 at 11:48 AM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div></div><div class="h5"><div><div>On Nov 10, 2010, at 10:24 AM, Jeff Baumes wrote:</div><br><blockquote type="cite">On Wed, Nov 10, 2010 at 8:56 AM, Xinghua Lou <span dir="ltr"><<a href="mailto:xinghua.lou@iwr.uni-heidelberg.de" target="_blank">xinghua.lou@iwr.uni-heidelberg.de</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br>
<br>
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.<br>
<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Jeff</div></div></blockquote><br></div></div></div><div>If you want certain parts of the graph to not exist any more and have the layout adjust accordingly, then follow Jeff's advice.</div><div><br>
</div><div>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.</div>
<div><br></div></div></blockquote><div><br></div><div>To keep the layout the same, you could also do the following pipeline:</div><div><br></div><div>graph -> vtkGraphLayout -> vtkExtractSelectedGraph -> vtkGraphLayoutView</div>
<div><br></div><div>Then in the view, set the layout strategy to "pass through". This will keep the same layout you manually performed with vtkGraphLayout, even when you change the selection in vtkExtractSelectedGraph.</div>
<div><br></div><div>Jeff</div><div><br></div></div>