3D interaction does not work in RenderWindowControl (Activiz)

Hello everyone,
I am trying to build a windows form application in C# and show a 3D reconstruction of a dicom series via putting a “RenderWindowControl” in the form. Actually, I could successfully build the reconstruction in a new Window (not inside the form) and could interact (rotate and zoom) with it via:

vtkRenderer ren = vtkRenderer.New();
vtkRenderWindow ren_win = vtkRenderWindow.New()
vtkRenderWindowInteractor iren = vtkRenderWindowInteractor.New();

However when I use vtkRenderWindow ren_win = renderWindowControl1.RenderWindow; to show the 3D image in the RenderWindowControl, it is shown but I cannot interact with it. Any suggestion is welcome. Thanks in advance.


When using the WinForms RenderwindowControl, you should not assign a new vtkRenderWindowInteractor to your vtkRenderWindow. Instead you just need to access the existing vtkRenderer and add your actors in it. Please have a look at the HelloVTKForm example.


1 Like