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

Update ImageJ2/Fiji version in the docs and improve toc layout #276

Merged
merged 13 commits into from
Aug 10, 2023
26 changes: 19 additions & 7 deletions doc/01-Starting-PyImageJ.ipynb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook is part of the PyImageJ [Tutorial Series](./notebooks.rst), and assumes familiarity with the ImageJ API. Dedicated tutorials for ImageJ can be found [here](https://imagej.net/tutorials/)."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -27,19 +29,20 @@
"name": "stdout",
"output_type": "stream",
"text": [
"ImageJ version: 2.5.0/1.53r\n"
"ImageJ version: 2.14.0/1.54f\n"
]
}
],
"source": [
"import imagej\n",
"\n",
"# initialize ImageJ\n",
"ij = imagej.init('sc.fiji:fiji:2.5.0')\n",
"ij = imagej.init('sc.fiji:fiji:2.14.0')\n",
"print(f\"ImageJ version: {ij.getVersion()}\")"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -48,12 +51,12 @@
"| Requirement | Code<sup>1</sup> | Reproducible?<sup>2</sup> |\n",
"|:-------------------------------------------------------|:------------------------------------------------------------------|:-------------------------:|\n",
"| Newest available version of ImageJ2 w/ ImageJ support | `ij = imagej.init()` | NO |\n",
"| Specific version of ImageJ2 w/ ImageJ support | `ij = imagej.init('2.5.0')` | YES |\n",
"| Specific version of ImageJ2 w/ ImageJ support | `ij = imagej.init('2.14.0')` | YES |\n",
"| Interactive (newest version)* | `ij = imagej.init(mode='interactive')` | NO |\n",
"| Interactive (specific version)* | `ij = imagej.init('net.imagej:imagej:2.5.0', mode='interactive')` | YES |\n",
"| Interactive (specific version)* | `ij = imagej.init('net.imagej:imagej:2.14.0', mode='interactive')` | YES |\n",
"| Without support for original ImageJ (newest versions) | `ij = imagej.init('net.imagej:imagej', add_legacy=False` | NO |\n",
"| With Fiji plugins (newest version) | `ij = imagej.init('sc.fiji:fiji')` | NO |\n",
"| With Fiji plugins (specific version) | `ij = imagej.init('sc.fiji:fiji:2.5.0')` | YES |\n",
"| With Fiji plugins (specific version) | `ij = imagej.init('sc.fiji:fiji:2.14.0')` | YES |\n",
"| From a local installation | `ij = imagej.init('/Applications/Fiji.app')` | DEPENDS |\n",
"\n",
"*: _`mode='interactive'` is unavailalbe on macOS. Instead use `mode='gui'`. When set to `gui` mode the Python interpeter is blocked and no longer interactive. Check out the [initialization](Initialization.md) documentation for more information._\n",
Expand All @@ -64,6 +67,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -81,6 +85,13 @@
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Operating in headless mode - the original ImageJ will have limited functionality.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand All @@ -99,6 +110,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -128,7 +140,7 @@
{
"data": {
"text/plain": [
"'ImageJ2 2.5.0/1.53r; Java 11.0.15-internal [amd64]; 305MB of 16016MB'"
"'ImageJ2 2.14.0/1.54f; Java 11.0.15-internal [amd64]; 35MB of 7952MB'"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -157,7 +169,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.12"
},
"toc": {
"base_numbering": 1,
Expand Down
34 changes: 21 additions & 13 deletions doc/02-Working-with-Java-classes-and-Python.ipynb

Large diffs are not rendered by default.

54 changes: 31 additions & 23 deletions doc/03-Sending-Data-to-Java.ipynb

Large diffs are not rendered by default.

35 changes: 15 additions & 20 deletions doc/04-Retrieving-Data-from-Java.ipynb

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions doc/05-Convenience-methods-of-PyImageJ.ipynb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook is part of the PyImageJ [Tutorial Series](./notebooks.rst), and assumes familiarity with the ImageJ API. Dedicated tutorials for ImageJ can be found [here](https://imagej.net/tutorials/)."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -17,6 +19,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -36,13 +39,15 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"There are other convenience methods that are attached to `ij.py`. After initializing ImageJ you can explore `ij.py`'s methods with `dir`."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -67,7 +72,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"ImageJ2 version: 2.9.0/1.53t\n",
"ImageJ2 version: 2.14.0/1.54f\n",
"Legacy layer active: True\n"
]
}
Expand Down Expand Up @@ -118,6 +123,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -141,7 +147,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.12"
},
"vscode": {
"interpreter": {
Expand Down
106 changes: 72 additions & 34 deletions doc/06-Working-with-Images.ipynb

Large diffs are not rendered by default.

35 changes: 16 additions & 19 deletions doc/07-Running-Macros-Scripts-and-Plugins.ipynb

Large diffs are not rendered by default.

485 changes: 158 additions & 327 deletions doc/08-Discover-and-run-ImageJ-commands.ipynb

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions doc/09-Working-with-Large-Images.ipynb

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions doc/10-Using-ImageJ-Ops.ipynb

Large diffs are not rendered by default.

146 changes: 70 additions & 76 deletions doc/11-Working-with-the-original-ImageJ.ipynb

Large diffs are not rendered by default.

55 changes: 27 additions & 28 deletions doc/12-Troubleshooting.ipynb

Large diffs are not rendered by default.

802 changes: 388 additions & 414 deletions doc/Classic-Segmentation.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/Headless.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The script should print the results pandas dataframe (the data from ImageJ's `Re
log4j:WARN No appenders could be found for logger (org.bushe.swing.event.EventService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
ImageJ2 version: 2.5.0/1.53r
ImageJ2 version: 2.14.0/1.54f
Output:
Area Mean Min Max
0 1.267500 3477.416667 2219.0 5312.0
Expand Down
18 changes: 9 additions & 9 deletions doc/Initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ include the imagej-legacy endpoint unless the `add_legacy=False` flag is given.
|:---------------------------------------------------------|:----------------------------------------------------------------------------------:|:-------------:|
| Newest available version of ImageJ2 | `ij = imagej.init()` | NO |
| Newest available version of ImageJ2 (no original ImageJ) | `ij = imagej.init(add_legacy=False)` | NO |
| Specific version of ImageJ2 | `ij = imagej.init('2.5.0')` | YES |
| Specific version of ImageJ2 (no original ImageJ) | `ij = imagej.init('2.5.0', add_legacy=False)` | YES |
| Specific version of ImageJ2 | `ij = imagej.init('2.14.0')` | YES |
| Specific version of ImageJ2 (no original ImageJ) | `ij = imagej.init('2.14.0', add_legacy=False)` | YES |
| With a GUI (newest version, blocking) | `ij = imagej.init(mode='gui')` | NO |
| With a GUI (specific version, blocking) | `ij = imagej.init('net.imagej:imagej:2.5.0', mode='gui')` | YES |
| With a GUI (specific version, blocking) | `ij = imagej.init('net.imagej:imagej:2.14.0', mode='gui')` | YES |
| With a GUI (newest version, interactive) | `ij = imagej.init(mode='interactive')` | NO |
| With a GUI (specific version, interactive) | `ij = imagej.init('net.imagej:imagej:2.5.0', mode='interactive')` | YES |
| With a GUI (specific version, interactive) | `ij = imagej.init('net.imagej:imagej:2.14.0', mode='interactive')` | YES |
| With Fiji plugins (newest version) | `ij = imagej.init('sc.fiji:fiji')` | NO |
| With Fiji plugins (specific version) | `ij = imagej.init('sc.fiji:fiji:2.5.0')` | YES |
| With Fiji plugins (specific version) | `ij = imagej.init('sc.fiji:fiji:2.14.0')` | YES |
| With a specific plugin (newest version) | `ij = imagej.init(['net.imagej:imagej', 'net.preibisch:BigStitcher'])` | NO |
| With a specific plugin (specific version) | `ij = imagej.init(['net.imagej:imagej:2.5.0', 'net.preibisch:BigStitcher:0.4.1'])` | YES |
| With a specific plugin (specific version) | `ij = imagej.init(['net.imagej:imagej:2.14.0', 'net.preibisch:BigStitcher:0.4.1'])`| YES |
| From a local installation | `ij = imagej.init('/Applications/Fiji.app')` | DEPENDS |

### Newest available version
Expand All @@ -84,7 +84,7 @@ You can specify a particular version, to facilitate reproducibility:

```python
import imagej
ij = imagej.init('2.5.0')
ij = imagej.init('2.14.0')
ij.getVersion()
```

Expand Down Expand Up @@ -156,7 +156,7 @@ or at a reproducible version:

```python
import imagej
ij = imagej.init('sc.fiji:fiji:2.5.0')
ij = imagej.init('sc.fiji:fiji:2.14.0')
```

### From a local installation
Expand Down Expand Up @@ -202,7 +202,7 @@ This can be done for the latest versions as above, or at fixed versions like:

```python
import imagej
ij =imagej.init(['net.imagej:imagej:2.5.0', 'net.preibisch:BigStitcher:0.4.1'])
ij =imagej.init(['net.imagej:imagej:2.14.0', 'net.preibisch:BigStitcher:0.4.1'])
```

### Plugins without Maven endpoints
Expand Down
10 changes: 5 additions & 5 deletions doc/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ you chose this route over conda/mamba above.

Here's one way to test that it works:
```
python -c 'import imagej; ij = imagej.init("2.5.0"); print(ij.getVersion())'
python -c 'import imagej; ij = imagej.init("2.14.0"); print(ij.getVersion())'
```
Should print `2.5.0` on the console.
Should print `2.14.0` on the console.

## Dynamic installation within Jupyter

Expand Down Expand Up @@ -106,7 +106,7 @@ Here is an example set of notebook cells to run PyImageJ
on Google Colab with a wrapped local Fiji installation:

1. Install [condacolab](https://pypi.org/project/condacolab/):
```python
```bash
!pip install -q condacolab
import condacolab
condacolab.install()
Expand All @@ -119,13 +119,13 @@ on Google Colab with a wrapped local Fiji installation:
```

3. Install PyImageJ:
```python
```bash
!mamba install pyimagej openjdk=11
```
You can also install other deps here as well (scikit-image, opencv, etc).

4. Download and install Fiji, and optionally custom plugins as well:
```python
```bash
!wget https://downloads.imagej.net/fiji/latest/fiji-linux64.zip > /dev/null && unzip fiji-linux64.zip > /dev/null
!rm fiji-linux64.zip
!wget https://imagej.nih.gov/ij/plugins/download/Filter_Rank.class > /dev/null
Expand Down
12 changes: 6 additions & 6 deletions doc/Puncta-Segmentation.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ and is therefore not available, due to this OS-specific limitation.
PyImageJ uses some functions of ImageJ2 and supporting libraries that are not
available in older versions of ImageJ2. While it may be possible to initialize
an ImageJ2 gateway with an older version of ImageJ2, certain functionality may
not behave as intended, so we advise to use version 2.5.0 or later if possible.
not behave as intended, so we advise to use version 2.11.0 or later if possible.

### Starting Python from inside ImageJ

Expand Down
4 changes: 2 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API Reference
=============
API
===

PyImageJ provides a set of wrapper functions for integration between
ImageJ+ImageJ2 and Python. A major advantage of this approach is the ability to
Expand Down
31 changes: 28 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,40 @@ scikit-image, CellProfiler, OpenCV, ITK and many more.

.. toctree::
:maxdepth: 3
:caption: Contents:
:caption: 🚀 Getting Started

Install
Initialization

.. toctree::
:maxdepth: 3
:caption: 🪄 How-to guides

notebooks
use_cases
Headless
Development
Troubleshooting

.. toctree::
:maxdepth: 3
:caption: 🔬 Use cases

Blob detection (interactive) <examples/blob_interactive.rst>
Blob detection (headless) <examples/blob_xvfb.rst>
CellProfiler <cellprofiler/README>
Classic Segmentation <Classic-Segmentation>
Puncta Segmentation <Puncta-Segmentation>
other_use_cases

.. toctree::
:maxdepth: 3
:caption: 🛠️ Development

Development

.. toctree::
:maxdepth: 3
:caption: 📚 Reference

api

Indices and tables
Expand Down
20 changes: 2 additions & 18 deletions doc/use_cases.rst → doc/other_use_cases.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
Use cases
=========

Below are use cases utitlizing PyImageJ and other packages such as :code:`scikit-image`.
These examples are available in the `PyImageJ repository`_.

.. toctree::
:maxdepth: 3

Blob detection (interactive) <examples/blob_interactive.rst>
Blob detection (headless) <examples/blob_xvfb.rst>
CellProfiler <cellprofiler/README>
Classic Segmentation <Classic-Segmentation>
Puncta Segmentation <Puncta-Segmentation>

------------------------------------------------------------------------

.. rubric:: More use cases
Other use cases
===============

Here are additional links to some other examples using PyImageJ
in other projects.
Expand Down
Loading