[vtkusers] PerformAlgorithm in Infovis and missing vertex labels
Jeff Baumes
jeff.baumes at kitware.com
Tue Jan 6 09:11:30 EST 2009
The dynamic labeler in the graph layout view will only work with
labels constrained to a plane. vtkLabeledDataMapper is a simple
labeler that labels all data points in 2D or 3D, but will create a lot
of clutter if you have many vertices in your graph. There is a
prototype dynamic 3D labeller (which does not allow overlaps) called
vtkLabelPlacer. It requires that you perform vtkLabelSizeCalculator to
determine the size of the labels, and that you also use
vtkPointSetToLabelHierarchy to build a data structure used for placing
your labels. See Rendering/Testing/Cxx/TestLabelPlacer.cxx for an
example on how to use it. In that example, points of a vtkPolyData are
labeled, but it can be done that same way for a vtkGraph also.
You may also want to consider using vtkGraphMapper instead of the code
in PerformAlgorithm. It rolls the glyphing and other filters for
displaying a graph into one place, and should simplify your code.
Jeff
On Mon, Jan 5, 2009 at 1:58 PM, Aytekin Vargun <varguna at gmail.com> wrote:
> Hello,
> I need to display the graphs I construct in 3D. Since the vtkGraphLayoutView
> provides layouts for only 2D view, I am using the "PerformAlgorithm" in the
> infovis directory to display graphs in 3D. But "PerformAlgorithm" does not
> display vertex labels (whereas graphLayoutView does it). What modifications
> do I need to do on "PerformAlgorithm" to achieve this?
>
> Also is this a good way of displaying graphs? In the future, we will let
> users to update the graph (add/delete vertices and edges). Therefore,
> vertices and edges should be pickable and updates need to be reflected
> accordingly.
>
> Thanks a lot for your time and help.
>
> --
> My web page: http://www.cs.rpi.edu/~vargua
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 371-3971 x132
jeff.baumes at kitware.com
More information about the vtkusers
mailing list