[vtkusers] The Priority Setting in AddObserver()

JohnMark zhaojunxp at hotmail.com
Fri Aug 17 22:34:25 EDT 2007


Hi, 
when I use the function AddObserver() of vtkImageViewer in C++ , I write my own function . and I find the function is :
    imageViewer->AddObserver( const char * event , vtkCommand * MyFunction , float priority = 0.0 ) ;from the introduction of it , I know the higher priority commands will be called first if a priority value is specified . 
I user 3 objects of vtkImageViewer , and I set the priority value for them . So there is my problem :
if object A's priority is 3 , object B's priority is 2 , and I call A first ,if I call B next , can MyFunction() of B work ?
and then there is another question : how can I control the MyFunction() to be used by one object at one time ? if I only 
write a MyFunction() and these objects use it with share , I think the objects that have higher priority could not be 
interrupted by the objects having lower priority . or I write many MyFunction() for all the objects , but then the priority is 
not necessary . So how can I do if I want to choose a object of vtkImageViewer at one time and with one MyFunction() ?
waiting for your answer ! thank you very much ! 
_________________________________________________________________
用 Live Search 搜尽天下资讯!
http://www.live.com/?searchOnly=true
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070818/c5b59ae5/attachment.htm>


More information about the vtkusers mailing list