Installation

pathology-image-features is published on PyPI.

Installing pathology-image-features can therefore be accomplished by running the following command in your desired Python environment (>=3.12):

pip install pathology-image-features

The primary libary used for reading large whole slide images (WSIs) in pathology-image-features is large-image [documentation](https://girder.github.io/large_image/). The large-image library supports a large amount of different image formats (“tile sources” in large-image terminology) but does not include all of them by default. Therefore, it may be necessary to install additional tile source readers depending on what type of images you work with. Information on adding tile sources may be found [here](https://girder.github.io/large_image/getting_started.html#installation) but can generally be summarized in the following steps:

  • You receive some error (most likely a TileSourceError or some subclass)

  • Check if the image is able to be opened in large image:

import large_image

path_to_image = '/path/to/image.extension'

tile_source = large_image.open(path_to_image)
  • Check which tile sources you currently have installed (grep in Linux/Mac, findstr in Windows):

python -m pip list | grep large-image-source
python -m pip install large-image-source-{source name}

Where source name could be one of tiff, tifffile, openslide, pil, vips, zarr, nd2, bioformats, etc.