brainglobe / BrainGlobe

General information, resources and dicussions for the BrainGlobe project.
https://brainglobe.info/
10 stars 1 forks source link

Add "Layer interpreters" as independent functionality and use them in BrainGlobe #10

Open alessandrofelder opened 1 year ago

alessandrofelder commented 1 year ago

[From grant proposal] Napari provides a standardised framework for image analysis, as plugins operate upon “layers”, representations of data such as images and segmentation masks. We will develop tools to combine and convert these layers into information in a neuroanatomical context, such as summarising segmented cells as the number of cells per brain region. Developing these “layer interpreters'' to act upon fundamental napari data structures will allow current and future napari plugins to be used for neuroanatomical analyses.

adamltyson commented 10 months ago

Now the code to transform cells from raw data to atlas space has been merged into brainglobe-utils, I think it's time to tackle the first "layer interpreter", assigning cells to brain regions within napari. This is a priority, because it's one of the few parts of BrainGlobe that's only available via a CLI (brainmapper).

This will require two things:

  1. Transformation of cells from raw data to atlas space
  2. Assign cells to brain regions and summarise, analyse etc.

This will essentially allow cellfinder and brainreg to be combined within napari, allowing analysis of cellular distributions within a whole brain image, entirely within a GUI.

This was previously attempted in cellfinder-napari (https://github.com/brainglobe/cellfinder-napari/pull/117, https://github.com/brainglobe/cellfinder-napari/pull/153). It shouldn't go there anymore, but there's a question about where it should now go (alongside other "layer interpreters). Originally I had thought that it should be a seperate package, and brainglobe-utils should have minimal dependencies. However, realistically, brainglobe-utils will always need to work alongside napari.

So @brainglobe/active-devs, are you happy to turn brainglobe-utils into a napari plugin, and begin to expose analysis functionality as napari widgets?

alessandrofelder commented 10 months ago

I agree that this should be a priority, and I agree with brainglobe-utils needing to work alongside napari, and therefore happy for it to have a napari component if needed.

I think the name brainglobe-utils is somewhat unintuitive for user facing analysis code. Do we have other existing repos where it might fit? brainglobe-space?

adamltyson commented 10 months ago

Decided to go with brainglobe-utils for now, but maybe move it later.