Skip to content

Commit c787644

Browse files
committed
Improve tutorials according to PR #57
The tutorials moved on a lot since that PR, so I had to redo the patch. I tried to incorporate everything that was still relevant. Co-authored-by: David Kolb <[email protected]> Co-authored-by: Gabriel Selzer <[email protected]> Co-authored-by: Jan Eglinger <[email protected]> Closes #57.
1 parent 877a471 commit c787644

File tree

3 files changed

+126
-106
lines changed

3 files changed

+126
-106
lines changed

notebooks/1-Using-ImageJ/1-Fundamentals.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
"\n",
192192
"<p><img src=\"ide-autocomplete.png\"></p>\n",
193193
"\n",
194-
"Unfortunately, here in this notebook software, the autocompletion logic is not (yet!) advanced enough to fully offer such a feature—there is only rudimentary method completion support by pressing <kbd>tab</kbd>. Hence, the `NotebookService` also includes a handy method for inspecting an object's methods. Here is an example:"
194+
"Unfortunately, here in this notebook software, the autocompletion logic is not (yet!) advanced enough to fully offer such a feature—there is only rudimentary method completion support by pressing <kbd>tab</kbd>. Hence, the `NotebookService` also includes a handy method for inspecting an object's methods. Here is an example which will show the available methods of a List:"
195195
]
196196
},
197197
{
@@ -456,7 +456,7 @@
456456
"cell_type": "markdown",
457457
"metadata": {},
458458
"source": [
459-
"A SciJava _module_ in an executable snippet of code with _typed inputs and outputs_. You can think of them as <a href=\"https://en.wikipedia.org/wiki/Subroutine\">subroutines</a>, also called _functions_ or _methods_ depending on the programming language.\n",
459+
"A SciJava _module_ is an executable snippet of code with _typed inputs and outputs_. You can think of them as <a href=\"https://en.wikipedia.org/wiki/Subroutine\">subroutines</a>, also called _functions_ or _methods_ depending on the programming language.\n",
460460
"\n",
461461
"The two most common flavors of module are _commands_ and _scripts_. A `Command` is a plugin written in Java, whereas a script is written in one of the many available [SciJava scripting languages](https://imagej.net/Scripting). Most users who need to code a module will use a script, because they are simpler to write."
462462
]
@@ -690,7 +690,7 @@
690690
"cell_type": "markdown",
691691
"metadata": {},
692692
"source": [
693-
"The true meat of ImageJ is [ImageJ Ops](https://imagej.net/Ops), a library for reusable image processing. An `Op` plugin is form of `Command`, and therefore a module.\n",
693+
"The true meat of ImageJ is [ImageJ Ops](https://imagej.net/Ops), a library for reusable image processing. An `Op` plugin is a form of `Command`, and therefore a module.\n",
694694
"\n",
695695
"Please proceed to the [ImageJ Ops](2-ImageJ-Ops.ipynb) tutorial notebook for a primer with lots of examples!"
696696
]

notebooks/1-Using-ImageJ/2-ImageJ-Ops.ipynb

+16-5
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@
564564
"source": [
565565
"The `equation` op allows you to generate an image from a formula in JavaScript syntax.\n",
566566
"\n",
567-
"Such images can be useful for testing without needing an external image source, or a long and bulky list of numbers."
567+
"Such images can be useful for testing without needing an external image source, or a long and bulky list of numbers.\n",
568+
"This `Op` will execute the equation on each pixel of the image. Within the equation the current location can be retrieved via the variable `p[]` (see example equation below)."
568569
]
569570
},
570571
{
@@ -984,7 +985,7 @@
984985
"source": [
985986
"You can also call any op in an `eval` statement as a function, using familiar function syntax.\n",
986987
"\n",
987-
"Here is an example of the `eval` op being used to compute a [Difference of Gaussians](https://en.wikipedia.org/wiki/Difference_of_Gaussians):"
988+
"The following is an example of the `eval` op being used to compute a [Difference of Gaussians](https://en.wikipedia.org/wiki/Difference_of_Gaussians). Inputs within the formula may be accessed via the `Map vars?` argument of the eval function and the key of the map corresponds to the name of the variable that can be used in the formula."
988989
]
989990
},
990991
{
@@ -1579,7 +1580,7 @@
15791580
"cell_type": "markdown",
15801581
"metadata": {},
15811582
"source": [
1582-
"Convolution is a very helpful filter for many circumstances. Below is an example of how to use the convolution filter. "
1583+
"[Convolution](https://en.wikipedia.org/wiki/Convolution) is a very helpful filter for many circumstances. Below is an example of how to use the convolution filter."
15831584
]
15841585
},
15851586
{
@@ -2059,6 +2060,14 @@
20592060
"execution_count": 49,
20602061
"metadata": {},
20612062
"outputs": [
2063+
{
2064+
"name": "stdout",
2065+
"output_type": "stream",
2066+
"text": [
2067+
"Eye bounds: (0, 0) - (39, 27)\n",
2068+
"EyeView bounds: (75, 27) - (114, 54)\n"
2069+
]
2070+
},
20622071
{
20632072
"data": {
20642073
"text/html": [
@@ -2077,6 +2086,8 @@
20772086
"eye = ij.op().run(\"crop\", image, region)\n",
20782087
"eyeView = ij.op().run(\"intervalView\", image, region)\n",
20792088
"\n",
2089+
"println(\"Eye bounds: \" + bounds(eye))\n",
2090+
"println(\"EyeView bounds: \" + bounds(eyeView))\n",
20802091
"ij.notebook().display([[\"eye\":eye, \"view\":eyeView]])"
20812092
]
20822093
},
@@ -2543,8 +2554,8 @@
25432554
"source": [
25442555
"Ops includes operators for mathematical morphology in both binary and grayscale. The two most basic morphological operators are:\n",
25452556
"\n",
2546-
"* erosion – reducing bright pixels at the borders\n",
2547-
"* dilation - growing bright pixels at the borders\n",
2557+
"* erosion – reducing bright pixels at the edges of the image\n",
2558+
"* dilation - growing bright pixels at the edges of the image\n",
25482559
"\n",
25492560
"The next two most basic are:\n",
25502561
"\n",

0 commit comments

Comments
 (0)