[vtkusers] Re : Visualize the same object in 2 different windows

C. Hiba hiba_vtk at yahoo.fr
Thu Jun 5 06:07:18 EDT 2008


Hi JohnMark. I'm Hiba.
Thank you for your help but i'm not sure that code will resolve my problem.
I visualize a 3D image in the first renderWindow of my application. I want to "import" the same image to the second renderWindow by clikcing in a buttom for example.
=> read the image form the first window and visualize it in the second
I hope i explained more the problem and i'm waiting for your help.
Thank you 


--- En date de : Jeu 5.6.08, JohnMark <zhaojunxp at hotmail.com> a écrit :

De: JohnMark <zhaojunxp at hotmail.com>
Objet: Visualize the same object in 2 different windows
À: hiba_vtk at yahoo.fr
Date: Jeudi 5 Juin 2008, 1h25




#yiv21845435 .hmmessage P
{
margin:0px;padding:0px;}
#yiv21845435  .hmmessage
{
FONT-SIZE:9pt;FONT-FAMILY:Tahoma;}

Hi,
  I don't know what's your name. maybe you need two renderers in the same render window, and then you could render two different volumes in them.
  you can do like this :
  vtkRenderWindow * renWin = vtkRenderWindow::New();
  vtkRenderer * ren1 = vtkRenderer::New();
  vtkRenderer * ren2 = vtkRenderer::New();
    renWin->AddRenderer(ren1);
    renWin->AddRenderer(ren2);
    
    // your original pipeline
    ... ...
 
    ren1->SetViewport(   0,   0,  0.5,  1);
    ren2->SetViewport(0.5,   0,     1,  1);
    ... ...
    renWin->Render();
  
  using this, you could divide the whole render window into two parts, and then you could do what you want to in the two different renderer. 
  hope this could help you.
  Mark



用 Windows Live Spaces 展示个性自我,与好友分享生活! 了解更多信息! 

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080605/63307aed/attachment.htm>


More information about the vtkusers mailing list