[vtkusers] imageViewer size within QVTKWidget

David Gobbi david.gobbi at gmail.com
Sat Nov 29 16:27:44 EST 2014


Hi Nick, Richard,

It's possible that VTK is being asked to render before Qt is ready.  If
this is the case, you might be able to fix it by putting guards around the
call to Render in QVTKWidget.cxx, i.e. by replacing this (around line 475):

  iren->Render();

with this:

  if (updatesEnabled() && isVisible())
    {
    iren->Render();
    }

I'm not sure if it will work, but it might be worth a try.

 - David


On Sat, Nov 29, 2014 at 11:01 AM, Nick Patterson <pattersonnp at gmail.com>
wrote:

> I similarly see this problem and and have not yet found the resolution.
> Information at the bottom of the page associated with:-
>
> http://www.vtk.org/Wiki/VTK/OpenGL_Errors
>
> highlights this Mac specific problem, but is next to useless in actually
> explaining the problem since they don't indicate exactly what is meant by
> "restructure your code".
>
> If you find a solution, please let me know.
>
> Nick.
>
>
> > On 28 Nov 2014, at 11:46, mbcx9rb9 <richard.j.brown at live.co.uk> wrote:
> >
> > I am creating a DICOM viewer, which works fine on my Mac Thunderbolt
> display
> > but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom
> > ~quarter of the QVTKWidget. The relevant part of my code looks like this:
> >
> > *    imageViewer->SetInputConnection(reader->GetOutputPort());
> >    imageViewer->SetRenderWindow(qvtk->GetRenderWindow());
> >    imageViewer->Render();
> >    qvtk->show();*
> >
> > I also get these errors showing, but they do not cause the program to
> crash
> > (and only display for the first object I render for each run of the
> > program):
> >
> > *ERROR: In
> >
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx,
> > line 1202
> > vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors
> detected
> >  0 : (1286) Invalid framebuffer operation
> >
> >
> > ERROR: In
> >
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
> > line 574
> > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1
> OpenGL
> > errors detected
> >  0 : (1286) Invalid framebuffer operation
> >
> >
> > ERROR: In
> >
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,
> > line 574
> > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1
> OpenGL
> > errors detected
> >  0 : (1286) Invalid framebuffer operation*
> >
> > Not sure if the two errors are linked, but any help would be appreciated.
> > Thanks
> >
> >
> >
> > --
> > View this message in context:
> http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.html
> > Sent from the VTK - Users mailing list archive at Nabble.com.
> > _______________________________________________
> > 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://public.kitware.com/mailman/listinfo/vtkusers
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141129/2e741629/attachment.html>


More information about the vtkusers mailing list