-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.qmd
246 lines (175 loc) · 6.92 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
format:
revealjs:
theme: default
logo: "images/JAX_logo_rgb_transparentback.png"
slide-number: true
footer: Northeast Bioimage Analysis Meeting
transition: "slide"
highlight-style: arrow
chalkboard:
buttons: false
controls-layout: bottom-right
jupyter: python3
execute:
cache: true
---
## This slide intentionally left blank
##
### Contributing to the napari community:
#### widgets, plugins, napari core, documentation—oh my!
<br/>
:::: {.columns}
::: {.column width="65%"}
**Peter Sobolewski (he/him)**
>Systems Analyst
>Imaging Applications
>Research IT
>The Jackson Laboratory
>Member, napari core developer team
:::
::: {.column width="35%"}
![](images/napari_logo.svg){width="300" fig-alt="napari logo" fig-align="right"}
:::
::::
## What is napari?
a Python library for n-dimensional image visualisation, annotation, and analysis.
![](images/viewer_screenshot.png){fig-alt="screenshot of napari viewer in 3D rendering mode showing 3 layers: 1) image of cell nuclei (green), 2) image of cell membranes (purple), 3) points indicating nuclei (red)" height="500" }
## What can napari be used for?
- view & explore 2D, 3D, and higher-dimensional arrays
- overlay derived data such as points, polygons, labels, and more
- seamlessly weave exploration, computation, and annotation together in imaging data analysis
- leverage scientific Python ecosystem
## napari is an open-source, community developed project—anyone can contribute! {.center}
## What is the napari community?
- napari users: local and global
- napari plugin developers
- napari core developers
- broader scientific Python community
## Ask and answer questions!
- image.sc forum: [https://forum.image.sc/tag/napari](https://forum.image.sc/tag/napari)
- napari Zulip chat: [https://napari.zulipchat.com](https://napari.zulipchat.com/)
- napari community meetings: [https://napari.org/stable/community/meeting_schedule.html](https://napari.org/stable/community/meeting_schedule.html)
::: aside
No accounts are needed to lurk...
:::
::: {.notes}
domain specific knowledge is valuable too!
feedback, Q&A, share use cases
:::
## Report bugs—or test existing ones
- GitHub Issues: [https://github.com/napari/napari/issues](https://github.com/napari/napari/issues)
- Reporting bugs/problems/inconstencies/confusion is **extremely valuable!**
- When in doubt, report—we prefer duplicates than crickets!
::: aside
This does require an account (free), **but you can use that account to login at image.sc and zulipchat.com!**
:::
::: {.notes}
reporting problems is very valuable!
:::
## Discuss features and use-cases
- napari roadmap: [https://github.com/orgs/napari/projects/24/views/1](https://github.com/orgs/napari/projects/24/views/1)
- GitHub Issues: [https://github.com/napari/napari/issues](https://github.com/napari/napari/issues)
::: aside
Please check existing issues and/or join a Community meeting!
:::
##
> # Headless napari is just Python!
### -- Juan Nunez-Iglesias (**@jni**)
## Share Python scripts & notebooks!
```{python}
#| code-fold: true
#| code-summary: "expand for full code"
#| echo: true
from skimage import data
from scipy import ndimage as ndi
import napari
blobs = data.binary_blobs(length=128, volume_fraction=0.1, n_dim=3)
labeled = ndi.label(blobs)[0]
viewer, image_layer = napari.imshow(blobs, name='blobs')
viewer.add_labels(labeled, name='blob ID')
viewer.dims.ndisplay = 3
viewer.camera.zoom = 3
viewer.camera.angles = (3, 38, 53)
if __name__ == '__main__':
napari.run()
```
```{python}
#| echo: false
from napari.utils import nbscreenshot
nbscreenshot(viewer, alt_text="A rotated 3D view of labled blobs")
```
```{python}
#| echo: false
#| outout: false
viewer.close()
```
## Python scripts can handle keyboard and mouse events!
- Customize napari functionality:
* keyboard and mouse events: [https://napari.org/stable/howtos/connecting_events.html](https://napari.org/stable/howtos/connecting_events.html)
```python
@viewer.bind_key('a')
def accept_image(viewer):
msg = 'this is a good image'
viewer.status = msg
print(msg)
```
- Example: [https://napari.org/stable/gallery/custom_mouse_functions.html](https://napari.org/stable/gallery/custom_mouse_functions.html#sphx-glr-gallery-custom-mouse-functions-py)
::: {.notes}
events how-to
:::
## Python scripts can contribute widgets!
![](images/magic_parameter_screenshot.png){height="450" fig-alt="Screenshot of napari UI with a docked widget on the right for applying scikit-image filters" fig-align="center"}
::: aside
Example: [https://napari.org/stable/gallery/magic_parameter_sweep.html](https://napari.org/stable/gallery/magic_parameter_sweep.html)
:::
## Python scripts can contribute widgets!
- [`magicgui`](https://pyapp-kit.github.io/magicgui/) makes this quite easy, see [https://napari.org/stable/guides/magicgui.html](https://napari.org/stable/guides/magicgui.html)
- ...but you can also use `Qt` for maximal control by subclassing `QWidget`
## How to share Python scripts & notebooks
- email/fileshare with colleagues, collaborators, etc.
- use GitHub:
* use GitHub Gists: [https://gist.github.com](https://gist.github.com/)
* make a repository of scripts
- with publication (Zenodo, etc.)
## Develop a napari plugin
napari plugins are Python packages that can:
- add file-type readers & writers
- customize functionality (events)
- extend the GUI (widgets, menus)
- provide demo/sample data
Plugin developer guide: [https://napari.org/dev/plugins/index.html](https://napari.org/dev/plugins/index.html)
::: {.notes}
over 350, you can also choose to contribute to existing plugins
:::
## Plugins can be installed from within napari
- plugins can be publically discoverable and have global reach via PyPI and [napari-hub.org](https://napari-hub.org)
![](images/napari_plugin_UI.png){height="400" fig-alt="Screenshot of napari UI showing the plugin install/uninstall UI" fig-align="center"}
## Contribute to documentation
napari documentation repository: [https://github.com/napari/docs](https://github.com/napari/docs)
Contribution guide: [https://napari.org/dev/developers/documentation/index.html](https://napari.org/dev/developers/documentation/index.html)
- write a how-to, guide, or tutorial
- share a workshop
- help document features/use cases
- copy edit & review
::: aside
Don't forget you can contribute to the documentation of your favorite plugin too!
:::
::: {.notes}
plugin docs
:::
## Contribute code
napari repository: [https://github.com/napari/napari](https://github.com/napari/napari)
Contribution guide: [https://napari.org/dev/developers/contributing.html](https://napari.org/dev/developers/contributing.html)
- fix a bug (close an issue)
- write an example for the Gallery
- implement a feature
- review code
::: aside
Don't forget about plugins! You can contribute code to them too!
:::
::: {.notes}
other napari repos npe2
napari ecosystem
:::
## Hope to see you soon! <br/> Thank you! {.center}