[vtkusers] alternative to vtkTable for use with vtkChartXY

Luke hazelnusse at gmail.com
Mon Sep 26 14:21:18 EDT 2011


I'm making a simple GUI application to plot in quasi-realtime about 12
time signals that are being measured and transmitted to my laptop via
a serial connection. I was looking at the QChartTable example, and it
seems more or less fine, but I realized that in order to have a
"window" of data, so that N samples are shown in the vtkChartXY, I
will need to delete rows from the top of the vtkTable once it has more
than N rows.  I looked at the RemoveRow() method, and this will do
what I want, but I noticed that this is implemented in a way that
makes copies of each row and shifts them up, one at a time.  This
seems really inefficient.  Also, there seems to be now way to remove
more than one row at a time.   I had intended on updating the plot at
much lower frequency than the data sample rate, so ideally I would
remove somewhere around the top 10 rows, and then at 10 new rows to
the bottom, which would result in 10 RowRemove() calls.

Is there something more like an STL queue that I can use instead of
vtkTable?  Or is vtkTable the only way to connect data to a
vtkChartXY?  Are there any options to It would be nice to have
something that I could push new data into the back and pop old data
off the front, and feed this to vtkChartXY.

Thanks
~Luke

-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759



More information about the vtkusers mailing list