Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharePoint for data download #320

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ea14cca
Merge pull request #1 from bear-rsg/changes-from-remote
JeremyPike Dec 18, 2023
d7dd3d3
Merge branch 'main' of https://github.com/datacarpentry/image-processing
JeremyPike Jan 3, 2024
98621f8
Merge pull request #2 from bear-rsg/changes-from-carpentries
JeremyPike Jan 3, 2024
dcfec5d
multi-demensional data episode
JeremyPike Jan 3, 2024
adcf749
Merge pull request #3 from bear-rsg/napari
JeremyPike Jan 3, 2024
a910bc4
adding multi-dimensional episode
JeremyPike Jan 3, 2024
787ab49
Merge pull request #4 from bear-rsg/napari
JeremyPike Jan 3, 2024
4a4173d
introductory sections
JeremyPike Jan 3, 2024
0cb9af3
conflicts
JeremyPike Jan 3, 2024
04f9e68
napari introduction
JeremyPike Jan 3, 2024
a1c6551
interactive visulaistation section
JeremyPike Jan 10, 2024
26afca3
missing section end
JeremyPike Jan 10, 2024
1554ca7
numpy import
JeremyPike Jan 10, 2024
5dc5dd2
3d data section
JeremyPike Jan 11, 2024
78dca15
timelapse section
JeremyPike Jan 11, 2024
4b87fc4
complete first draft
JeremyPike Jan 19, 2024
774ca57
updated setup
JeremyPike Jan 19, 2024
365fcb3
updates to setup
JeremyPike Jan 19, 2024
0b84513
proofread
JeremyPike Jan 19, 2024
11efe40
Suggestions from James A review
JeremyPike Jan 26, 2024
3701002
Merge pull request #5 from bear-rsg/napari
JeremyPike Jan 26, 2024
510da5f
Add note on multidimensional data episode
JeremyPike Jan 26, 2024
e8bc9e3
Merge pull request #6 from bear-rsg/readme-modification
JeremyPike Jan 26, 2024
e030a55
New data download link
JeremyPike Jan 26, 2024
e394601
updated data link
JeremyPike Jan 26, 2024
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ This lesson introduces fundamental concepts in image handling and processing. Le
The lesson assumes a working knowledge of Python and some previous exposure to the Bash shell.
A detailed list of prerequisites can be found in [`learners/prereqs.md`](learners/prereqs.md).

## Multidimensional Data Episode

There is an extra episode covering analysis of multidimensional data (3D stacks and timelapses) including use of the [Napari](https://napari.org/stable/) image viewer. This additional episode is not part of the official [Carpentries Image Processing with Python lesson](https://datacarpentry.org/image-processing/). It was developed by [Jeremy Pike](https://www.birmingham.ac.uk/research/arc/rsg/staff/jeremy-pike.aspx) from the [Research Software Group](https://www.birmingham.ac.uk/research/arc/rsg/bear-software.aspx) and the
[Institute for Interdisciplinary Data Science and AI](https://www.birmingham.ac.uk/research/data-science/index.aspx) at the University of Birmingham.

## Contribution

- Make a suggestion or correct an error by [raising an Issue](https://github.com/datacarpentry/image-processing/issues).
Expand Down
9 changes: 5 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ contact: '[email protected]'
# - another-learner.md

# Order of episodes in your lesson
episodes:
episodes:
- 01-introduction.md
- 02-image-basics.md
- 03-skimage-images.md
Expand All @@ -68,15 +68,16 @@ episodes:
- 07-thresholding.md
- 08-connected-components.md
- 09-challenges.md
- 10-multidimensional-data.md

# Information for Learners
learners:
learners:

# Information for Instructors
instructors:
instructors:

# Learner Profiles
profiles:
profiles:

# Customisation ---------------------------------------------
#
Expand Down
660 changes: 660 additions & 0 deletions episodes/10-multidimensional-data.md

Large diffs are not rendered by default.

Binary file added episodes/fig/cells-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells-seperate-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells-timelapse-mask-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells-timelapse-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells-timelapse-tracking-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells3d-blurred-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells3d-labels-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells3d-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells3d-slice-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells3d-volume-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells_timelapse_area_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells_timelapse_mean_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/cells_timelapse_tracking_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/colonies-03-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/colonies-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/nuc-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added episodes/fig/shapes-napari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 54 additions & 51 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,43 @@
permalink: /setup/
---

Before joining the workshop or following the lesson, please complete the data and software setup described in this page.
Before joining the workshop or following the lesson, please complete the data and software setup
described in this page.

## Data

The example images used in this lesson are available on [FigShare](https://figshare.com/).
To download the data, please visit [the dataset page for this workshop][figshare-data]
and click the "Download all" button.
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily find it again,
The example images used in this lesson are available for University of Birmingham staff on SharePoint.
Please follow this [link](https://bham.sharepoint.com/sites/AdvancedResearchComputing-Department/_layouts/15/guestaccess.aspx?share=Eh38JNN264JBv0krIXjdgBcB3bIYFedVU2jRR1hjIQM1pw&e=es0Hsf),

Check warning on line 12 in learners/setup.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[uninformative link text]: [link](https://bham.sharepoint.com/sites/AdvancedResearchComputing-Department/_layouts/15/guestaccess.aspx?share=Eh38JNN264JBv0krIXjdgBcB3bIYFedVU2jRR1hjIQM1pw&e=es0Hsf)
log on if required, and click "Download".
Unzip the downloaded file, and save the contents as a folder called `data` somewhere you will easily
find it again,
e.g. your Desktop or a folder you have created for using in this workshop.
(The name `data` is optional but recommended, as this is the name we will use to refer to the folder throughout the lesson.)
(The name `data` is optional but recommended, as this is the name we will use to refer to the folder
throughout the lesson.)

## Software

1. Download and install the latest [Anaconda
distribution](https://www.anaconda.com/download/) for your
operating system. Make sure to choose the Python 3 version (as
opposed to the one with Python 2). If you wish to use an existing
installation, be sure to upgrade your scikit-image to at least 0.19.
You can upgrade to the latest scikit-image using the shell command that follows.

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

## Updating scikit-image in an existing Anaconda distribution

```shell
conda upgrade -y scikit-image
```

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

2. This lesson uses Matplotlib features to display images, and some
interactive features will be valuable. To enable the interactive
tools in JupyterLab, the `ipympl` package is required. The package
can be installed with the command
opposed to the one with Python 2).
2. Set up a Conda environment for this Lesson and install the
necessary packages. Windows users will need to run these commands within a Anaconda Prompt.

```shell
conda install -c conda-forge ipympl
conda create -y -n image-env -c conda-forge python=3.9
conda activate image-env
conda install -c conda-forge scikit-image ipympl napari pyqt jupyterlab
```

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

## Enabling the `ipympl` backend in Jupyter notebooks

The `ipympl` backend can be enabled with the `%matplotlib` Jupyter
This lesson uses Matplotlib features to display images, and some
interactive features will be valuable. To enable the interactive
tools in JupyterLab, the `ipympl` package is required.The `ipympl` backend can be enabled with
the `%matplotlib` Jupyter
magic. Put the following command in a cell in your notebooks
(e.g., at the top) and execute the cell before any plotting commands.

Expand All @@ -65,7 +58,6 @@
file](https://github.com/matplotlib/ipympl#readme) for the `ipympl`
package.


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

3. Open a Jupyter notebook:
Expand All @@ -74,47 +66,59 @@

## Instructions for Linux \& Mac

Open a terminal and type `jupyter lab`.
Open a terminal activate your environment and open Jupyter Lab:

```shell
conda activate image-env
jupyter lab
```

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

:::::::::::::::: spoiler

## Instructions for Windows

Launch the Anaconda Prompt program and type `jupyter lab`.
(Running this command on the standard Command Prompt will return an error:
Launch the Anaconda Prompt program and run your commands within this.
(Running conda commands on the standard Command Prompt will return an error:
`'conda' is not recognized as an internal or external command, operable program or batch file.`)


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

After Jupyter Lab has launched, click the "Python 3" button under "Notebook" in the launcher window,
After Jupyter Lab has launched, click the "Python 3" button under "Notebook" in the launcher
window,
or use the "File" menu, to open a new Python 3 notebook.

4. To test your environment, run the following lines in a cell of the notebook:

```python
import imageio.v3 as iio
import matplotlib.pyplot as plt
import skimage as ski
```python
import imageio.v3 as iio
import matplotlib.pyplot as plt
import skimage as ski
import napari

%matplotlib widget
%matplotlib widget

# load an image
image = iio.imread(uri='data/colonies-01.tif')
# load an image
image = iio.imread(uri='data/colonies-01.tif')

# rotate it by 45 degrees
rotated = ski.transform.rotate(image=image, angle=45)
# rotate it by 45 degrees
rotated = ski.transform.rotate(image=image, angle=45)

# display the original image and its rotated version side by side
fig, ax = plt.subplots(1, 2)
ax[0].imshow(image)
ax[1].imshow(rotated)
```
# display the original image and its rotated version side by side
fig, ax = plt.subplots(1, 2)
ax[0].imshow(image)
ax[1].imshow(rotated)

Upon execution of the cell, a figure with two images should be displayed in an interactive widget. When hovering over the images with the mouse pointer, the pixel coordinates and colour values are displayed below the image.
# open the image in Napari
viewer = napari.Viewer()
viewer.add_image(data=image, name="colonies_01", rgb=True)
```

Upon execution of the cell, a figure with two images should be displayed in an interactive
widget. When hovering over the images with the mouse pointer, the pixel coordinates and colour
values are displayed below the image. It will also open a Napari Viewer and display an image
within it.

:::::::::::::::: spoiler

Expand All @@ -129,11 +133,10 @@
you can run the cell by selecting "Run" -> "Run selected cell" in the top menu,
or pressing <kbd>Shift</kbd>\+<kbd>Enter</kbd>.


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

5. A small number of exercises will require you to run commands in a terminal. Windows users should
use PowerShell for this. PowerShell is probably installed by default but if not you should
[download and install](https://apps.microsoft.com/detail/9MZ1SNWT0N5D?hl=en-eg&gl=EG) it.
5. A small number of exercises will require you to run commands in a terminal. Windows users should
use PowerShell for this. PowerShell is probably installed by default but if not you
should [download and install](https://apps.microsoft.com/detail/9MZ1SNWT0N5D?hl=en-eg&gl=EG) it.

[figshare-data]: https://figshare.com/articles/dataset/Data_Carpentry_Image_Processing_Data_beta_/19260677
Loading