Skip to content
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

Suggestion: Alternative 4-Panel Layout #665

Open
wanqingy opened this issue Nov 15, 2024 · 6 comments
Open

Suggestion: Alternative 4-Panel Layout #665

wanqingy opened this issue Nov 15, 2024 · 6 comments

Comments

@wanqingy
Copy link

Hi! I would like to propose an alternative 4-panel layout in Neuroglancer that may better facilitate cross-referencing three orthogonal planes alongside a 3D view.

Suggested configuration:
Top left: xy
Bottom left: xz view
Top right: yz view
Bottom right: 3d

Examples:
Suggested new layout

Image

Current default 4 panel view as an comparison

Image

Implementation
To experiment with this layout, I customized the layout in JSON state as follows:

  "layout": {
    "type": "row",
    "children": [
      {
        "type": "column",
        "children": [
          {
            "type": "viewer",
            "layers": [
              "em"
            ],
            "layout": "xy",
            "flex": 1.22
          },
          {
            "type": "viewer",
            "layers": [
              "em"
            ],
            "layout": "xz",
            "flex": 0.78
          }
        ],
        "flex": 1.21
      },
      {
        "type": "column",
        "children": [
          {
            "type": "viewer",
            "layers": [
              "em"
            ],
            "layout": "yz",
            "flex": 1.22
          },
          {
            "type": "viewer",
            "layers": [
              "em"
            ],
            "layout": "3d",
            "flex": 0.78
          }
        ],
        "flex": 0.79
      }
    ]
  }

In addition, I also experimented editing data_panel_layout.ts to make the suggested 4 panel as a default layout.

Panel Resizing:
Another limitation of the current 4-panel layout (and 2 panel layout too) is the inability to adjust panel sizes. Using the JSON state above, users also can adjust panel sizes.

In summary, it would be great if this alternative 4-panel layout can be added (if not replacing the current one). It is even better if users can rearrange and resize panels whatever they want.

@ceesem
Copy link

ceesem commented Nov 22, 2024

Having seen the demo of this yesterday, I just wanted to chime in and say that this proposed layout is awesome. It makes a lot more intuitive sense than the existing 4-panel layout (and I believe is more standard in the microscopy community), plus the ability to resize the orthogonal views to be shallower than the transverse view allows them to complement anisotropic data without taking as much real estate from the highest resolution view.

@jbms
Copy link
Collaborator

jbms commented Nov 22, 2024

I'd be happy to accept a PR that adds support for resizing and/or changing the arrangement of panels.

The key question as far as supporting other arrangements is whether to allow arbitrary arrangements (e.g. maybe the user wants xy xz and 3d in one row) or just to add this one additional specific arrangement, and for either option, how to expose it in the UI. I would indeed think that it would be better to support arbitrary arrangements.

Just modifying the existing 4panel view is not a viable option because it would affect existing Neuroglancer states/URLs.

@wanqingy
Copy link
Author

@jbms I completely agreed that supporting for arbitrary arrangements would be a better solution. That's exactly why I didn't request a PR for my current implementation (which I modified existing 4panel). And I hope someone more capable than me can take on this task!

As an intermediate solution, if you think it's reasonable to add this specific arrangement, perhaps adding a dropdown menu could allow people to easily switch between different layouts?

@chrisj
Copy link
Contributor

chrisj commented Nov 22, 2024

Would it be enough to just add a new name for the 4panel layout and default to the new one?

If you wanted to ensure old states continue to use the old layout even when swapping between layouts, you could have some indicating in newly generated (blank) states indicating this is a new epoch.

@jbms
Copy link
Collaborator

jbms commented Nov 22, 2024

Would it be enough to just add a new name for the 4panel layout and default to the new one?

If you wanted to ensure old states continue to use the old layout even when swapping between layouts, you could have some indicating in newly generated (blank) states indicating this is a new epoch.

Yes I think that approach would work fine.

To be sure that I'm understanding correctly, the appeal of the new layout is that the x axis is aligned for the left two panels and the y axis is aligned for the top two panels?

@wanqingy
Copy link
Author

To be sure that I'm understanding correctly, the appeal of the new layout is that the x axis is aligned for the left two panels and the y axis is aligned for the top two panels?

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants