Open alessandrofelder opened 1 year ago
Insantiting an atlas takes a non-trivial amount of time. Not sure why, I would guess it's: https://github.com/brainglobe/bg-atlasapi/blob/b6e955df1b88b6a998cb4653cc2d76ab57911126/bg_atlasapi/core.py#L48
Rather than a specific function to get atlas metadata, can we just make instantiating the atlas quicker, either by:
While I agree that making instantiation quicker would be great, I can still see the value of a specific function to get atlas metadata :thinking: for the use case where one might want to know about the atlas without downloading it (and I don't think we can make downloading sufficiently faster)?
for the use case where one might want to know about the atlas without downloading it
Yes, good point! I forgot about this. The metadata should be hosted outside of the packaged atlas, so it can be downloaded quickly.
But I'd add that lazy computing stuff like that one is a very good idea!
The metadata should be hosted outside of the packaged atlas, so it can be downloaded quickly.
Just bumping this, I had a request for this at SfN.
Being able to access the metadata of each atlas though the atlas name, something like:
might make the UX of the napari atlas viewer widget smoother and faster, because we could avoid instantiating
BrainGlobeAtlas
classes just to display the metadata in the info box.This could provide an alternative solution for the use case described in brainglobe/bg-atlasapi#148
Maybe related to brainglobe/bg-atlasapi#107 and brainglobe/new-website#15 .