[vtkusers] Help about refreshing of vtk window

Rong Xu xurong1981 at gmail.com
Sun Oct 2 21:46:05 EDT 2011


2011/10/3 David Doria <daviddoria at gmail.com>

> 2011/10/2 Rong Xu <xurong1981 at gmail.com>:
> > Hi, David Doria :
> >
> > Thank you very much for your response!
> >
> > 2011/10/3 David Doria <daviddoria at gmail.com>
> >>
> >> 2011/10/2 Rong Xu <xurong1981 at gmail.com>:
> >> > Hi:
> >> >
> >> > I am a new man in using VTK library, and I want to realize refreshing
> >> > the
> >> > VTK windows when I change the opacity value of the object shown in VTK
> >> > windows. Does anybody have experience about refreshing of VTK windows?
> >> > Could
> >> > you please tell me how to refreshing the Object shown in VTK windows
> >> > efficiently when I change the attribute of the object, such as the
> value
> >> > of
> >> > opacity?
> >> >
> >> > I will appreciate your advice ! Thank you!
> >>
> >> Can you send a code snippet and explain how it behaves vs how you want
> >> it to behave?
> >
> > I think there are no special code, now I just renew the variables of
> > vtkRenderer, vtkRenderWindow, and vtkRenderWindowInteractor, then show
> the
> > windows again after I changed the parameters of vtkActor.
> >
> > But I give 2 pictures to show what I want to do. In Model-01.jpg, I set
> the
> > value of opacity as 0.4, and in Model-02.jpg, I set the value of opacity
> as
> > 1.0. So I want to realize refreshing the windows as soon as possible when
> I
> > change the value of opacity from 0.4 to 1.0. Because when I renew the
> > variables of vtkRenderer, vtkRenderWindow, and vtkRenderWindowInteractor,
> it
> > takes some time to re-draw the VTK windows. Is there any method for this
> > purpose, such as refreshing of vtkActor or vtkRenderWindow?
> >
>
> Please keep the discussion on the mailing list so that everyone can
> help and benefit from the discussion.
>
> What do you mean by "renew the variables"? I think you might just not
> be calling Render() on the vtkRenderWindow?
>

I mean I use the following codes to initialize these variables again.

m_ren = vtkSmartPointer<vtkRenderer>::New();
m_renWin = vtkSmartPointer<vtkRenderWindow>::New();
m_iren = vtkSmartPointer<vtkRenderWindowInteractor>::New();


>
> David
>



-- 

---------------------
Best Regards!

===============================================
Rong Xu,  Ph.D Student
Ohya Lab
Graduate School of Global Information and Telecommunication
Studies (GITS), Waseda University
1-6-1 Nishi Waseda, Shinjuku-ku, Tokyo, Japan (¨“169-8050)

Tel:          +81-80-4208-1207
E-mail:     xurong1981 at gmail.com
               xurong at fuji.waseda.jp
===============================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111003/d80e0202/attachment.htm>


More information about the vtkusers mailing list