[vtkusers] vtkGraph

Jeff Baumes jeff.baumes at kitware.com
Wed Sep 9 10:50:22 EDT 2009


>
> I don't understand this function:
>
> void vtkGraph::AddEdgePoint (vtkIdType e, double x[3])
>>
>> Adds a point to the end of the list of edge points for a certain edge..
>>
> is an edge allowed to have more than 2 points?
>
"edge points" are only for extra points in an edge (e.g. to make
curved/routed edges). When converted to lines, edges always start/end at the
vertex location. What you are looking for is vtkGraph::GetPoints(), which
returns a vtkPoints structure that contains the locations of each vertex.

You may want to look at the classes ending with "LayoutStrategy" under
Infovis. These are modules that can be plugged into vtkGraphLayout.

> Also, is there a min cut / max flow function?
>
There is not currently a VTK algorithm for it, but you can use a vtkGraph as
an input to any Boost algorithm by including "vtkBoostGraphAdapter.h". The
Boost Graph Library does contain a min cut / max flow algorithm. See the
implementation of some filters like vtkBoostBreadthFirstSearch for an idea
of how to adapt a vtkGraph to Boost.

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090909/322e6d68/attachment.htm>


More information about the vtkusers mailing list