|
25 | 25 | }, |
26 | 26 | { |
27 | 27 | "cell_type": "code", |
28 | | - "execution_count": 1, |
| 28 | + "execution_count": null, |
29 | 29 | "metadata": {}, |
30 | | - "outputs": [ |
31 | | - { |
32 | | - "data": { |
33 | | - "text/plain": [ |
34 | | - "'2.3.0/1.53f'" |
35 | | - ] |
36 | | - }, |
37 | | - "execution_count": 1, |
38 | | - "metadata": {}, |
39 | | - "output_type": "execute_result" |
40 | | - } |
41 | | - ], |
| 30 | + "outputs": [], |
42 | 31 | "source": [ |
43 | 32 | "import imagej\n", |
44 | 33 | "ij = imagej.init('sc.fiji:fiji:2.3.1')\n", |
|
54 | 43 | "| Requirement | Code<sup>1</sup> | Reproducible?<sup>2</sup> |\n", |
55 | 44 | "|:----------------------------------------------|:---------------------------------------------------------------------|:-------------------------:|\n", |
56 | 45 | "| Newest available version of ImageJ | `ij = imagej.init()` | NO |\n", |
57 | | - "| Specific version of ImageJ | `ij = imagej.init('2.1.0')` | YES |\n", |
58 | | - "| With a GUI (newest version) | `ij = imagej.init(headless=False)` | NO |\n", |
59 | | - "| With a GUI (specific version) | `ij = imagej.init('net.imagej:imageJ:2.1.0', headless=False)` | YES |\n", |
| 46 | + "| Specific version of ImageJ | `ij = imagej.init('2.3.0')` | YES |\n", |
| 47 | + "| Interactive (newest version)* | `ij = imagej.init(mode='interactive')` | NO |\n", |
| 48 | + "| Interactive (specific version)* | `ij = imagej.init('net.imagej:imageJ:2.1.0', mode='interactive')` | YES |\n", |
60 | 49 | "| With support for ImageJ 1.x (newest versions) | `ij = imagej.init('net.imagej:imagej+net.imagej:imagej-legacy')` | NO |\n", |
61 | 50 | "| With Fiji plugins (newest version) | `ij = imagej.init('sc.fiji:fiji')` | NO |\n", |
62 | 51 | "| With Fiji plugins (specific version) | `ij = imagej.init('sc.fiji:fiji:2.1.1')` | YES |\n", |
63 | 52 | "| From a local installation | `ij = imagej.init('/Applications/Fiji.app')` | DEPENDS |\n", |
64 | 53 | "\n", |
| 54 | + "*: `mode='interactive'` is unavailalbe on MacOS. Instead use `mode='gui'`. When set to `gui` mode the Python inerpter is blocked and no longer interactive._\n", |
| 55 | + "\n", |
65 | 56 | "<sup>1</sup> pyimagej uses [`jgo`](https://github.com/scijava/jgo) internally to call up ImageJ, so all of these initializations are tied to the usage of `jgo`. You can read up on the [usage of `jgo`](https://github.com/scijava/jgo#usage) to find out more about this initialization.\n", |
66 | 57 | "\n", |
67 | 58 | "<sup>2</sup> ___Reproducible___ means code is stable, executing the same today, tomorrow, and in years to come. While it is convenient and elegant to depend on the newest version of a program, behavior may change when new versions are released—for the better if bugs are fixed; for the worse if bugs are introduced—and people executing your notebook at a later time may encounter broken cells, unexpected results, or other more subtle behavioral differences. You can help avoid this pitfall by pinning to a specific version of the software. The British Ecological Society published [Guide to Better Science: Reproducible Code](https://www.britishecologicalsociety.org/wp-content/uploads/2018/12/BES-Reproducible-Code.pdf) diving into the relevant challenges in more detail, including an [R](https://www.r-project.org/)-centric illustration of best practices. A web search for `reproducible python` also yields several detailed articles." |
|
91 | 82 | }, |
92 | 83 | { |
93 | 84 | "cell_type": "code", |
94 | | - "execution_count": 2, |
| 85 | + "execution_count": null, |
95 | 86 | "metadata": {}, |
96 | | - "outputs": [ |
97 | | - { |
98 | | - "data": { |
99 | | - "text/plain": [ |
100 | | - "'ImageJ2 2.3.0/1.53f; Java 11.0.9.1-internal [amd64]; 35MB of 8012MB'" |
101 | | - ] |
102 | | - }, |
103 | | - "execution_count": 2, |
104 | | - "metadata": {}, |
105 | | - "output_type": "execute_result" |
106 | | - } |
107 | | - ], |
| 87 | + "outputs": [], |
108 | 88 | "source": [ |
109 | 89 | "ij.getApp().getInfo(True)" |
110 | 90 | ] |
|
126 | 106 | "name": "python", |
127 | 107 | "nbconvert_exporter": "python", |
128 | 108 | "pygments_lexer": "ipython3", |
129 | | - "version": "3.10.1" |
| 109 | + "version": "3.8.10" |
130 | 110 | }, |
131 | 111 | "toc": { |
132 | 112 | "base_numbering": 1, |
|
0 commit comments