[vtk-developers] ChartParallelCoordinates data switching

Eric E. Monson emonson at cs.duke.edu
Tue Sep 28 12:54:43 EDT 2010


One more thing, sort of related:

this->Storage->CurrentAxis needs to be reset to -1 when the data changes, too, or sometimes with the Paint routine will try to access an axis that doesn't exist (and it will seem like a strange random crash and it will take someone an hour to track down what's happening... :)

Do you want me to file a bug report for these two combined so it'll be easier to keep track of?

Thanks,
-Eric

On Sep 28, 2010, at 11:49 AM, Eric E. Monson wrote:

> Hey Marcus,
> 
> Yes, I think that would work. I guess my preference would be to default to all of the columns visible by default. If people try to put too many columns in the plot (not that I'm doing that... no, no...), then they have to decide, anyway, which ones are really important, and it's unlikely that the first 10 are going to necessarily be the right choice. (Plus, it screwed me up for a little while not understanding why all of my data wasn't showing up.)
> 
> Thanks,
> -Eric
> 
> On Sep 28, 2010, at 10:50 AM, Marcus D. Hanwell wrote:
> 
>> 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
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list