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

neuroglancer "common action" buttons #348

Open
stuarteberg opened this issue Dec 18, 2024 · 1 comment
Open

neuroglancer "common action" buttons #348

stuarteberg opened this issue Dec 18, 2024 · 1 comment

Comments

@stuarteberg
Copy link

Let's add some buttons (or possibly a drop-down menu, or possibly a "hamburger menu") to the page when neuroglancer is visible. Each "action" will modify the neuroglancer state in some predefined way.

Examples:

  • Reset the position/orientation to the standard brain view
  • Reset the position/orientation to the standard VNC view
  • Toggle synapses on/off
  • Toggle ROIs on/off
  • Switch from meshes to skeletons
  • Show available layers (the archived layer list)

Each action will be specified via a snippet of JSON which will be inserted into the neuroglancer JSON state. The list of actions and their associated JSON snippets will be provided via a new property in the :Meta node.

In the case of top-level settings, integrating them in the neuroglancer state is straightforward:

{
  "position": [
    48205.85546875,
    24408.794921875,
    26808.501953125
  ],
  "projectionOrientation": [
    0.19000111520290375,
    0.1747802048921585,
    -0.03336048871278763,
    0.9655250310897827
  ],
  "projectionScale": 115206.87860044689
}

In the case of items in the layers list, special logic will be needed. We'll require that the layer name is included in the snippet, and neuprintExplorer will locate the item in the neuroglancer layers JSON to modify. (The order of the layers will not be changed.)

"layers": [
  {
      "name": "brain-neuropils",
      "visible": true
  }
]
@neomorphic
Copy link
Collaborator

I have created a menu with the following options hard coded:

  • Reset the position/orientation to the standard brain view
  • Reset the position/orientation to the standard VNC view
  • Toggle synapses on/off
  • Toggle ROIs on/off

I am not sure how one would toggle between meshes and skeletons, but that shouldn't be hard to implement based on the reference handlers that I have added to the code.

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

2 participants