[vtkusers] Graph visualization features in VTK

Steffen Oeltze stoeltze at isg.cs.uni-magdeburg.de
Wed Jan 26 05:33:59 EST 2011


Hi,

>>         DearAll,
>>
>>         I plan to evaluate VTK for graph visualization and I wonder
>>         whether it provides the features listed below.
>>         For some features, I already found information online.
>>
>>         - modifying the edge thickness/width according to some edge
>>         weight (???)
>>
>>
>>     Not currently possible. To stress certain edges I normally use a
>>     color map for edges that changes their opacity based on the weight.
>>
>     Using the opacity is also a good idea. However, I just discovered
>     the vtkGraphToPolyData class which should provide access to the
>     edge geometry. Maybe, by using, e.g., vtkRibbonFilter, I will be
>     able to change the edge width? I wonder how this would influence
>     the edge picking in the view.
>
>
> Absolutely. If you want to use the lower-level filters like 
> vtkGraphToPolyData, all sorts of other opportunities open up. Ribbons 
> or tubes could be used to change the width based on a metric. But you 
> are correct that then you don't get picking for free like you do in 
> vtkGraphLayoutView. As long as you have a cell or point data array 
> that indicates which edge the geometry came from, you should be able 
> to use the picker classes in VTK without too much trouble.

I toyed around a bit with the above mentioned ribbons and tubes. 
However, I was wondering if there is a more simple method to replace 
lines as edges by my own 2D primitive. For example, would it be possible 
to derive my own class from the class that draws the graph and then, 
overwrite the method that does the actual painting? So far, I was not 
able to find the class that does the line drawing in the graph but I 
discovered a promising example: 
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Charts/Cxx/vtkGraphItem.cxx 
(Paint()-function). Any thoughts on that are very welcome.

Best Regards,
Steffen


-- 
Dr.-Ing. Steffen Oeltze
Department of Simulation and Graphics, School of Computer Science
Otto-von-Guericke-University Magdeburg

Universitätsplatz 2, 39106 Magdeburg
GERMANY

Phone:  (+49-391) 67-1 25 27
Fax:    (+49 391) 67-1 11 64
Email:  stoeltze at isg.cs.uni-magdeburg.de
Web:    http://www.vismd.de/

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


More information about the vtkusers mailing list