Roger_Miao
Roger_Miao

Reputation: 1

VTK MFC C++ application: Update Camera View for Multiple vtkMFCWindow

I am trying to write a MFC C++ application of two vtkMFCWindows for the same patient with different rendering structures. I have implemented the two vtkMFCwindows sharing the same camera view. Right now, the MFC GUI can display these two different stuctures in two different vtkMFCWindows. The camera view can be updated through interaction with one of the vtkMFCWindows. However, in order to update the camera view for the other vtkMFCWindow, I need to click on the windows. Is there anyway I could make both windows update simultaneous? By dragging one of the windows, the other windows will also update.

I looked at some the vtk-helpers (such as http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ShareCamera ). Most of the applications have multiple renderers in one renderwindow. But in my application, I will have multiple renderwindows. Thank you very much.

Upvotes: 0

Views: 852

Answers (1)

Roger_Miao
Roger_Miao

Reputation: 1

I just solve it myself by looking at the post:http://vtk.1045678.n5.nabble.com/Re-how-to-interact-two-renderers-td1250905.html

However, the main problem is the callback function used in the observer model. A good example to look at is at http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/KeypressObserver .

Upvotes: 0

Related Questions