[vtk-developers] ChartParallelCoordinates data switching
Marcus D. Hanwell
marcus.hanwell at kitware.com
Tue Sep 28 10:50:58 EDT 2010
On Tuesday 28 September 2010 10:45:29 Eric E. Monson wrote:
> Hey Marcus,
>
> In my application I was switching the data in a parallel coordinates chart
> and noticed that there are problems (and no intuitive solution) if you
> swap out the data to a new set which has less axes/columns. If you just do
> a chart.GetPlot(0).SetInput(table) with a new table that has less columns
> than the previous one you get a Segmentation Fault. (I'll put a short
> python script at the end that demonstrates this.)
>
> You can get around it by first turning off the visibility of all the
> current axes, since the plot relies on the column visibility data for its
> updating routines. (To see that this seems to work, set the if(False) to
> if(True) in the script.)
>
> In my custom version I just added a SetAllColumnsInvisible() method, which
> just does a this->VisibleColumns->SetNumberOfTuples(0); (plus a Modified
> and Update), and if I call this before resetting the data in the plot it
> seems to work fine. This name won't help people, though, since it's not
> obvious that you'd need to call this before swapping the data...
>
> So, I don't have the ideal solution, just one that's working for me, but I
> thought I'd bring this to your attention since it seems like something
> that should be addressed at some point.
Hi Eric,
I see why that would happen, I think a general solution would be to check if
the number of columns changed, and if it did to reset the visible columns.
Would this match your expectations? The question then becomes should all
columns be made visible by default, or none?
Marcus
--
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937
More information about the vtk-developers
mailing list