[vtkusers] Problem : vtkImageViewer + AddObserver()
JohnMark
zhaojunxp at hotmail.com
Sat Aug 18 23:43:43 EDT 2007
Hello ,
I write a program to response to the mouse event in C++ . that is ,
there are three pictures in the rendering window , which are the objects of
vtkImageViewer . In order to capture the mouse events , I use the
vtkWin32RenderWindowInteractor instead of vtkRenderWindowInteractor .
and I write only one MyFunction that would be invoked by the three
objects' AddObserver() function . then there is the problem :
if I press one picture with the mouse , how can I know the picture's
Z Slice ? ( I display three pictures with different Z Slice )
And the key is : you should get the picture's object , and then you could
get the Z Slice through the function GetZSlice() .
So I thought it would be OK if I wrote the Myfunction() for every
pictures' AddObserver() several weeks ago . but the program
would be too large if more pictures would be displayed
in the rendering window .
can you give me some good suggestion to solve this problem :
use one MyFunction() to response the mouse events and
get the picture or its Z Slices and so on that is clicked by the mouse ?
Thank you very much and with regards !
Mark
_________________________________________________________________
Windows Live Spaces 中最年轻的成员!
http://miaomiaogarden2007.spaces.live.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070819/a143170e/attachment.htm>
More information about the vtkusers
mailing list