Skip to content

update grid mode explanation and add video #725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/_static/images/grid-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images/grid-mode.webm
Binary file not shown.
21 changes: 18 additions & 3 deletions docs/tutorials/fundamentals/viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,26 @@ The fourth button transposes the displayed dimensions.

### Grid button

The fifth button, the grid button, toggles between the default layer mode and grid mode. When clicked, it displays each layer of the image in a series of tiles. The question icons can be hovered for more information about each setting.
The fifth button, the grid button, toggles between the default layer mode and grid mode. When clicked, it distributes the layers in a grid of cells. Each cell is a small interactive canvas whose camera is linked with all the others.

1. Grid stride: By default, 1, placing one layer in each tile. The value determines the number of layers overlaid in each tile. Negative values reverse the order in which layers are displayed in the grid.
```{raw} html
<figure>
<video width="100%" controls autoplay loop muted playsinline>
<source src="../../_static/images/grid-mode.webm" type="video/webm" />
<source src="../../_static/images/grid-mode.mp4" type="video/mp4" />
<img src="../../_static/images/grid-mode.png"
title="Your browser does not support the video tag"
alt="a screen recording showing the the Kidney example toggling between normal mode and grid mode"
>
</video>
</figure>
```

The distribution of the layers in the grid can be altered according to the settings below, accessible by right-clicking the button (or programmatically through `viewer.grid`). The question icons can be hovered for more information about each setting.

1. Grid stride: By default, 1, placing one layer in each view. The value determines the number of layers overlaid in each view. Negative values reverse the order in which layers are displayed in the grid.
2. Grid width/height: By default, -1, which automatically determines the grid layout.
3. Grid spacing: Changes the spacing between the tiles as a proportion of the average height and width of the largest layer. Positive values add distance between layers creating a 'figure panel' like appearance. Negative values result in overlap, which is useful if layers have translucent blending, allowing visualization of many layers close together.
3. Grid spacing: The value will adjust the spacing between grid views either proportionally to the layer extents (i.e. [0,1)) or as a pixel value [1,1500) and will automatically adjust if needed.

![image: Grid Mode Widget](../../_static/images/grid-widget.png)

Expand Down
Loading