<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Hi Sebastien,</span></div><div><br></div><div>There is a window created by vtkResliceImageViewer and I moved the renderwindow to be in vtkCanvas.</div><div>So I want to delete this window produced vtkRelsiceImageViewer.&nbsp;</div><div>I can say that this window is produced from openglframe work because it has a title Cocoa#1 on my mac and on other linux pc has a title openglWindow#1.</div><div><br></div><div>I have not tried what Clemens said in previous reply on this e-mail yet, but I may try it soon.</div><div><br></div><div>Any help will be more than useful</div><div><br></div><div>Best</div><div>&nbsp;<br></div><div>El-Hassan Mohamed <br>Biomedical engineering<br></div>  <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times,
 serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Sebastien Jourdain &lt;sebastien.jourdain@kitware.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Elhassan Abdou &lt;hassan.abdou@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" &lt;vtkusers@vtk.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, May 25, 2012 2:21 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [vtkusers] deleting frame in vtk java frame<br> </font> </div> <br>
Sorry I don't get what you mean by delete and what you try to delete.<br>If that helps, you can look at the vtk/java code in the sample package<br>of the vtk.jar.<br><br>On Thu, May 24, 2012 at 4:41 PM, Elhassan Abdou &lt;<a ymailto="mailto:hassan.abdou@yahoo.com" href="mailto:hassan.abdou@yahoo.com">hassan.abdou@yahoo.com</a>&gt; wrote:<br>&gt; Hi all<br>&gt;<br>&gt; I am using vtkresliceimageviewer which is inherited from vtkImageViewer2 to<br>&gt; produce MPR. I succeeded to create the three vtkCanvas and render on them.<br>&gt; The PROBLEM is there are another three old frames produced from the<br>&gt; vtkResliceImageViewer and they are empty as the renderer of viewer now is<br>&gt; directed to vtkcanvas. How i can delete them.<br>&gt;<br>&gt; Below is the snippet of adding the viewers to the canvases;<br>&gt; imagestyle=new vtkInteractorStyleImage();<br>&gt; iren = sagitallCanvas.GetRenderWindow().GetInteractor();<br>&gt;
 iren.SetInteractorStyle(imagestyle);<br>&gt; sagittalViewer.SetRenderWindow(sagitallCanvas.GetRenderWindow());<br>&gt; sagittalViewer.SetRenderer(sagitallCanvas.GetRenderer());<br>&gt; //sagitallCanvas.GetRenderWindow().AddRenderer(sagittalViewer.GetRenderer());<br>&gt; sagittalViewer.SetupInteractor(iren);<br>&gt; //sagitallCanvas.GetRenderer().ResetCamera();<br>&gt; imagestyle=new vtkInteractorStyleImage();<br>&gt; iren = cronalCanvas.GetRenderWindow().GetInteractor();<br>&gt; iren.SetInteractorStyle(imagestyle);<br>&gt; cronalViewer.SetRenderWindow(cronalCanvas.GetRenderWindow());<br>&gt; cronalViewer.SetRenderer(cronalCanvas.GetRenderer());<br>&gt; //cronalCanvas.GetRenderWindow().AddRenderer(cronalViewer.GetRenderer());<br>&gt; cronalViewer.SetupInteractor(iren);<br>&gt; //cronalCanvas.GetRenderer().ResetCamera();<br>&gt;<br>&gt; imagestyle=new vtkInteractorStyleImage();<br>&gt; iren = axialCanvas.GetRenderWindow().GetInteractor();<br>&gt;
 iren.SetInteractorStyle(imagestyle);<br>&gt; axialViewer.SetRenderWindow(axialCanvas.GetRenderWindow());<br>&gt; axialViewer.SetRenderer(axialCanvas.GetRenderer());<br>&gt; axialViewer.SetupInteractor(iren);<br>&gt;<br>&gt; Best Regards<br>&gt;<br>&gt; El-Hassan Mohamed<br>&gt; Biomedical engineering<br>&gt;<br>&gt; _______________________________________________<br>&gt; Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; http://www.kitware.com/opensource/opensource.html<br>&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt;<br><br><br> </div> </div>  </div></body></html>