thanks guys, I&#39;ve the title working now.<br><br>For a touch of perfection; is there a way to automatically set the window coordinates so that the windows are aligned wherever you want them?<br>(i.e. next to each other?)<br>

<br><br>And one last question: after the first render window has been created, the program waits for me to press &#39;q&#39; to continue the program. Is<br>there a way for the program to continue without pressing &#39;q&#39;?<br>

<br>I tried: renwindow-&gt;Finalize(); // doesn&#39;t do anything<br><br>windowinteractor-&gt;TerminateApp(); // this closes the application altogether when &#39;q&#39; is pressed<br><br>windowinteractor-&gt;UnRegister(); // error: no matching function call<br>

                                               // note: candidates are: virtual void vtkRenderWindowInteractor::UnRegister(vtkObjectBase*)<br><br>windowinteractor-&gt;CreateOneShotTimer(1); // doesn&#39;t release focus<br>

<br>I&#39;d just like all windows to pop up as soon as possible and be able to manipulate them with my mouse whenever I&#39;d like to.<br>At this point I can manipulate all renderwindows fine, I&#39;d just like the windows to appear without having to press &#39;q&#39;.<br>

<br>cheers, Michael<br><br><div class="gmail_quote">On Tue, Jan 5, 2010 at 10:42 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div class="h5">On Tue, Jan 5, 2010 at 5:22 PM, Bryan P. Conrad &lt;<a href="mailto:conrabp@ortho.ufl.edu">conrabp@ortho.ufl.edu</a>&gt; wrote:<br>
&gt; I have only done this in python, not C++, but I think the trick is to use the method &quot;SetWindowName&quot; and it has to be called *after* the renderWindow is rendered the first time.  See the python code below (copied from David&#39;s C++ example), for a version that works on my machine.<br>


&gt;<br>
&gt; import vtk<br>
&gt;<br>
&gt; def main():<br>
&gt;    #Create a sphere<br>
&gt;    sphereSource = vtk.vtkSphereSource()<br>
&gt;    sphereSource.SetCenter(0.0, 0.0, 0.0)<br>
&gt;    sphereSource.SetRadius(5)<br>
&gt;<br>
&gt;    #Create a mapper and actor<br>
&gt;    mapper = vtk.vtkPolyDataMapper()<br>
&gt;    mapper.SetInputConnection(sphereSource.GetOutputPort())<br>
&gt;    actor = vtk.vtkActor()<br>
&gt;    actor.SetMapper(mapper)<br>
&gt;<br>
&gt;    # Setup a renderer, render window, and interactor<br>
&gt;    renderer = vtk.vtkRenderer()<br>
&gt;    renderWindow = vtk.vtkRenderWindow()<br>
&gt;    #renderWindow.SetWindowName(&quot;Test&quot;)<br>
&gt;<br>
&gt;    renderWindow.AddRenderer(renderer);<br>
&gt;    renderWindowInteractor = vtk.vtkRenderWindowInteractor()<br>
&gt;    renderWindowInteractor.SetRenderWindow(renderWindow)<br>
&gt;<br>
&gt;    #Add the actor to the scene<br>
&gt;    renderer.AddActor(actor)<br>
&gt;    renderer.SetBackground(1,1,1) # Background color white<br>
&gt;<br>
&gt;    #Render and interact<br>
&gt;    renderWindow.Render()<br>
&gt;<br>
&gt;    #*** SetWindowName after renderWindow.Render() is called***<br>
&gt;    renderWindow.SetWindowName(&quot;Test&quot;)<br>
&gt;<br>
&gt;    renderWindowInteractor.Start()<br>
&gt;<br>
&gt;<br>
&gt; if __name__ == &#39;__main__&#39;:<br>
&gt;    main()<br>
&gt;<br>
&gt; ____________________________<br>
&gt; Bryan P. Conrad, Ph.D.<br>
&gt; Senior Engineer<br>
&gt;<br>
&gt; Department of Orthopaedics and Rehabilitation<br>
&gt; University of Florida<br>
&gt; PO Box 112727<br>
&gt; Gainesville, FL 32611<br>
&gt; Phone: 352.273.7412<br>
&gt; Fax: 352.273.7407<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] On Behalf Of David Doria<br>
&gt; Sent: Tuesday, January 05, 2010 2:07 PM<br>
&gt; Cc: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
&gt; Subject: Re: [vtkusers] giving renderwindow a name<br>
&gt;<br>
&gt; On Tue, Jan 5, 2010 at 11:25 AM, michiel mentink<br>
&gt; &lt;<a href="mailto:michael.mentink@st-hughs.ox.ac.uk">michael.mentink@st-hughs.ox.ac.uk</a>&gt; wrote:<br>
&gt;&gt; I&#39;m trying to give a renderwindow a title.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m using the following code to create a window. So far so good.<br>
&gt;&gt;<br>
&gt;&gt;   // create a renderer<br>
&gt;&gt;   vtkSmartPointer&lt;vtkRenderer&gt; renderer =<br>
&gt;&gt;     vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>
&gt;&gt;   renderer-&gt;AddActor(actor);<br>
&gt;&gt;<br>
&gt;&gt;   // create a render window<br>
&gt;&gt;   vtkSmartPointer&lt;vtkRenderWindow&gt; renwin =<br>
&gt;&gt;     vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>
&gt;&gt;   renwin-&gt;AddRenderer(renderer);<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;   // create an interactor<br>
&gt;&gt;   vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; iren =<br>
&gt;&gt;     vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>
&gt;&gt;   iren-&gt;SetRenderWindow(renwin);<br>
&gt;&gt;     renwin-&gt;SetSize(640, 480);<br>
&gt;&gt;<br>
&gt;&gt;   iren-&gt;Initialize();<br>
&gt;&gt;   iren-&gt;Start();<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ///////////end code////////<br>
&gt;&gt;<br>
&gt;&gt; Before iren-&gt;initialize, I tried the following:<br>
&gt;&gt;<br>
&gt;&gt;       iren-&gt;SetWindowInfo( &quot;window1&quot; );<br>
&gt;&gt;      renwin-&gt;SetWindowInfo( &quot;window1&quot;);<br>
&gt;&gt;<br>
&gt;&gt; and also -&gt;SetWindowId(&quot;window1&quot;);<br>
&gt;&gt; and -&gt;SetWindowName(&quot;window1&quot;);<br>
&gt;&gt;<br>
&gt;&gt; but it keeps giving me error messages upon compiling:<br>
&gt;&gt;<br>
&gt;&gt; &#39;class vtkRenderWindowInteractor&#39; has no member named &#39;SetWindowInfo&#39;<br>
&gt;&gt; or<br>
&gt;&gt; error: &#39;renWin&#39; was not declared in this scope<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s probably a simple mistake, but I&#39;m still beginning to understand VTK.<br>
&gt;&gt; Can anybody point me in the right direction?<br>
&gt;&gt;<br>
&gt;&gt; Kind regards, Michael<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; I setup an example if anyone cares to play with it to get it to work:<br>
&gt; <a href="http://www.cmake.org/Wiki/VTK/Examples/WindowTitle" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/WindowTitle</a><br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; David<br>
<br>
</div></div>Thanks Bryan, that did the trick.<br>
<br>
The example can be found here (c++):<br>
<div class="im"><a href="http://www.cmake.org/Wiki/VTK/Examples/WindowTitle" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/WindowTitle</a><br>
</div>and here(python): <a href="http://www.cmake.org/Wiki/VTK/Examples/Python/WindowTitle" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/Python/WindowTitle</a><br>
<div><div></div><div class="h5"><br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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: <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>
</div></div></blockquote></div><br>