• Stars
    star
    460
  • Rank 95,189 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use ImageJ from Python

PyImageJ: Python wrapper for ImageJ2

Image.sc Forum Build Status codecov Binder

PyImageJ provides a set of wrapper functions for integration between ImageJ2 and Python. It also supports the original ImageJ API and data structures.

A major advantage of this approach is the ability to combine ImageJ and ImageJ2 with other tools available from the Python software ecosystem, including NumPy, SciPy, scikit-image, CellProfiler, OpenCV, ITK and many more.

Quick Start

Jump into the documentation and tutorials to get started!

System Requirements

Hardware Requirements

PyImageJ requires at minimum a standard computer with enough RAM and CPU performance to support the workflow operations defined by the user. While PyImageJ will run on a range of hardware, we recommend the following RAM and CPU specifications:

  • RAM: >= 2 GB (64 MB minimum)
  • CPU: >= 1 core

Notably, PyImageJ can be installed and used on server infrastructure for large scale image processing.

OS Requirements

PyImageJ has been tested on the following operating systems:

  • Linux (Ubuntu 20.04 LTS)
  • Windows
  • macOS

Software Requirements

PyImageJ requires the following packages:

PyImageJ will not function properly if dependency versions are too old.

In addition, PyImageJ requires OpenJDK and Maven to be installed.

Installation

On Mac and Linux, PyImageJ can be installed using Conda+Mamba. Here is how to create and activate a new conda environment with PyImageJ available:

conda install mamba -n base -c conda-forge
mamba create -n pyimagej -c conda-forge pyimagej openjdk=8
conda activate pyimagej

You can also pip install pyimagej, but will then need to install OpenJDK and Maven manually.

Installation time takes approximately 20 seconds. Initializing PyImageJ takes an additional ~30 seconds to ~2-3 minutes (depending on bandwidth) while it downloads and caches the needed Java libraries.

For detailed installation instructions and requirements, see Installation.

Usage

The first step when using PyImageJ is to create an ImageJ2 gateway. This gateway can point to any official release of ImageJ2 or to a local installation. Using the gateway, you have full access to the ImageJ2 API, plus utility functions for translating between Python (NumPy, xarray, pandas, etc.) and Java (ImageJ2, ImgLib2, etc.) structures.

For instructions on how to start up the gateway for various settings, see How to initialize PyImageJ.

Here is an example of opening an image using ImageJ2 and displaying it:

# Create an ImageJ2 gateway with the newest available version of ImageJ2.
import imagej
ij = imagej.init()

# Load an image.
image_url = 'https://imagej.net/images/clown.jpg'
jimage = ij.io().open(image_url)

# Convert the image from ImageJ2 to xarray, a package that adds
# labeled datasets to numpy (http://xarray.pydata.org/en/stable/).
image = ij.py.from_java(jimage)

# Display the image (backed by matplotlib).
ij.py.show(image, cmap='gray')

For more, see the tutorial notebooks.

API Reference

For a complete reference of the PyImageJ API, please see the API Reference.

Getting Help

The Scientific Community Image Forum is the best place to get general help on usage of PyImageJ, ImageJ2, and any other image processing tasks. Bugs can be reported to the PyImageJ GitHub issue tracker.

Contributing

All contributions, reports, and ideas are welcome. Contribution is done via pull requests onto the pyimagej repository.

Most development discussion takes place on the pyimagej GitHub repository. You can also reach the developers at the Image.sc Zulip chat.

For details on how to develop the PyImageJ codebase, see Development.md.


More Repositories

1

imagej2

Open scientific N-dimensional image processing ๐Ÿ”ฌ ๐ŸŽ‡
Java
1,149
star
2

ImageJ

Public domain software for processing and analyzing scientific images
Java
529
star
3

tutorials

ImageJ2 programming examples
Jupyter Notebook
177
star
4

imagej-ops

ImageJ Ops: "Write once, run anywhere" image processing
Java
88
star
5

ImageJA

[OBSOLETE] Please use https://github.com/imagej/ImageJ instead.
76
star
6

imagej-server

A RESTful web server for ImageJ [EXPERIMENTAL]
Java
39
star
7

example-legacy-plugin

Simple Maven project for an ImageJ 1.x plugin
Java
34
star
8

example-imagej2-command

Simple Maven project for an ImageJ2 command
Java
29
star
9

imagej-tensorflow

ImageJ/TensorFlow integration library
Java
25
star
10

napari-imagej

Use ImageJ functionality from napari
Python
25
star
11

imagej.github.io

The ImageJ wiki
JavaScript
25
star
12

imagej-scripting

ImageJ-specific applications of the SciJava script languages
Python
25
star
13

imagej-launcher

The ImageJ native launcher
Java
21
star
14

ops-experiments

EXPERIMENTAL repository for exploring Ops approaches, algorithms, etc.
Jupyter Notebook
18
star
15

imagej-legacy

ImageJ+ImageJ2 compatibility layer
Java
14
star
16

imagej-matlab

MATLAB integration with ImageJ data structures and runtime.
Java
13
star
17

i2k-2020-pyimagej

Workshop materials for "Images to Knowledge with ImageJ and Friends" 2020 conference
Jupyter Notebook
13
star
18

i2k-2018

Workshop materials for "Images to Knowledge with ImageJ and Friends" 2018 conference
Jupyter Notebook
12
star
19

imagej-updater

The automatic updater for ImageJ
Java
12
star
20

imagej-omero

Server- and client-side communication between ImageJ and OMERO
Java
11
star
21

i2k-2022-pyimagej

Workshop materials for "I2K 2022: From Images to Knowledge" conference
Jupyter Notebook
10
star
22

imagej-ui-swing

ImageJ UI for Java Swing.
Java
10
star
23

example-script-collection

Example project demonstrating how to package ImageJ scripts into a single jar file
Java
10
star
24

imagej-electron-app

[EXPERIMENTAL] Electron app embedding ImageJ + JS image visualization tools
JavaScript
9
star
25

imagej-common

ImageJ core data model
Java
9
star
26

imagej-itk

ITK integration for ImageJ
Java
8
star
27

imagej-node

ImageJ module for node.js
JavaScript
8
star
28

envisaje

Envisaje: A NetBeans RCP application prototype for ImageJ [UNMAINTAINED]
Java
7
star
29

imagej-modelzoo

Java
6
star
30

list-of-update-sites

The update sites ImageJ2 knows about automatically
Python
6
star
31

example-imagej2-command-kotlin

An ImageJ command that mixes Kotlin and Java code
Kotlin
5
star
32

ij1-patcher

Extension points for ImageJ via runtime patching to support (limited) headless operation and ImageJ2's legacy layer
Java
5
star
33

imagej-mesh

Data structures and I/O for meshes
Java
5
star
34

ij1-tests

Unit tests for ImageJ 1.x
Java
4
star
35

workflow

A library to facilitate efficient chaining of modules and plugins with various inputs and outputs [UNMAINTAINED]
Java
4
star
36

ij1-installer

OBSOLETE
Java
4
star
37

imagej-maven-plugin

[OBSOLETE] All goals migrated to scijava/scijava-maven-plugin
Java
4
star
38

imagej-notebook

Routines for working with ImageJ from scientific notebook software (e.g. Jupyter)
Java
3
star
39

imagej-plugins-batch

Batch Processor Plugins for ImageJ
Java
3
star
40

imagejdocu

Migration repository for imagejdocu.list.lu
HTML
3
star
41

imagej-troubleshooting

Interactive toy repository to demonstrate troubleshooting techniques.
Java
3
star
42

imagej-plugins-commands

Core ImageJ commands
Java
3
star
43

imagej2-manuscript-2017

ImageJ2: ImageJ for the next generation of scientific image data
JavaScript
3
star
44

presentations

ImageJ presentations
JavaScript
3
star
45

pom-imagej

OBSOLETE - Use https://github.com/scijava/pom-scijava instead!
2
star
46

imagej-command-archetype

Maven archetype for a SciJava/ImageJ2 Command
Java
2
star
47

example-android-app

[EXPERIMENTAL] An example using ImageJ in an Android project
Java
2
star
48

example-bio-formats-legacy-plugin

Simple example of calling Bio-Formats with ImageJ 1.x + Java 6
Java
2
star
49

workflow-pipes

Web-based workflow editor using Yahoo! Pipes [UNMAINTAINED]
JavaScript
2
star
50

visad-plugin

A plugin for displaying ImageJ images using VisAD in a freeform way [UNMAINTAINED]
Java
2
star
51

mbf

Mirror of the MBF ImageJ manual
HTML
2
star
52

imagej-updater-tests

Docker-based test infrastructure for ImageJ Updater
2
star
53

imagej-opencv

Convert between OpenCV and ImgLib2 data structures
Java
2
star
54

dotfiles

Configuration files for ImageJ resources
2
star
55

imagej-plugins-search-biii

ImageJ Search Plugin for BIII.eu
Java
2
star
56

imagej-onnx

Java
2
star
57

imagej-mesh-io

I/O plugins for ImageJ meshes and related data structures
Java
2
star
58

imagej-plugins-tools

Core ImageJ tool plugins
Java
2
star
59

chocolatey-packages

PowerShell
2
star
60

tickets

Archived static HTML version of legacy ImageJ Trac tickets
HTML
1
star
61

imagej-ui-awt

ImageJ UI for Java AWT.
Java
1
star
62

imagej-deprecated

Deprecated ImageJ packages
Java
1
star
63

imagej-benchmarks

JMH-based benchmarks for projects of https://github.com/imagej/.
Java
1
star
64

zoomviewer

A multi-level, tile-based zoomable viewer [UNMAINTAINED]
Java
1
star
65

janelia-hackathon-2016

Hacking at Janelia Research Campus, June 19 - 27, 2016
Java
1
star
66

op-finder

Utility for browsing, learning about and running all available Ops
Java
1
star
67

imagej-wiki-static

Final version of MediaWiki imagej.net
1
star
68

imagej-omero-legacy

ImageJ 1.x support for ImageJ-OMERO
Java
1
star
69

pipermail

Retired ImageJ2 mailing list archives
HTML
1
star
70

search

ImageJ search portal
HTML
1
star
71

conference

ImageJ conference materials
HTML
1
star
72

.github

ImageJ organization profile
1
star
73

imagej-plugins-uploader-ssh

Core ImageJ uploader plugin: SSH
Java
1
star
74

ij1-builds

[OBSOLETE] Please use https://github.com/imagej/ImageJ instead.
Shell
1
star
75

imagej-usage

[ABANDONED] Anonymous usage statistics plugin for ImageJ
Java
1
star
76

imagej-plugins-uploader-webdav

Core ImageJ uploader plugin: WebDAV
Java
1
star
77

workshops

ImageJ Workshops
HTML
1
star
78

pyimagej-dextr

Where I'm working on integrating pytorch and imagej (via pyimagej). This repo is experimental.
Python
1
star
79

irc-bot

This is shinybot, the trusty historian for #imagejdev and #fiji-devel on freenode [RETIRED]
Ruby
1
star