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

Have region name in surface layer metadata #97

Open
alessandrofelder opened this issue Sep 19, 2023 · 5 comments
Open

Have region name in surface layer metadata #97

alessandrofelder opened this issue Sep 19, 2023 · 5 comments

Comments

@alessandrofelder
Copy link
Member

Naming convention for region meshes is and ending in abbreviation, e.g....CB_mesh. Maybe region name should be in metadata so it displays in the tooltip?

@kira1228
Copy link
Contributor

kira1228 commented Mar 7, 2025

@alessandrofelder

I don't know if I can, but can I work on this problem?

@kira1228
Copy link
Contributor

kira1228 commented Mar 7, 2025

Hi @alessandrofelder

I have a rough idea of taking the name attribute from the following structure and adding it to the surface layer.

STRUCTURE_TEMPLATE = {
"acronym": "VIS", # shortened name of the region
"id": 3, # region id
"name": "visual cortex", # full region name
"structure_id_path": [1, 2, 3], # path to the structure in the structures hierarchy, up to current id
"rgb_triplet": [255, 255, 255], # default color for visualizing the region, feel free to leave white or randomize it
}

Do you think this is going to work out? 🤔

@alessandrofelder
Copy link
Member Author

Yes, you are welcome to tackle this, but I am not sure this issue is even possible 😢 so tackle this at your own risk ⚠ it may require major surgery to the code!

Let me clarify (and modify) the issue a bit:

This is the current situation:

Image

You can see in the layer list on the lower left, that the layer name and the tooltip of the layer are the same. I don't think it is possible to change this. Maybe you can find out?

Alternatively, we might be able to change the tooltip when we hover over a surface layer in the 3D view, similarly to what we do for 2D view currently. Then we could incorporate some custom tooltip text in the layer metadata, and display it in the 3D view. This might work, but the only way to know for sure is to try :)

@alessandrofelder
Copy link
Member Author

In terms of what the tooltip text should be, we suggest (for now):

  • change the Surface layer name to be the name of the region
  • make the tooltip text a formatted string like f"{name} ({acronym}) ({atlas_name})" so for example "Diencephalon (Di) (Eurasian Blackcap)" in the screenshot above

@kira1228
Copy link
Contributor

kira1228 commented Mar 7, 2025

I was thinking almost the same thing!
I'll see if I can do it as I have an idea of how to implement it. Thanks for the advice!

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

No branches or pull requests

2 participants