# Link views in three over three configuration

**URL:** <https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564>\
**Category:** Support\
**Tags:** python\
**Created:** [July 29, 2022, 1:07pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564 "2022-07-29T13:07:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeNajm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joenajm/32/16145_2.png) [@JoeNajm](https://discourse.slicer.org/u/JoeNajm)\
**Post date:** [July 29, 2022, 1:07pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564/1 "2022-07-29T13:07:47Z")

</div>

Hello,  
I am working on an extension using MRI images, in which I need to display the flair and phase of the same patient next to each other (the flair are the bottom row images and the phase are the top row images in the pictures provided below). To do so I decided to load the flair as the foreground image and phase as the background and just change the opacity to go from one to another.  
I would like to simultaneously scroll through both views of the same slice (flair and phase). I noticed that the tool to link views (the small chain on the toolbar) works when I use the “three by three slice” configuration (The views are named Red, Yellow, Green, Slice 4,5,6,7,8,9) :

 ![Screenshot from 2022-07-29 14-47-49](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/e/5eb51eebf5434358da3248f1e52b3be53b326b74.jpeg)

However, it does not work when I use the “three over three” configuration (The views are now named Red, Yellow, Green and Red+, Yellow+, Green+):

 ![Screenshot from 2022-07-29 14-42-10](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/4/44e2eed955977364da1bf742ff6c25f907d5e933.jpeg)

As I only need 6 views and not 9, is there a way to link the views in the “three over three” configuration ?

Thanks in advance,  
Joe

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 29, 2022, 1:19pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564/2 "2022-07-29T13:19:14Z")

</div>

Views that are in the same `View group` are synchronized. See more information in the [user manual](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#slice-view).

`R`, `G`, `Y` views are in view group `0`. You can synchronize `R+`, `G+`, `Y+` views with them by changing the view group to `0` in `View Controllers` module:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/d/9da8212437bb0b10c9d4a7859f05d3dac5096faf.png)

---

<div class="post-metadata">

**Author:** ![JoeNajm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joenajm/32/16145_2.png) [@JoeNajm](https://discourse.slicer.org/u/JoeNajm)\
**Post date:** [July 29, 2022, 2:11pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564/3 "2022-07-29T14:11:57Z")

</div>

Thank you for your fast response, is there a way to automatically do that via python code (I couldn’t find any class similar to slicer.app.layoutManager().sliceWidget(“Red”).sliceController() for the “advanced” settings) ?

Moreover, I noticed that the plane intersect does not work anymore once the slices are linked

 ![Screenshot from 2022-07-29 16-03-49](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/6/f62d999cb5bda1fa45c23f2fa3fcf69630373694.jpeg)  
Is there a way to have both plane intersect and linked views work together ?

Thanks in advance!  
Joe

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 29, 2022, 2:17pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564/4 "2022-07-29T14:17:05Z")

</div>

You can also try the Compare Volumes module, which manages the layout and linking for you and gives other options. It was meant for comparing registration results but is also good for looking at multiple MR contrasts. Unfortunately we don’t have up to date documentation for that module (my bad) but here’s an overview that can be migrated to readthedocs as some point.

The **Volumes** section lists all the volumes in the scene. You can select the ones you want to see and can drag them to set the layout order.

The **Orientation** radio buttons lets you pick between one view or a row of three per volume.

The **Common Background** option lets you overlay all selected volumes in the foreground compared to a reference volume in the background (used with the Visualization Fade/Rock/Flicker modes). If you have just two volumes you can select one here and uncheck it in the Volumes section and you will get a layout with one set of views with the volumes in foreground and background.

**Common Label** isn’t useful as much now because Segmentations are shown over all views, but if you have a labelmap you can choose to display it.

**Hot Link** sets up linking mode so that pan/zoom/scroll happens as you drag vs on mouse release.

**Visualization** mode allows you to crossfade between foreground and background when you have common background enabled. The Rock and Flicker modes animate this action so you can look for subtle changes without needing to use the mouse. You can also pan/zoom/scroll while the animation modes are active to explore the volumes.

The **+ - Fit** buttons control the field of view of the slice views.

**Compare Checked Volumes** is the button to apply the Volumes, Orientation, and Common Background/Label options in a custom layout. Note that in current Slicer it seems you sometimes need to _click the Fit button_ after applying a new layout.

The **Layer Reveal Cursor** show a real-time checkerboard of the foreground and background as you move the mouse over the slice views.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/b/ab9476a328f5be9b73b4d95652bc816f5a34dc47.jpeg)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/f/cfdb7db54447545ffed5a7ffd65d72ac50aa15e6.jpeg)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/3/832ae33a5fda826eb113647ffb7344f494c62f5d.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 29, 2022, 10:26pm UTC](https://discourse.slicer.org/t/link-views-in-three-over-three-configuration/24564/5 "2022-07-29T22:26:58Z")

</div>

> [@JoeNajm](#):
>
> Moreover, I noticed that the plane intersect does not work anymore once the slices are linked

Unfortunately, interactive slice intersections is still an experimental features. This behavior is a bug that will be fixed at some point, but currently not a priority. You can monitor the status of the fix here:

> <https://github.com/Slicer/Slicer/issues/6487>
>
> \## Summary
> 
> Interactive slice intersections appear as quite random parallel li…nes when there are more than 3 slices in the view group.
> 
> !\[image\](https://user-images.githubusercontent.com/307929/181852988-2bf5d912-6896-4d04-88f3-08071ceae995.png)
> 
> \## Steps to reproduce
> 
> \- Load an image
> \- Switch to \`Three over three\` view layout
> \- In View controllers module, set Advanced -\> View group to 0 for Red+, Yellow+, Green+ views 
> \- Enable slice intersection display, enable interaction
> \- Move the mouse while holding down the shift. The slice intersections appear incorrectly, as parallel lines.
> 
> \## Expected behavior
> 
> Intersection lines should look similar to how the look in non-interactive mode.
> 
> \## Environment
> \- Slicer version: Slicer-5.0.3
> \- Operating system: Windows
