<div dir="ltr">Thank you all for yor help, but now I am facing another different problem. I was able to include the VTK window in a Windows Form form from c++. I am trying to get the example of the sphere to work, but there is some casting I have not been able to do.<div>
<br></div><div>I would like to cast a Kitware::VTK::vtkRenderWindow to a vtkRenderWindow that is usted in <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere">this </a>example</div><div><br></div><div>
Thank you all very much for your help!.</div><div class="gmail_extra"><br>asdf</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 31, 2013 at 10:18 AM, bnsteel <span dir="ltr"><<a href="mailto:bnsteel@gmail.com" target="_blank">bnsteel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I used Swig (<a href="http://www.swig.org/" target="_blank">http://www.swig.org/</a>) to manage interactions between a C++ dll<br>
and my c# windows application.<br>
<br>
I felt that Activiz was not right for me since my data was in the C++ side<br>
and I didn't want to wrangle it over the c# in order to have the vtk wrapper<br>
push it back to c++.<br>
<br>
I made a method to pass the handle of my windows panel to the vtk render<br>
window<br>
<br>
C++ side<br>
setImageRenderWindowParentID(void *theID){<br>
... (init your vtk render window)<br>
renWin2->SetParentId(theID);<br>
}<br>
<br>
C# side<br>
<br>
swig3d.setRenderWindowParentID(m_panel.Handle);<br>
<br>
<br>
<br>
where swig3d is the handle ( via swig) to my C++ class that handles the vtk<br>
stuff. I have to handle all of the user interactions between C# and C++, so<br>
it was a good amount of typing, but I get to use the latest and greatest vtk<br>
without the overhead of activiz.<br>
<br>
You will have to update the render window size each time your widows panel<br>
is re-sized, but everything else can be done on the c++ side.<br>
<br>
brooke<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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><br clear="all"><div><br></div>-- <br>asdf
</div></div>