You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have set a different path for my brainglobe_dir variable in the config file for brainglobe_atlasapi than the default. When I load the brainrender widget in napari, I can see the atlases I have in this folder. However, when I click an atlas once to view the structures, I get a stack or errors (shown in screenshots)
To Reproduce
Step 1: Change brainglobe_dir in config file (~/.config/brainglobe/bg_config.conf)
Step 2: Add an atlas to installation
Step 3: Open brainrender widget in napari and click atlas from the list
Expected behaviour
List of structures should appear and I should be able to load in meshes
Screenshots
Computer used (please complete the following information):
OS: Ubuntu
Version 18.j04
Additional context
Interestingly, double clicking does work to show the annotation and reference images
The text was updated successfully, but these errors were encountered:
import json
from pathlib import Path
from brainglobe_atlasapi.list_atlases import get_local_atlas_version
+ from brainglobe_atlasapi import config
def read_atlas_metadata_from_file(atlas_name: str):
"""Reads atlas metadata stored in a `.json` in the BrainGlobe directory."""
- brainglobe_dir = Path.home() / ".brainglobe"+ brainglobe_dir = config.get_brainglobe_dir()
with open(
brainglobe_dir
/ f"{atlas_name}_v{get_local_atlas_version(atlas_name)}"
/ "metadata.json",
) as metadata_file:
return json.loads(metadata_file.read())
def read_atlas_structures_from_file(atlas_name: str):
"""Reads structure info from a '.json' in the BrainGlobe directory."""
- brainglobe_dir = Path.home() / ".brainglobe"+ brainglobe_dir = config.get_brainglobe_dir()
with open(
brainglobe_dir
/ f"{atlas_name}_v{get_local_atlas_version(atlas_name)}"
/ "structures.json",
) as metadata_file:
return json.loads(metadata_file.read())
Technically the error I encountered came from just the second function there, I didn't see references to read_atlas_metadata_from_file, but included the change there anyways, too
Describe the bug
I have set a different path for my brainglobe_dir variable in the config file for brainglobe_atlasapi than the default. When I load the brainrender widget in napari, I can see the atlases I have in this folder. However, when I click an atlas once to view the structures, I get a stack or errors (shown in screenshots)
To Reproduce
Step 1: Change brainglobe_dir in config file (~/.config/brainglobe/bg_config.conf)
Step 2: Add an atlas to installation
Step 3: Open brainrender widget in napari and click atlas from the list
Expected behaviour
List of structures should appear and I should be able to load in meshes
Screenshots
Computer used (please complete the following information):
Additional context
Interestingly, double clicking does work to show the annotation and reference images
The text was updated successfully, but these errors were encountered: