Skip to main content

Python modules to work with large, multiresolution images.

Project description

Large Image

Build Status codecov.io License doi-badge pypi-badge

Python modules to work with large, multiresolution images.

Large Image is developed and maintained by the Data & Analytics group at Kitware, Inc. for processing large geospatial and medical images. This provides the backbone for several of our image analysis platforms including Resonant GeoData, HistomicsUI, and the Digital Slide Archive.

Highlights

  • Tile serving made easy

  • Supports a wide variety of geospatial and medical image formats

  • Convert to tiled Cloud Optimized (Geo)Tiffs (also known as pyramidal tiffs)

  • Python methods for retiling or accessing regions of images efficiently

  • Options for restyling tiles, such as dynamically applying color and band transform

Installation

In addition to installing the large-image package, you’ll need at least one tile source (a large-image-source-xxx package). You can install everything from the main project with one of these commands:

Pip

Install all tile sources on linux:

pip install large-image[all] --find-links https://girder.github.io/large_image_wheels

Install all tile sources and all Girder plugins on linux:

pip install large-image[all] girder-large-image-annotation[tasks] --find-links https://girder.github.io/large_image_wheels

Conda

Conda makes dependency management a bit easier if not on Linux. Some of the source modules are available on conda-forge. You can install the following:

conda install -c conda-forge large-image-source-gdal
conda install -c conda-forge large-image-source-tiff
conda install -c conda-forge large-image-converter

Modules

Large Image consists of several Python modules designed to work together. These include:

  • large-image: The core module.

    You can specify extras_require of the name of any tile source included with this repository. For instance, you can do pip install large-image[tiff]. There are additional extras_require options:

    • sources: all of the tile sources in the repository, a specific source name (e.g., tiff)

    • memcached: use memcached for tile caching

    • converter: include the converter module

    • colormaps: use matplotlib for named color palettes used in styles

    • tiledoutput: support for emitting large regions as tiled tiffs

    • performance: include optional modules that can improve performance

    • all: for all of the above

  • large-image-converter: A utility for using pyvips and other libraries to convert images into pyramidal tiff files that can be read efficiently by large_image. You can specify extras_require of jp2k to include modules to allow output to JPEG2000 compression, sources to include all sources, and stats to include modules to allow computing compression noise statistics.

  • Tile sources:

    • large-image-source-tiff: A tile source for reading pyramidal tiff files in common compression formats.

    • large-image-source-openslide: A tile source using the OpenSlide library. This works with svs, ndpi, Mirax, tiff, vms, and other file formats.

    • large-image-source-ometiff: A tile source using the tiff library that can handle some multi-frame OMETiff files.

    • large-image-source-pil: A tile source for small images via the Python Imaging Library (Pillow).

    • large-image-source-gdal: A tile source for reading geotiff files via GDAL. This handles source data with more complex transforms than the mapnik tile source.

    • large-image-source-mapnik: A tile source for reading geotiff and netcdf files via Mapnik and GDAL. This handles more vector issues than the gdal tile source.

    • large-image-source-openjpeg: A tile source using the Glymur library to read jp2 (JPEG 2000) files.

    • large-image-source-nd2: A tile source for reading nd2 (NIS Element) images.

    • large-image-source-bioformats: A tile source for reading any file handled by the Java Bioformats library.

    • large-image-source-deepzoom: A tile source for reading Deepzoom tiles.

    • large-image-source-multi: A tile source for compositing other tile sources into a single multi-frame source.

    • large-image-source-vips: A tile source for reading any files handled by libvips. This also can be used for writing tiled images from numpy arrays.

    • large-image-source-test: A tile source that generates test tiles, including a simple fractal pattern. Useful for testing extreme zoom levels.

    • large-image-source-dummy: A tile source that does nothing.

    Most tile sources can be used with girder-large-image. You can specific an extras_require of girder to include girder-large-image with the source.

  • As a Girder plugin:

    • girder-large-image: Large Image as a Girder 3.x plugin. You can specify extras_require of tasks to install a Girder Worker task that can convert otherwise unreadable images to pyramidal tiff files.

    • girder-large-image-annotation: Annotations for large images as a Girder 3.x plugin.

    • large-image-tasks: A utility for running the converter via Girder Worker. You can specify an extras_require of girder to include modules needed to work with the Girder remote worker or worker to include modules needed on the remote side of the Girder remote worker. If neither is specified, some conversion tasks can be run using Girder local jobs.

Developer Installation

To install all packages from source, clone the repository:

git clone https://github.com/girder/large_image.git
cd large_image

Install all packages and dependencies:

pip install -e . -r requirements-dev.txt

If you aren’t developing with Girder 3, you can skip installing those components. Use requirements-dev-core.txt instead of requirements-dev.txt:

pip install -e . -r requirements-dev-core.txt

Tile source prerequisites

Many tile sources have complex prerequisites. These can be installed directly using your system’s package manager or from some prebuilt Python wheels for Linux. The prebuilt wheels are not official packages, but they can be used by instructing pip to use them by preference:

pip install -e . -r requirements-dev.txt --find-links https://girder.github.io/large_image_wheels

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

large-image-1.13.1.dev35.tar.gz (63.3 kB view details)

Uploaded Source

Built Distribution

large_image-1.13.1.dev35-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file large-image-1.13.1.dev35.tar.gz.

File metadata

  • Download URL: large-image-1.13.1.dev35.tar.gz
  • Upload date:
  • Size: 63.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.12

File hashes

Hashes for large-image-1.13.1.dev35.tar.gz
Algorithm Hash digest
SHA256 c1ef3b894e50e55affa101b34f7c25819cc8b329b9ba78abaf744bc188fa424d
MD5 15e66c84d2304538b06f629bf3ead0ba
BLAKE2b-256 fc603b65f9a0309f1b26aa9b7c8689ec2844cca9a5cb96873223aad6e000a4a9

See more details on using hashes here.

Provenance

File details

Details for the file large_image-1.13.1.dev35-py3-none-any.whl.

File metadata

File hashes

Hashes for large_image-1.13.1.dev35-py3-none-any.whl
Algorithm Hash digest
SHA256 fb81c773659592a4bd56a06fa362421ba691b0bfdc4a3c185f56ae8d157aba96
MD5 a06f7490bf0df13f813a40aafeb18be9
BLAKE2b-256 501f3d7f86fa0b867753ee0b30dc842d01f1395014ae84d8109894a9a3557fbe

See more details on using hashes here.

Provenance

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