Skip to main content

Python wrapper for ImageJ

Project description

PyImageJ: Python wrapper for ImageJ

Image.sc forum Build Status

PyImageJ provides a set of wrapper functions for integration between ImageJ and Python. A major advantage of this approach is the ability to combine ImageJ with other tools available from the Python software ecosystem, including NumPy, SciPy, scikit-image, CellProfiler, OpenCV, ITK and more.

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 ImageJ gateway. This gateway can point to any official release of ImageJ or to a local installation. Using the gateway, you have full access to the ImageJ API, plus utility functions for translating between Python (NumPy, xarray, pandas, etc.) and Java (ImageJ, 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 ImageJ and displaying it:

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

# Load an image.
image_url = 'https://samples.fiji.sc/new-lenna.jpg'
jimage = ij.io().open(image_url)

# Convert the image from ImageJ 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 instructions on how to do certain tasks, see USAGE.md

Getting Help

The Scientific Community Image Forum is the best place to get general help on usage of pyimagej, ImageJ, 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.0.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

pyimagej-1.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyimagej-1.0.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for pyimagej-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c5ea366d143661c465ad8019ca79d314fc8710c010d919178c16facbdd470b77
MD5 91cef8963d80af3bb24f25d3cf613349
BLAKE2b-256 45fcac9913ec7add12854dcddc5cb2917fe105bdc3b231b0bffc441f5163920e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyimagej-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for pyimagej-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ca1a742635bde1e60240555c834e72e9a73ba39d6c092225f52b187e9b66a40
MD5 5da76e666b48f970b4b4c9e45143918e
BLAKE2b-256 473b7c9b4c2874775d4874e376623c93a0dafdf54a9dcfab36c936fcc1a44add

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