<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><span><br></span></div><div><span>I tried in the last few days to remove the vtkRenderWindow in the vtkViewer, and I think I did. But still i get the same effect.</span></div><div><span>Can you guide me through this. I am getting totally lost in this.</span></div><div><span><br></span></div><div><span>Best</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 5:18 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [vtkusers] deleting frame in vtk java frame<br> </font> </div> <br>
I'm just saying that once the vtkRenderWindow is instantiate, this<br>might be to late after that to do anything...<br><br>On Fri, May 25, 2012 at 10:20 AM, Elhassan Abdou <<a ymailto="mailto:hassan.abdou@yahoo.com" href="mailto:hassan.abdou@yahoo.com">hassan.abdou@yahoo.com</a>> wrote:<br>> can you check the code that I added in which i am changing the rendering<br>> window and renderer to the one in the canvas and tell if there is something<br>> wrong in it.<br>> After this code I begin to load the data and enable the widget interaction<br>><br>> magestyle=new vtkInteractorStyleImage();<br>>>> iren = sagitallCanvas.GetRenderWindow().GetInteractor();<br>>>> iren.SetInteractorStyle(imagestyle);<br>>>> sagittalViewer.SetRenderWindow(sagitallCanvas.GetRenderWindow());<br>>>> sagittalViewer.SetRenderer(sagitallCanvas.GetRenderer());<br>>>><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>><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 3:02 PM<br>> Subject: Re: [vtkusers] deleting frame in vtk java frame<br>><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>><br>> 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<br>>> has<br>>> a title Cocoa#1 on my mac and on other linux pc has a title<br>>> openglWindow#1.<br>>><br>>> I have not tried what Clemens said in previous reply on this e-mail yet,<br>>> 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<br>>>> 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>>>><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 www.kitware.com<br>>>><br>>>> Visit other Kitware open-source projects at<br>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>>>><br>>>> Please keep messages
on-topic and check the VTK FAQ at:<br>>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>>><br>>>> Follow this link to subscribe/unsubscribe:<br>>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>>>><br>>><br>>><br>><br>><br><br><br> </div> </div> </div></body></html>