[vtkusers] Questions about vtkGraphLayoutView
emlidal
emlidal at broadpark.no
Tue Jul 3 05:40:45 EDT 2012
Thank you for your reply Jeff. I have some follow up questions if I may.
Jeff Baumes wrote
>
> Endre,
>
> On Thu, Jun 28, 2012 at 8:28 AM, emlidal <emlidal@> wrote:
>
>> 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?
>>
>
> This is not directly supported. One approach would be to look into
> vtkRenderedGraphRepresentation and replace the glyph filter with your own
> filter that will produce a textured image at each desired location.
>
I've had a peek into vtkRenderedGraphRepresentation before and it was a
little confusing to understand what to change. As far as I can see I think
that I need to create a new filter to replace the vtkGraphToGlyphs filter in
vtkRenderedGraphRepresentation, is this correct?
Jeff Baumes wrote
>
> 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
>>
>
> The tree layout does not support this. You are free to run
> vtkTreeLayoutStrategy manually, get the output, and tweak the positions,
> or
> create a subclass of vtkTreeLayoutStrategy that performs how you want it
> to. If you run the graph layout yourself, make sure to set the layout
> strategy to PassThrough on the representation, which will not run any
> additional layout.
>
I'll think I'll go for the subclassing, is there any reason for not doing
that?
Endre
--
View this message in context: http://vtk.1045678.n5.nabble.com/Questions-about-vtkGraphLayoutView-tp5714286p5714410.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list