Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ contact: 'team@carpentries.org'
episodes:
- imaging-software.Rmd
- getting-started-with-napari.Rmd
- napari-notebook.Rmd
- what-is-an-image.Rmd
- napari-notebook.Rmd
- instance-segmentation-classic.Rmd

# Information for Learners
Expand Down
Binary file added episodes/fig/console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion episodes/getting-started-with-napari.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ various aspects of the Napari viewer:
https://raw.githubusercontent.com/napari/napari/main/src/napari/resources/icons/console.svg
){alt="A screenshot of Napari's console button" height='30px'}

This button opens Napari's built-in python console.
This button opens Napari's built-in python console, where we can enter in
Python commands to interact with the imaging data.

### 2D/3D ![](
https://raw.githubusercontent.com/napari/napari/main/src/napari/resources/icons/2D.svg
Expand Down
3 changes: 3 additions & 0 deletions episodes/instance-segmentation-classic.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ image = viewer.layers["nuclei"].data
# Smooth the image
blurred = gaussian(image, sigma=3)

# Add the image to the viewer
viewer.add_images(blurred)

# Compute a threshold
threshold = threshold_otsu(blurred)

Expand Down
30 changes: 27 additions & 3 deletions episodes/what-is-an-image.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,30 @@ We've seen that images are made of individual units called pixels that have
specific values - but how is an image really represented in the computer? Let's
dig deeper into Napari's `Image` layers...

In our notebook, let's look at the human mitosis image more closely - copy the text in the
First, open Napari's built-in Python console by pressing the console button ![](
https://raw.githubusercontent.com/napari/napari/main/src/napari/resources/icons/console.svg
){alt="A screenshot of Napari's console button" height='30px'}.
Note this can take a few seconds to open, so give it some time:

![](fig/console.png){alt="A screenshot of Napari's console"}

:::::::::::::::::::::::::::::::::::::: callout

### Console readability

You can increase the font size in the console by clicking inside it, then
pressing <kbd>Ctrl</kbd> and <kbd>+</kbd> together. The font size can also be
decreased with <kbd>Ctrl</kbd> and <kbd>-</kbd> together.

Note that you can also pop the console out into its own window by clicking the
small ![](
https://raw.githubusercontent.com/napari/napari/main/src/napari/resources/icons/pop_out.svg
){alt="A screenshot of Napari's float panel button" height='30px'}
icon on the left side.

::::::::::::::::::::::::::::::::::::::::::::::::

Let's look at the human mitosis image more closely - copy the text in the
'Python' cell below into Napari's console and then press the <kbd>Enter</kbd>
key. You should see it returns text that matches the 'Output' cell below in
response.
Expand All @@ -97,8 +120,9 @@ here we access the top (first) layer with `viewer.layers[0]`. Then, to access
the actual image data stored in that layer, we retrieve it with `.data`:

:::::::::::::::::::::::: instructor
# By number of by label
SHow that the layer can also be accessed via the name of the layer
# Working in the console
Instead of the notebook, use the console. And by sow that the layer can also
be accessed via the name of the layer
::::::::::::::::::::::::

```python
Expand Down
11 changes: 11 additions & 0 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ All images will be pre-loaded examples that are already part of Napari.
Provided Napari software is loaded correctly, you are all set!

## Software Setup

### Opening a Terminal

You will need a terminal to run some of the setup instructions and commands
for this workshop:

- **Windows (if you used Miniforge)**: Click Start > Search for Miniforge Prompt > Click to Open
- **Windows (if you used Anaconda)**: Click Start > Search for Anaconda Prompt > Click to Open
- **macOS**: Launchpad > Other Application > Terminal
- **Linux**: Open a terminal window

### Install uv

`uv` is a Python package manager and environment tool. Use the
Expand Down