Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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 @@
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"}

Check warning on line 94 in episodes/what-is-an-image.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[missing file]: [](fig/console.png)

:::::::::::::::::::::::::::::::::::::: 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 @@
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