Make viewers dockable and possible to rearrange

I occasionally find myself wishing to rearrange the size of the viewer windows independently from each other. Of course this is doable by creating custom layouts and registering with Slicer, and makes sense if someone knows that they routinely will need that exact layout. It does take a while to create the correct XML for the layout.

What I am asking would be a situation rearranging the position and size of the viewers by dragging and dropping them into locations, from which I can create layouts like a 3D viewer that spans the vertical high of windows, a red view that’s same height and green and yellow viewers half height of that. And then being able to drag their corners to adjust their width.

and then for example dragging the yellow viewer on top of red results in this rearrangement automatically:

and then dragging the 3D viewer (purple) onto green does this:

Based on your examples does dragging one viewer on top of another swap their positions while becoming the size of the viewer that was previously there? In your first example (quoted above) it appears that the Red slice goes into the yellow slice position, but also changes sizes to be a wide ratio and neither square ratio or tall ratio (original red slice dimension).

Yes, when you are swapping them the sizes can change, but the idea all internal edges between viewers should be adjustable (so that you can rearrange the widths/heights in whichever way you want).

Another thing to consider: we traditionally use a tiled layout, but we could offer a mode where views are allowed to overlap (e.g. with QMdiArea. I’ve seen this used for longitudinal imaging where you get a stack of images you can easily flip through, but I’m not sure how popular it is.

Also, I’ve always wanted the ability to just change the view type in an existing layout. Like changing the large view in the default layout from a threeDView to a sliceView for example, without changing anything else about the layout.

I think swapping them and it adopting the size of the viewer in the position it is trying to be dropped into would be easier. Dropping some large shape in the middle of say a 4x4 grid could get complicated if to maintain the size of the large shape the other surrounding slice viewers may have to change their size as well even though not directly involved.

I quite like ParaView’s simple layout editing feature: all it does it allows to split any view horizontally or vertically. You can then specify the view type in the newly opened up space. Would this be sufficient?