[vtkusers] Questions about vtkGraphLayoutView

emlidal emlidal at broadpark.no
Thu Jun 28 08:28:07 EDT 2012


Dear all.
I've been experimenting a little with vtkGraphLayoutView in order to
visualize and interact with a (small) tree-graph. I'm working in c++ and
using VTK 5.8.

I've manage to get the basic stuff up and running, i.e., construct a
vtkGraph and visualize it. I've also managed to add interaction, so that I
can select one or more of the nodes in the graph, from this example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Graphs/SelectedVerticesAndEdges .
For simplicity we can say the nodes in the tree represent images and the
tree represent some relationship between these images.

However I have some questions that I cannot find answer to, not in the
documentation, the examples or reading the source code.

1. Is it possible to use my own "glyph" for the graph nodes? Today I'm using
my own vtkRenderedGraphRepresentation and there I set the glyph type (using
SetGlyphType(...)), in my case I use glyph type 2. However, what really I
want is to be able to specify my own glyph type, in my case an shrunken
image of the image stored at each graph node. Is this possible, and if so
any hints of how do I go about to accomplish this?

2. Is it possible to specify uneven distance between the nodes in the graph
layout? Say for instance that my tree has only two branches and one branch
as double the amount of nodes than the other branch, something like this:
       O
      / \
     O  O
     |   |
     O  O
     |
     O
     |
     O

Is it possible to render the graph so that the leaf nodes of the two
branches are on the same "depth-level"? Something like this:
       O
      / \
     O  O
     |   |
     O  |
     |   |
     O  |
     |   |
     O  O

3. The interaction/selection style I'm using is based on
vtkInteractorStyleRubberBand2D and this is nice for making a rectangular
selection in the graph. However, I want to make a freeform lasso selection,
i.e., draw a closed curve around the nodes I want to select (and, thus, not
be limited to rectangular selection only). Is there a lasso
interaction/selection style I have missed or are there any examples of how
to implement this myself?

Sincerely,
Endre
 

--
View this message in context: http://vtk.1045678.n5.nabble.com/Questions-about-vtkGraphLayoutView-tp5714286.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list