[vtkusers] imageViewer size within QVTKWidget

David Gobbi david.gobbi at gmail.com
Fri Nov 28 09:02:20 EST 2014


Hi Richard,

It sounds like the vtkRenderWindow size is not being updated when the
QWidget size changes.  This could cause both the incorrect rendering and
the OpenGL error.  It probably happens only on the MacBook because the
small screen size forces an extra resize event.

Hopefully someone else on the list has seen this problem and can chime in
with a fix.

 - David

On Fri, Nov 28, 2014 at 4:46 AM, 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141128/2427f24f/attachment.html>


More information about the vtkusers mailing list