VTK using Windows Forms and Activiz .NET

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

VTK using Windows Forms and Activiz .NET

Neel Patel 0-0-0
Hi all,

    I'm currently trying to use both Win Forms and VTK.  I've looked at the examples on the wiki and whenever the rendering is being done, it is called in an Event (i.e. renderWindowControl1_Load(object sender, EventArgs e) ).

So in the case of the oriented arrow example on the wiki (https://itk.org/Wiki/VTK/Examples/CSharp/GeometricObjects/OrientedArrow), the method is called in Load. If I were to call the method directly, it doesn't render. Is it neccesary for it to be structured in that way?

Any help might be appreciated, I've looked around but most people seem to prefer using Qt. The reason I ask is because I want to update my render every couple seconds, and the only Event that looks plausible is the OnPaint(), but I'm not quite sure thats correct.

                                         Regards,
                                             Neel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VTK using Windows Forms and Activiz .NET

CharlesB


2017-06-29 23:19 GMT+02:00 Neel Patel 0-0-0 <[hidden email]>:
Hi all,

    I'm currently trying to use both Win Forms and VTK.  I've looked at the
examples on the wiki and whenever the rendering is being done, it is called
in an Event (i.e. renderWindowControl1_Load(object sender, EventArgs e) ).

So in the case of the oriented arrow example on the wiki
(https://itk.org/Wiki/VTK/Examples/CSharp/GeometricObjects/OrientedArrow),
the method is called in Load. If I were to call the method directly, it
doesn't render. Is it neccesary for it to be structured in that way?

 
You don't need to restrict the rendering to Forms events.
In most examples the rendering appears in the Load event because it is the first event where render control is ready, and examples do the rendering once, at window loading.
 
Any help might be appreciated, I've looked around but most people seem to
prefer using Qt. The reason I ask is because I want to update my render
every couple seconds, and the only Event that looks plausible is the
OnPaint(), but I'm not quite sure thats correct.   

Sure, you can render anytime once the render control is ready, Activiz works fine for most cases.


_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VTK using Windows Forms and Activiz .NET

Neel Patel 0-0-0
Ah ok. That makes sense, I saw the examples only using load so i thought it was the only way to go about it. Thanks for your help!
Loading...