[vtkusers] Infovis: Changing layout strategy parameters
Wylie, Brian
bnwylie at sandia.gov
Thu Dec 18 13:50:49 EST 2008
Hi Eric,
Good to hear from you!
To be perfectly honest many of the graph algorithms where 'thrown' together and could probably use some clean up on comments/API/etc. If you have some suggestions for improvements or would like to submit a patch, we would be quite receptive. :)
Brian Wylie - Org 1424
Sandia National Laboratories
MS 1323 - Building CSRI/242
(505)844-2238 FAX(505)284-2518
_______ __
/_ __(_) /_____ _____
/ / / / __/ __ `/ __ \
/ / / / /_/ /_/ / / / /
/_/ /_/\__/\__,_/_/ /_/
Informatics Toolkit
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Jeff Baumes
Sent: Thursday, December 18, 2008 10:31 AM
To: Eric E. Monson
Cc: VTK Mailing List
Subject: Re: [vtkusers] Infovis: Changing layout strategy parameters
vtkGraphLayout has the following check before "starting over"
if (this->StrategyChanged ||
input != this->LastInput ||
input->GetMTime() > this->LastInputMTime)
It will start from randomly jittered positions from the input (in your case the input to vtkGraphLayout probably has all vertex locations at the origin) if this test passes. Otherwise it will use the current positions in the *output*, without jittering them. So if you want to totally start over, you can call Modified() on layout->GetInput().
Jeff
On Thu, Dec 18, 2008 at 11:42 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hey Jeff,
>
> When I call Modified() on the GraphLayout and update the pipeline it
> continues from where it was in the layout process, just with more
> iterations. If I also call Initialize() for the LayoutStrategy it
> resets to the initial temp and decay, but still starts with the
> current positions of the vertices, which is what I wanted -- thanks
> for getting me on the right track!
>
> How does the LayoutStrategy (in these density grid based schemes)
> decide whether to start with random points or not? Will it detect
> whether the graph has non-zero coordinates assigned already, or is
> there some flag that can be set?
>
> Thanks,
> -Eric
>
>
> On Dec 18, 2008, at 9:48 AM, Jeff Baumes wrote:
>
>>> Why do the docs say "The strong recommendation is that you do not
>>> change this parameter" for things like initial temperature and cool
>>> down rate on layout strategies like Fast2D?
>>
>> You certainly may play around with these parameters. Those values
>> were just found to be "good" in practice, where the layout is part of
>> an interactive application and you want the layout to complete
>> relatively quickly.
>>
>>> Instead of changing these parameters, is there a way to tell the
>>> layout strategy to give the graph another "kick" from the current
>>> state (rather than from the initial random layout) once it thinks
>>> the layout is complete?
>>
>> Try this: call Modified() on the vtkGraphLayout instance, then update
>> the pipeline again. It should not start from scratch, but should
>> instead start with the current positions of the graph.
>>
>> Jeff
>
>
--
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 371-3971 x132
jeff.baumes at kitware.com
_______________________________________________
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
More information about the vtkusers
mailing list