# VTK Synchronized MPR behavior issue(Re-initiating)

**URL:** <https://discourse.vtk.org/t/vtk-synchronized-mpr-behavior-issue-re-initiating/6246>\
**Category:** Development\
**Created:** [July 26, 2021, 12:15pm UTC](https://discourse.vtk.org/t/vtk-synchronized-mpr-behavior-issue-re-initiating/6246 "2021-07-26T12:15:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BadCookie](https://discourse.vtk.org/user_avatar/discourse.vtk.org/badcookie/32/3603_2.png) [@BadCookie](https://discourse.vtk.org/u/BadCookie)\
**Post date:** [July 26, 2021, 12:15pm UTC](https://discourse.vtk.org/t/vtk-synchronized-mpr-behavior-issue-re-initiating/6246/1 "2021-07-26T12:15:14Z")

</div>

Hi all,

I wanted to link the 3 views axial, coronal and sagittal views so that when mouse interaction takes place on one view, it simultaneously updates the other views.

Things I’ve tried…

I have tried the following example MPR code, I’m able to iterate over the slices for my 3 views, when interacted with independently.

> <https://github.com/Kitware/VTK/blob/master/Examples/ImageProcessing/Cxx/ImageSlicing.cxx>

Next, this example I tired, which gave me the idea to link the views based on the camera.  
[https://programmersought.com/article/98624257857/](https://programmersought.com/article/98624257857/)

Integrating the knowledge gained from that second link into the first link, I added **InteractionEvent** callback to the three interactors for those 3 views with interactorstyle of **vtkInteractorStyleTrackballCamera** and it works fine the 3 views are dependent and on interaction on any view, the other views move too! But, trackballCamera style is not what I need.

Basically I need it to be based on **vtkInteractorStyleImage** But when I use this interactorstyle, for some reason, again the 3 views become independent i.e interaction on one view only moves through slices of that view.

Not sure, what I’m doing wrong here. Is it something to do with vtkInteractorStyleImage which is causing this behavior ?  
Any examples or direction to proceed is apprecitiated.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)\
**Post date:** [July 27, 2021, 8:19pm UTC](https://discourse.vtk.org/t/vtk-synchronized-mpr-behavior-issue-re-initiating/6246/2 "2021-07-27T20:19:25Z")

</div>

Instead of creating a new topic, you can bump a topic by adding a post to it, maybe @mentioning people that you think could help.

These VTK’s interactors are good for simple examples and can serve as a basis for implementing interactors in full-featured applications.

If there are simple changes that you would recommend that would make your life easier then feel free to [send a merge request](https://gitlab.kitware.com/vtk/vtk/-/blob/master/CONTRIBUTING.md).

If you want to have a 4-pane viewer then I would recommend not to reimplement this from scratch, as it will become very complex very quickly as you are adding features. Instead, find a VTK-based application that already has this feature (ParaView for engineering visualization, 3D Slicer for medical visualization, etc.) and extend/customize these application frameworks to do exactly what you need.
