[vtkusers] deleting frame in vtk java frame
Elhassan Abdou
hassan.abdou at yahoo.com
Thu May 24 16:41:10 EDT 2012
Hi all
I am using vtkresliceimageviewer which is inherited from vtkImageViewer2 to produce MPR. I succeeded to create the three vtkCanvas and render on them.
The PROBLEM is there are another three old frames produced from the vtkResliceImageViewer and they are empty as the renderer of viewer now is directed to vtkcanvas. How i can delete them.
Below is the snippet of adding the viewers to the canvases;
imagestyle=new vtkInteractorStyleImage();
iren = sagitallCanvas.GetRenderWindow().GetInteractor();
iren.SetInteractorStyle(imagestyle);
sagittalViewer.SetRenderWindow(sagitallCanvas.GetRenderWindow());
sagittalViewer.SetRenderer(sagitallCanvas.GetRenderer());
//sagitallCanvas.GetRenderWindow().AddRenderer(sagittalViewer.GetRenderer());
sagittalViewer.SetupInteractor(iren);
//sagitallCanvas.GetRenderer().ResetCamera();
imagestyle=new vtkInteractorStyleImage();
iren = cronalCanvas.GetRenderWindow().GetInteractor();
iren.SetInteractorStyle(imagestyle);
cronalViewer.SetRenderWindow(cronalCanvas.GetRenderWindow());
cronalViewer.SetRenderer(cronalCanvas.GetRenderer());
//cronalCanvas.GetRenderWindow().AddRenderer(cronalViewer.GetRenderer());
cronalViewer.SetupInteractor(iren);
//cronalCanvas.GetRenderer().ResetCamera();
imagestyle=new vtkInteractorStyleImage();
iren = axialCanvas.GetRenderWindow().GetInteractor();
iren.SetInteractorStyle(imagestyle);
axialViewer.SetRenderWindow(axialCanvas.GetRenderWindow());
axialViewer.SetRenderer(axialCanvas.GetRenderer());
axialViewer.SetupInteractor(iren);
Best Regards
El-Hassan Mohamed
Biomedical engineering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120524/3ab52288/attachment.htm>
More information about the vtkusers
mailing list