[vtkusers] render two Windows

x0_y0_0 x0_y0_0 at 126.com
Thu May 7 23:29:12 EDT 2009


hi,vtkusers,
 
        I restruct 3D CT,and render it on MFC dialog.I extract a reslice using vtkImageReslice ,and then render it on the same dialog.I could see the two ones in the dialog at the sanme time,but when I close the window there is vtkoutputWindow and qiuckly disappear. Could anyone help me ? thanks
 
 render = vtkRenderer::New();
 render->SetBackground(0.1,0.2,0.4);
 renWin = vtkRenderWindow::New();
 renWin->AddRenderer(render);
 iren = vtkRenderWindowInteractor::New();
 iren->SetRenderWindow(renWin);
render->AddVolume(newvol);
 
void CVTK::VTKToDialog(CStatic * aStatic)
{
 CRect rect;
 aStatic->GetClientRect(&rect);
 renWin->SetSize(rect.Width(),rect.Height());
 renWin->SetParentId(aStatic->m_hWnd);
 renWin->Render();    
}
 
 
regards,
                                                                                                mexiao

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090508/ed98c894/attachment.htm>


More information about the vtkusers mailing list