Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #11 from brainglobe/final-tweaks
Browse files Browse the repository at this point in the history
final tweaks
  • Loading branch information
alessandrofelder authored Dec 5, 2023
2 parents 027d63e + 581b91b commit c6eeb3d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 7 deletions.
50 changes: 49 additions & 1 deletion index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ format:

# BrainGlobe & napari

{{< include slides/brainglobe-and-napari.qmd >}}

# Registration & segmentation

# Cell detection
Expand All @@ -97,11 +99,51 @@ format:
# Bulk fluorescence mapping

# BrainGlobe & your software

## BrainGlobe & your software
* Not just standalone tools
* Python APIs to help you build your own software
* Easy compatibility with other packages
* [Released tools](https://brainglobe.info/community/external-tools.html){preview-link="true"}

## Example script
* Find all hippocampal regions (`bg-atlasapi`)
* Display them in napari (`brainrender-napari`)

## Example script (demo)
```{.python}
import napari
from bg_atlasapi import BrainGlobeAtlas
from brainrender_napari.napari_atlas_representation import NapariAtlasRepresentation
# setup a napari viewer and a brainglobe atlas
viewer = napari.viewer.Viewer()
viewer.dims.ndisplay = 3 # set to 3d mode
atlas = BrainGlobeAtlas("allen_mouse_100um")
# find all hippocampal regions
hip_id = 1080 # the id of the hippocampus is 1080
hip_regions = [
region["acronym"]
for region in atlas.structures_list
if hip_id in region["structure_id_path"]
]
# make a representation of the brainglobe atlas in napari
napari_atlas = NapariAtlasRepresentation(atlas, viewer)
# add all hippocampal regions to the napari viewer
for hip_region in hip_regions:
napari_atlas.add_structure_to_viewer(hip_region)
# add the whole brain mesh as a help for orientation
napari_atlas.add_structure_to_viewer("root")
# run this script
if __name__ == "__main__":
napari.run()
```

# Wrap up

## Resources
Expand All @@ -110,8 +152,14 @@ format:
* [Developer forum](https://brainglobe.zulipchat.com/){preview-link="true"}
* [GitHub](https://github.com/brainglobe/){preview-link="true"}

You are welcome to contribute to BrainGlobe - get in touch anytime and we will support you!

## Q+A

{{< include slides/mentimeter.qmd >}}

## Feedback

Please give us [some feedback](https://ideaboardz.com/for/BrainGlobe%20course%20feedback/5139784) on this pilot course.

# Questions
# Thank you!
25 changes: 19 additions & 6 deletions slides/installation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ conda create --name brainglobe python=3.10 -y
conda activate brainglobe
conda install napari -c conda-forge
```
On newer Macs, please also
```bash
conda install hdf5
```
Finally, double-check that running

Double-check that running
```bash
napari
```
Expand All @@ -24,4 +21,20 @@ opens a new `napari` window.
## More details

More details about using conda are available at [brainglobe.info](https://brainglobe.info/documentation/setting-up/conda.html){preview-link="true"}
:::
:::

## Install brainglobe napari plugins

::: {.callout-caution}
## Silicon Mac users
Run this first:
```bash
conda install hdf5
```
:::

Install all brainglobe tools with
```{.bash}
pip install brainglobe
```

0 comments on commit c6eeb3d

Please sign in to comment.