[vtkusers] VTK and Winforms integration
Andres Felipe Ruiz
andresfeliperu at gmail.com
Fri May 31 12:42:57 EDT 2013
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.
I would like to cast a Kitware::VTK::vtkRenderWindow to a vtkRenderWindow
that is usted in this
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere>
example
Thank you all very much for your help!.
asdf
On Fri, May 31, 2013 at 10:18 AM, bnsteel <bnsteel at gmail.com> wrote:
> I used Swig (http://www.swig.org/) to manage interactions between a C++
> dll
> and my c# windows application.
>
> I felt that Activiz was not right for me since my data was in the C++ side
> and I didn't want to wrangle it over the c# in order to have the vtk
> wrapper
> push it back to c++.
>
> I made a method to pass the handle of my windows panel to the vtk render
> window
>
> C++ side
> setImageRenderWindowParentID(void *theID){
> ... (init your vtk render window)
> renWin2->SetParentId(theID);
> }
>
> C# side
>
> swig3d.setRenderWindowParentID(m_panel.Handle);
>
>
>
> where swig3d is the handle ( via swig) to my C++ class that handles the vtk
> stuff. I have to handle all of the user interactions between C# and C++,
> so
> it was a good amount of typing, but I get to use the latest and greatest
> vtk
> without the overhead of activiz.
>
> You will have to update the render window size each time your widows panel
> is re-sized, but everything else can be done on the c++ side.
>
> brooke
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/VTK-and-Winforms-integration-tp5721086p5721097.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
asdf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130531/03412437/attachment.htm>
More information about the vtkusers
mailing list