[vtkusers] About vtk's renderization window.
Brenno Ribeiro
brennobr at gmail.com
Mon Apr 9 17:25:38 EDT 2012
How to avoid that vtk's renderization window appears? What happens is that
I use the widget from QVTKWidget and because it i don't need anymore the
window created from vtk to rendering the image but I can't to cut some
points where I think this window will disappear because it influences on
the image that widget loads. I'm pasting here the code snippet since the
criation of "vtkImageActor" until the transform of the image to widget. If
you need anymore information to help me it's just to say.
vtkImageActor *viewer = vtkImageActor::New();
vtkImageCast *cast = vtkImageCast::New();
cast->SetInput(connector->GetOutput());//information about the image
cast->SetOutputScalarTypeToUnsignedChar();
viewer->SetInput(cast->GetOutput());
vtkRenderer *ren1= vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
renWin->SetSize( 600, 600 );
ren1->AddActor(viewer);
ren1->SetBackground(0.4,0.6,0.8);
renWin->AddRenderer( ren1 );
ren1->ResetCamera();
ren1->GetActiveCamera()->Zoom(1.5);
renWin->Render();
renWin->SetStereoTypeToDresden();
iren->GetRenderWindow()->Finalize();//doesn't help to close window
iren->TerminateApp();////doesn't help to close the window
widget->SetRenderWindow(renWin);//end of transform of the image to widget
--
Brenno Bernardes Ribeiro
Engenharia da Computação
Universidade Federal do Pará
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120409/c10fc0db/attachment.htm>
More information about the vtkusers
mailing list