Skip to main content

Python wrapper for ImageJ

Project description

PyImageJ: Python wrapper for ImageJ2

Image.sc Forum Build Status

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!

Installation

PyImageJ can be installed using conda. Here is how to create and activate a new conda environment with PyImageJ available:

conda create -n pyimagej -c conda-forge pyimagej openjdk=8
conda activate pyimagej

Alternately, it is possible to install PyImageJ with pip.

For detailed installation instructions and requirements, see Install.md.

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 Initialization.md.

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 documentation and tutorials.

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 pyimagej gitter.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyimagej-1.1.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

pyimagej-1.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file pyimagej-1.1.0.tar.gz.

File metadata

  • Download URL: pyimagej-1.1.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyimagej-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6613d778614b672a0e9ce7f65802687a65300b5b1e73973ba468a0ce70d54909
MD5 99b8e032ac6da03464ef427723e1edb6
BLAKE2b-256 377881b8f9bb280009a63c5e75335e6b6dac2aa09116df7025eac6d16df37b6c

See more details on using hashes here.

File details

Details for the file pyimagej-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyimagej-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyimagej-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49d0c8c9b4293d06816bcbab15c8e9ff3c8996373fac591bcc56b799d91b2c9e
MD5 a68d9bedd9f8cb0a39d01d068dfe144d
BLAKE2b-256 eaceaacdcdd00c5c7b2f7ea702fd65ce51e64a4cb6c167eefd43221c08535cf5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page