[vtkusers] Refresh issue with QVTKWidget

Guillaume Dumont rippalka at gmail.com
Mon Jun 9 12:24:32 EDT 2014


I would really appreciate any help because I really don't see where it can
go wrong.
Thanks in advance!


On Mon, Jun 9, 2014 at 12:23 PM, Guillaume Dumont <rippalka at gmail.com>
wrote:

> Hi all,
>
> I am coming for help after searching a solution for a long time that I
> cannot seem to figure out.
>
> To put my problem in context, I am using QVTKWidget from VTK 6.1 inside
> one of the widgets I wrote. I decided not to use the QVTKWidget directly
> but rather hide it from the user of the widget. My class looks like it:
>
> ​class MyWidget: public QWidget
> {
>    ...
> public:
>    // my overkill render method that I call after a change in my scene
>    void updateRender()
>    {
>
>         this->m_vtkRenderer->GetRenderWindow()->Render();
>  this->m_vtkRenderer->GetRenderWindow()->GetInteractor()->Render();
>  m_vtkWidget->update();
> m_vtkWidget->updateGeometry();
>  this->update();
>  this->updateGeometry();
>    }
> protected:
>    QVTKWidget* m_vtkWidget;
> };​
>
> ​Now the problem: when the camera location is changed programatically
> (reset or specific position)​, only the middle rectangle is rendered. Until
> I resize the window or play with the renderer enough, the full renderwindow
> is rendered.
>
> Here is what it looks like (sorry, the model is zoomed in):
> After the camera is set programmatically: http://i.imgur.com/s4a1rOr.png
> After moving the window: http://i.imgur.com/2Gg4jBE.png
>
>
>
> --
> Guillaume
>



-- 
Guillaume Dumont
Kremlin-Bicêtre, France
Email: me at guillaumedumont.com
EPITA SCIA 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140609/2d528798/attachment.html>


More information about the vtkusers mailing list