diff --git a/config.yaml b/config.yaml index 794e06a..4e8e443 100644 --- a/config.yaml +++ b/config.yaml @@ -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 diff --git a/episodes/fig/console.png b/episodes/fig/console.png new file mode 100644 index 0000000..e8f4a2a Binary files /dev/null and b/episodes/fig/console.png differ diff --git a/episodes/getting-started-with-napari.Rmd b/episodes/getting-started-with-napari.Rmd index 5052d65..1ebfdf2 100644 --- a/episodes/getting-started-with-napari.Rmd +++ b/episodes/getting-started-with-napari.Rmd @@ -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 diff --git a/episodes/instance-segmentation-classic.Rmd b/episodes/instance-segmentation-classic.Rmd index 34c6e8b..0996714 100644 --- a/episodes/instance-segmentation-classic.Rmd +++ b/episodes/instance-segmentation-classic.Rmd @@ -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) diff --git a/episodes/what-is-an-image.Rmd b/episodes/what-is-an-image.Rmd index 12f1442..1e5f030 100644 --- a/episodes/what-is-an-image.Rmd +++ b/episodes/what-is-an-image.Rmd @@ -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 Ctrl and + together. The font size can also be +decreased with Ctrl and - 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 Enter key. You should see it returns text that matches the 'Output' cell below in response. @@ -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 diff --git a/learners/setup.md b/learners/setup.md index 8a2b0ea..fca55b2 100644 --- a/learners/setup.md +++ b/learners/setup.md @@ -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