[vtkusers] recent change in vtkImageViewer2 in cvs
Clinton Stimpson
clinton at elemtech.com
Fri Mar 13 14:08:41 EDT 2009
Can you give a complete example and image? I took your code and added a
main and my own image, and it behaved well.
Someone else had an almost identical example and the image centered and
sized wrong.
So that's what was fixed. The fact that you say viewer->Render()
changes the size means the necessary code is kicking in, but I'm not
sure why it would only take up 5%.
Clint
Bryn Lloyd wrote:
> Hi
>
>
> Since the recent CVS change in vtkImageViewer2 the behavior has
> slightly changed (for the worse in my opinion). But I might be doing
> something wrong.
>
> Before the viewer would display the image covering approximately 80%
> of the render window. Since my last cvs update (yesterday) it is so
> small that it covers maybe 5% of the render window...
>
> If I don't call viewer->Render(), then I get the original size (until
> I interact with the viewer: then it resizes the image down to 5%).
>
> My code looks like this:
>
> QApplication app( argc, argv );
> QVTKWidget widget;
> widget.resize(512,512);
>
> widget.SetRenderWindow(viewer->GetRenderWindow());
> viewer->SetInput( image );
> viewer->SetupInteractor(widget.GetRenderWindow()->GetInteractor());
> viewer->Render();
>
> widget.show();
> app.exec();
>
>
> Am I doing something wrong? What can I do to make the image "closer"?
> Does anybody else experience this?
>
> I am using cvs VTK on Debian Linux and Qt 4.4.1
>
>
> --Bryn
> _______________________________________________
> 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
More information about the vtkusers
mailing list