<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>can you check the code that I added in which i am changing the rendering window and renderer to the one in the canvas and tell if there is something wrong in it.</span></div><div><span>After this code I begin to load the data and enable the widget interaction</span></div><div><span><br></span></div><div><span><span class="Apple-style-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; ">magestyle=new vtkInteractorStyleImage();<br>>> iren = sagitallCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> sagittalViewer.SetRenderWindow(sagitallCanvas.GetRenderWindow());<br>>> sagittalViewer.SetRenderer(sagitallCanvas.GetRenderer());<br>>><br>>>
//sagitallCanvas.GetRenderWindow().AddRenderer(sagittalViewer.GetRenderer());<br>>> sagittalViewer.SetupInteractor(iren);<br>>> //sagitallCanvas.GetRenderer().ResetCamera();<br>>> imagestyle=new vtkInteractorStyleImage();<br>>> iren = cronalCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> cronalViewer.SetRenderWindow(cronalCanvas.GetRenderWindow());<br>>> cronalViewer.SetRenderer(cronalCanvas.GetRenderer());<br>>> //cronalCanvas.GetRenderWindow().AddRenderer(cronalViewer.GetRenderer());<br>>> cronalViewer.SetupInteractor(iren);<br>>> //cronalCanvas.GetRenderer().ResetCamera();<br>>><br>>> imagestyle=new vtkInteractorStyleImage();<br>>> iren = axialCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> axialViewer.SetRenderWindow(axialCanvas.GetRenderWindow());<br>>>
axialViewer.SetRenderer(axialCanvas.GetRenderer());<br>>> axialViewer.SetupInteractor(iren);</span><br></span></div><div><span><br></span></div><div> </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 <sebastien.jourdain@kitware.com><br> <b><span style="font-weight: bold;">To:</span></b> Elhassan Abdou <hassan.abdou@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" <vtkusers@vtk.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, May 25, 2012 3:02 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [vtkusers] deleting frame in vtk java frame<br>
</font> </div> <br>
Hum, you should change the code of vtkRelsiceImageViewer to use<br>vtkCanvas instead of Renderer + RenderWindow...<br><br>On Fri, May 25, 2012 at 8:42 AM, Elhassan Abdou <<a ymailto="mailto:hassan.abdou@yahoo.com" href="mailto:hassan.abdou@yahoo.com">hassan.abdou@yahoo.com</a>> wrote:<br>> Hi Sebastien,<br>><br>> There is a window created by vtkResliceImageViewer and I moved the<br>> renderwindow to be in vtkCanvas.<br>> So I want to delete this window produced vtkRelsiceImageViewer.<br>> I can say that this window is produced from openglframe work because it has<br>> a title Cocoa#1 on my mac and on other linux pc has a title openglWindow#1.<br>><br>> I have not tried what Clemens said in previous reply on this e-mail yet, but<br>> I may try it soon.<br>><br>> Any help will be more than useful<br>><br>> Best<br>><br>> El-Hassan Mohamed<br>> Biomedical engineering<br>>
________________________________<br>> From: Sebastien Jourdain <<a ymailto="mailto:sebastien.jourdain@kitware.com" href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>><br>> To: Elhassan Abdou <<a ymailto="mailto:hassan.abdou@yahoo.com" href="mailto:hassan.abdou@yahoo.com">hassan.abdou@yahoo.com</a>><br>> Cc: "<a ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" <<a ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>> Sent: Friday, May 25, 2012 2:21 PM<br>> Subject: Re: [vtkusers] deleting frame in vtk java frame<br>><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 <<a ymailto="mailto:hassan.abdou@yahoo.com"
href="mailto:hassan.abdou@yahoo.com">hassan.abdou@yahoo.com</a>><br>> wrote:<br>>> Hi all<br>>><br>>> I am using vtkresliceimageviewer which is inherited from vtkImageViewer2<br>>> to<br>>> produce MPR. I succeeded to create the three vtkCanvas and render on them.<br>>> The PROBLEM is there are another three old frames produced from the<br>>> vtkResliceImageViewer and they are empty as the renderer of viewer now is<br>>> directed to vtkcanvas. How i can delete them.<br>>><br>>> Below is the snippet of adding the viewers to the canvases;<br>>> imagestyle=new vtkInteractorStyleImage();<br>>> iren = sagitallCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> sagittalViewer.SetRenderWindow(sagitallCanvas.GetRenderWindow());<br>>> sagittalViewer.SetRenderer(sagitallCanvas.GetRenderer());<br>>><br>>>
//sagitallCanvas.GetRenderWindow().AddRenderer(sagittalViewer.GetRenderer());<br>>> sagittalViewer.SetupInteractor(iren);<br>>> //sagitallCanvas.GetRenderer().ResetCamera();<br>>> imagestyle=new vtkInteractorStyleImage();<br>>> iren = cronalCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> cronalViewer.SetRenderWindow(cronalCanvas.GetRenderWindow());<br>>> cronalViewer.SetRenderer(cronalCanvas.GetRenderer());<br>>> //cronalCanvas.GetRenderWindow().AddRenderer(cronalViewer.GetRenderer());<br>>> cronalViewer.SetupInteractor(iren);<br>>> //cronalCanvas.GetRenderer().ResetCamera();<br>>><br>>> imagestyle=new vtkInteractorStyleImage();<br>>> iren = axialCanvas.GetRenderWindow().GetInteractor();<br>>> iren.SetInteractorStyle(imagestyle);<br>>> axialViewer.SetRenderWindow(axialCanvas.GetRenderWindow());<br>>>
axialViewer.SetRenderer(axialCanvas.GetRenderer());<br>>> axialViewer.SetupInteractor(iren);<br>>><br>>> Best Regards<br>>><br>>> El-Hassan Mohamed<br>>> Biomedical engineering<br>>><br>>> _______________________________________________<br>>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>>><br>>> Visit other Kitware open-source projects at<br>>> http://www.kitware.com/opensource/opensource.html<br>>><br>>> Please keep messages on-topic and check the VTK FAQ at:<br>>> http://www.vtk.org/Wiki/VTK_FAQ<br>>><br>>> Follow this link to subscribe/unsubscribe:<br>>> http://www.vtk.org/mailman/listinfo/vtkusers<br>>><br>><br>><br><br><br> </div> </div> </div></body></html>