You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ Note that some of the materials in this tuorial are slightly out of date by now (2022), but recent feedback has shown that the tutorial is still very useful and approachable for many learners. I would like to create an updated and slightly extended version by the end of the year, but academic pressures limit my ability to work on this, so we'll have to see how it goes. 🤞 (Jonas, May 22)
11
+
⚠️ Note that some of the materials in this tuorial are slightly out of date by now (2023), but recent feedback has shown that the tutorial is still very useful and approachable for many learners. I would like to create an updated and slightly extended version at some point, but academic pressures limit my ability to work on this, so we'll have to see how it goes... 🤞
12
12
13
-
-----
13
+
(The latest maintenance update was done on 17.02.2023 for python 3.9.16 (basic Anaconad distro), with thanks to @Koushouu!)
14
14
15
+
-----
15
16
16
17
## Aims and Overview
17
18
@@ -23,39 +24,36 @@ Everything you need to know to get started can be found in the jupyter notebook
23
24
24
25
Note that this tutorial was part of a course aimed at people with basic knowledge of python. The course included introductory sessions/lectures on scientific python (in particular `numpy` and `matplotlib`) as well as on image analysis (see the slides in this repository). For those tackling this tutorial on their own, it is therefore recommended to first acquire basic scientific python knowledge elsewhere (e.g. at [python-course.eu](https://www.python-course.eu)).
- Postprocessing: Removing Cells at the Image Border
53
-
- Identifying Cell Edges
54
-
- Extracting Quantitative Measurements
55
-
- Simple Analysis & Visualization
56
-
- Writing Output to Files
57
-
- Batch Processing
58
-
43
+
- Importing Modules & Packages
44
+
- Loading & Handling Image Data
45
+
- Preprocessing
46
+
- Manual Thresholding & Threshold Detection
47
+
- Adaptive Thresholding
48
+
- Improving Masks with Binary Morphology
49
+
- Connected Components Labeling
50
+
- Cell Segmentation by Seeding & Expansion
51
+
- Postprocessing: Removing Cells at the Image Border
52
+
- Identifying Cell Edges
53
+
- Extracting Quantitative Measurements
54
+
- Simple Analysis & Visualization
55
+
- Writing Output to Files
56
+
- Batch Processing
59
57
60
58
## Old Versions and Other Sources
61
59
@@ -65,7 +63,6 @@ If you are looking for the python 2 version from 2017, see the `2017_legacy_pyth
65
63
66
64
The original 2016 materials can be found in Karin Sasaki's corresponding Github [repo](https://github.com/karinsasaki/python-workshop-image-processing).
67
65
68
-
69
66
## Acknowledgements
70
67
71
68
The first version of this tutorial was created for the `EMBL Python Workshop - Image Processing` course organized by Karin Sasaki and Jonas Hartmann in 2016. Additional lecturers and TAs contributing to this course were Kota Miura, Volker Hilsenstein, Aliaksandr Halavatyi, Imre Gaspar, and Toby Hodges.
@@ -76,7 +73,6 @@ The third version of this tutorial was part of the `EMBL Bio-IT/ALMF Image Analy
76
73
77
74
Many thanks to all the helpful collaborators and the interested students who were instrumental in making these courses a success.
78
75
79
-
80
76
## Feedback
81
77
82
78
Feedback on this tutorial is always welcome! Please open an issue on GitHub or write to *jonas.hartmann(AT)ucl.ac.uk*.
Copy file name to clipboardExpand all lines: image_analysis_tutorial.ipynb
+7-7
Original file line number
Diff line number
Diff line change
@@ -94,8 +94,7 @@
94
94
"\n",
95
95
"#### Python version\n",
96
96
"\n",
97
-
"- The solutions are provided in **python 3.6** (but any version of python 3 should work without changes)\n",
98
-
"- Everything shown in the solutions also works in python 2.7 with only very minor changes.\n",
97
+
"- The solutions were last tested with **python 3.9**, but any version of python 3 should work without changes\n",
99
98
"- To install python, jupyter notebook and the required modules, we recommend the **Anaconda Distribution**. The installer can be downloaded [here](https://www.anaconda.com/download/).\n",
100
99
"\n",
101
100
"\n",
@@ -106,6 +105,7 @@
106
105
" - scipy\n",
107
106
" - matplotlib\n",
108
107
" - scikit-image\n",
108
+
" - ipywidgets\n",
109
109
"- All required modules come pre-installed if you are using the **[Anaconda distribution](https://www.anaconda.com/download/)** of python."
110
110
]
111
111
},
@@ -481,7 +481,7 @@
481
481
"source": [
482
482
"# (ii) Perform the smoothing on the image\n",
483
483
"\n",
484
-
"# To do so, use the Gaussian filter function 'ndi.filters.gaussian_filter' from the \n",
484
+
"# To do so, use the Gaussian filter function 'ndi.gaussian_filter' from the \n",
485
485
"# image processing module 'scipy.ndimage', which was imported at the start of the tutorial. \n",
486
486
"# Check out the documentation of scipy to see how to use this function. \n",
487
487
"# Allocate the output to a new variable.\n",
@@ -639,9 +639,9 @@
639
639
"\n",
640
640
"*Important note for those who get a static image (no slider) or a text warning:*\n",
641
641
"\n",
642
-
"For some users, it is necessary to specifically activate the widgets plugin for Jupyter notebook. To do so, save and exit Jupyter notebook, then go to a terminal and write `jupyter nbextension enable --py --sys-prefix widgetsnbextension`. After this, you should be able to restart Jupyter notebook and the widget should display correctly. \n",
642
+
"For some users, it is necessary to specifically activate the widgets plugin for Jupyter notebook. To do so, save and exit Jupyter notebook, then go to a terminal (or Anaconda prompt) and write `jupyter nbextension enable --py --sys-prefix widgetsnbextension`. After this, you should be able to restart Jupyter notebook and the widget should display correctly. \n",
643
643
"\n",
644
-
"If it still doesn't work, you may instead have to type `jupyter nbextension enable --py widgetsnbextension` in the terminal. However, note that this implies that your installation of Conda/Jupyter is not optimally configured (see [this GitHub issue](https://github.com/jupyter-widgets/ipywidgets/issues/541) for more information, although this is not something you necessarily need to worry about in the context of this course).\n",
644
+
"If it still doesn't work, you may instead have to type `jupyter nbextension enable --py widgetsnbextension` in the terminal (or Anaconda prompt). However, note that this implies that your installation of Conda/Jupyter is not optimally configured (see [this GitHub issue](https://github.com/jupyter-widgets/ipywidgets/issues/541) for more information, although this is not something you necessarily need to worry about in the context of this course).\n",
645
645
"\n",
646
646
"----"
647
647
]
@@ -1077,7 +1077,7 @@
1077
1077
"source": [
1078
1078
"# (iii) Smoothen the distance transform\n",
1079
1079
"\n",
1080
-
"# Use 'ndi.filters.gaussian_filter' to do so.\n",
1080
+
"# Use 'ndi.gaussian_filter' to do so.\n",
1081
1081
"# You will have to optimize your choice of 'sigma' based on the outcome below.\n",
1082
1082
"### YOUR CODE HERE!"
1083
1083
]
@@ -1126,7 +1126,7 @@
1126
1126
"# using the function 'np.ma.array' with the keyword argument 'mask'. \n",
1127
1127
"# Check the docs or Stack Overflow to figure out how to do this.\n",
1128
1128
"\n",
1129
-
"# BONUS: As an additional improvement for the visualization, use 'ndi.filters.maximum_filter' to dilate the \n",
1129
+
"# BONUS: As an additional improvement for the visualization, use 'ndi.maximum_filter' to dilate the \n",
1130
1130
"# seeds a little bit, making them bigger and thus better visible.\n",
0 commit comments