-under development-
ImageJ-Processing-Assistant-Notebook (IPAN) consists of a series of ready-to-use Jupyter Notebooks for performing image analysis. This repository includes analytic pipelines to carry out some of the analytical tasks requested in the biomedical research field.
For carrying out image analysis we are using the ImageJ software as a library from the Jupyter Notebook coded with Python. This notebook follows the guideline of PyImageJ here.
The main advantages of this working method are:
- performing all analysis on one single platform,
- standardize the analysis workflow
- combine the ImageJ functionalities with Python tools and packages
Examples for the installation and initialization of ImageJ are already available here.
The IPAN project is divided into multiple notebooks.
-
01-Working with ImageJ pt.1.ipynb:
- how to open an image (different options and purposes)
- how to run an ImageJ Macro from JN
- how to save results/pictures from the Macro
-
02-Working with ImageJ pt.2.ipynb:
- how to run a ImageJ plug-in from JN
- how to build generalize functions
- how to process an image in steps
-
03-Working with IPAN module.ipynb:
- perform image analysis with imported functions
-
04-Nuclei Count-ipynb:
- Use the functions from the IPAN module to count the nuclei on multiple images
- data import, cleaning, description and visualization
-
05-CTCF Measurements.ipynb:
- data import, cleaning, description and visualization
To run the .ipynb files install the required packages and software. Below is the basic procedure to install Jupyter Notebook documentation here,
-
Install Anaconda download here.
-
Install PyimageJ documentation here. Pyimage allows the interaction between Python and ImageJ
$ conda create -n pyimagej pyimagej openjdk=8
-
Activate the environment before proceeding with the other installations.
$ conda activate pyimagej
-
Install JPipe documentation here. JPype is a Python module to provide full access to Java from within Python.
$ conda install -c conda-forge jpype1
-
Clone the IPAN repository download here
-
Open a terminal console and move to the cloned directory.
-
Lunch the jupyter notebook in a web browser window.
$ jupyter notebook
-
Click on the '##-NOTEBOOK.ipynb' to open it.
Install the libraries that will be imported in the notebook:
-
01-Working with ImageJ pt.1:
- skimage here used to import/show images
$ conda install scikit-image
- IPython.display here (should be already installed)
- scyjava here {optional} Used to set maximum memory pool. The installation of this package requires pip.
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3 get-pip.py
$ pip install scyjava
-
02-Working with ImageJ pt.2:
- tiffile
conda install -c conda-forge tifffile
-
03-Working with IPAN module
- IPAN module
- numpy here
conda install numpy
-
04-Nuclei Count
-
05-CTCF Measurements
On the official GitHub of ImageJ, there are many available notebooks written in ScyJAVA by CurtisReuden here written using the SkyJava kernel in Jupyter Notebook. On the web, there are not many notebooks that use PyImageJ with python. Python allows the possibility to use tools like NumPy, SciPy, scikit-image, CellProfiler, OpenCV, ITK, etc. It is not possible to this tool from Jython, this is a reason more to combine the ImageJ functionalities with Python. Below some examples of Pyimagej notebooks:
- Workshop material of the 2020 ImageJ conference here
- ImageJ with Python Kernel here
- Running a plugin that uses ImageJ1 windows¶ here
- IJ macro test example here
Useful links:
- It is possible to consult the "Developer discussion for PyImageJ" here