[vtkusers] VTK and Winforms integration
bnsteel
bnsteel at gmail.com
Fri May 31 11:18:22 EDT 2013
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.
More information about the vtkusers
mailing list