[vtkusers] QVTKWidget signal/slot question

John Eke johne at annidis.com
Wed Mar 18 21:06:07 EDT 2009


Thanks all. I am actually using Ubuntu 8.04 with compiz turned on. I will run some tests without it - thanks a lot.

And Clint I will also follow your suggestions. I currently have 100 ticks, didnt think it would be a problem though but without the ticks valueChanged will only be signaled after mouse up from the slider which isnt really the effect I am looking for


-----Original Message-----
From: Clinton Stimpson [mailto:clinton at elemtech.com]
Sent: Wed 3/18/2009 6:30 PM
To: John Eke
Cc: David Post; vtkusers at vtk.org
Subject: Re: [vtkusers] QVTKWidget signal/slot question
 

Perhaps moving the mouse in the graphics window to change window level 
skips levels that your QSlider approach doesn't skip.  Are you doing 
tracking with the QSlider with a high number of ticks forcing the render 
window to go through each level?

Consider doing some of the following if you aren't already.
Call QVTKWidget::update() instead of vtkRenderWindow::Render() in your slot.
Reduce the number of ticks on your QSlider to a practical number (for 
example, more ticks than your screen resolution probably isn't a good idea).
Turn tracking off and connect to the valueChanged() signal.

Or maybe its only a compiz related problem like others are warning about.

Clint

John Eke wrote:
> Hi,
>
> I currently have a Qt dialog with a slider. The valueChanged signal 
> from this slider is connected to a slot in my QVTKWidget subclass 
> which performs some Window-Level modifications on a vtkImageActor 
> inside the renderer.
>
> In the vtk example (Examples/GUI/Qt/ImageViewer) dragging the mouse 
> across the image is fast enough. So why does it get ridiculously slow 
> when I send the commands through a slot? Is there a way I can speed it up?
>
> - John E
> ------------------------------------------------------------------------
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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/20090318/52b26a12/attachment.htm>


More information about the vtkusers mailing list