[vtk-developers] PCoords rectangles slow in Python w/lots of axes

Eric E. Monson emonson at cs.duke.edu
Tue Apr 27 14:50:31 EDT 2010


Here's the patch that should take care of the autoscaling issue: 

diff --git a/Charts/vtkChartParallelCoordinates.cxx b/Charts/vtkChartParallelCoordinates.cxx
index 66510ec..7dac117 100644
--- a/Charts/vtkChartParallelCoordinates.cxx
+++ b/Charts/vtkChartParallelCoordinates.cxx
@@ -134,9 +134,12 @@ void vtkChartParallelCoordinates::Update()
       array->GetRange(range);
       }
     vtkAxis* axis = this->Storage->Axes[i];
-    axis->SetMinimum(range[0]);
-    axis->SetMaximum(range[1]);
-    axis->SetTitle(this->VisibleColumns->GetValue(i));
+    if (axis->GetBehavior() == 0)
+      {
+      axis->SetMinimum(range[0]);
+      axis->SetMaximum(range[1]);
+      axis->SetTitle(this->VisibleColumns->GetValue(i));
+      }
     }
   this->Storage->AxesSelections.clear();
 

On Apr 27, 2010, at 2:31 PM, Marcus D. Hanwell wrote:

> Hi Eric,
> 
> Sorry - I didn't get chance to look into this, but I was surprised it would cause issues. If you have any patches you would like me to merge/look at please let me know.
> 
> Thanks,
> 
> Marcus
> 
> On Tue, Apr 27, 2010 at 2:29 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
> Hey Marcus,
> 
> I don't know if there was just something weird going on that day, or if something has changed, but I'm not having trouble with this any more. (I'm playing now with a slightly modified version of the PC chart and plot, but I don't think the small changes I made impacted the performance.)
> 
> Sorry for the noise,
> -Eric
> 
> 
> On Apr 22, 2010, at 5:13 PM, Eric E. Monson wrote:
> 
> > Hey Marcus,
> >
> > Not something urgent, but just a note so you know: When making selections in a parallel coordinates chart that has a lot of axes (say 16 or 24) in Python, the drawing of the red selection rectangle is fairly slow. It's still useable, but it's quite noticeably slower than when I have a lot of axes in ParaView (which is quite snappy). The leading edge of the rectangle lags behind the cursor, and then eventually catches up.
> >
> > I'm not sure why this would be -- something about the drawing operation or some checks it has to do after each mouse move... I only mention it because if you know about it maybe something will jump out at you in the code that could be done differently.
> >
> > I know I still haven't gotten around to filing those other feature requests... I can add this if you want, too, and attach an example script.
> >
> > Talk to you later,
> > -Eric
> >
> > _______________________________________________
> > 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
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100427/2300d28e/attachment.html>


More information about the vtk-developers mailing list