[vtkusers] VTK/TCL logfile manipulation: howto update at a given frequency?
Karthik Krishnan
karthik.krishnan at kitware.com
Wed Mar 12 14:34:24 EDT 2008
Look at the test TestInteractorTimers.cxx . VTK renderwindowinteractor
supports the API to create a repeating timer. You can create a command to
observe the timer event and respond. (What you are doing to respond better
be quick, unless you want to stop the timer and reschedule).
On 3/12/08, Graham E Voysey <gvoysey at infoscitex.com> wrote:
>
> Hello List,
>
> I'm using VTK to display a human avatar and manipulate its position.
> The intended user is a test subject in a motion study who will use a
> joystick to position the avatar so that it reflects how the user feels
> that they are moving.
>
> I've been asked to modify our script to include logging the camera
> orientation and position every 250ms. I've hit two areas that confuse
> me.
>
> 1. The script currently creates a log file with a hardcoded name. I'd
> like to change this so that the name of the file is
> <dateAndTimeFirstOpened>.log, so that logs are not accidentally
> overwritten.
>
> set logFile [open "GSV_log.log" w 0666]
>
> would replacing the above with something like
>
> set logFile [open "[clock format [clock seconds]].log" w 0666]
>
> be anything close to proper syntax?
>
> 2. I'm confused about how I would create a loop that would write a line
> to said logfile at a given time interval. What's a good way to think
> about this, or do it?
>
>
> Thanks,
>
> -graham
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080312/20043ae5/attachment.htm>
More information about the vtkusers
mailing list