Skip to main content

Create pyramidal OME-TIFF from regular OME-TIFF images using QuPath or Python backend.

Project description

pyramid_creator

This script is used to convert regular OME-TIFF files (exported from Zeiss ZEN for example) into pyramidal OME-TIFF ready to use in QuPath (see more information here).

It uses either QuPath in console mode (eg. without graphical user interface), calling the bundled createPyramids.groovy script on each images found in the input directory, or using tifffile in Python.

Specify the path to a directory with .ome.tiff files, then the script will create a "pyramidal" subfolder with your pyramidalized images in it.

Install

Within a virtual environment with Python 3.12, install with pip from the terminal :

pip install pyramid-creator

To enable the Python backend, ask for the required dependencies instead :

pip install pyramid-creator[python_backend]

To use the QuPath backend, a working QuPath installation is required, and the pyramid-creator command needs to be aware of its location.

To do so, first, install QuPath. By default, it will install in ~\AppData\QuPath-0.X.Y. In any case, note down the installation location.

Then, you have several options :

  • Create a file in your user directory called "QUPATH_PATH" (without extension), containing the full path to the QuPath console executable. In my case, it reads : C:\Users\glegoc\AppData\Local\QuPath-0.5.1\QuPath-0.5.1 (console).exe. Then, the pyramid-creator script will read this file to find the QuPath executable.
  • Specify the QuPath path as an option when calling the command line interface (see the Usage section) :
pyramid-creator /path/to/your/images --qupath-path "C:\Users\glegoc\AppData\Local\QuPath-0.5.1\QuPath-0.5.1 (console).exe"
  • Specify the QuPath path as an option when using the package in a Python script (see the Usage section) :
from pyramid_creator import pyramidalize_directory
pyramidalize_directory("/path/to/your/images/", qupath_path="C:\Users\glegoc\AppData\Local\QuPath-0.5.1\QuPath-0.5.1 (console).exe")
  • If you're using Windows, using QuPath v0.6.0, v0.5.1 or v0.5.0 and chose the default installation location, pyramid-creator should find it automatically and write it down in the "QUPATH_PATH" file by itself.

Usage

As a command line interface (CLI)

From a terminal within the virtual environment in which you installed videocutter, you can check the default values with :

pyramid-creator --help

Then, use it like so :

  1. Pyramidalize all .ome.tiff files found in a directory, using default values (therefore using QuPath backend)
pyramid-creator /path/to/your/images
  1. Change the tile size
pyramid-creator /path/to/your/images --tile-size 1024
  1. Specify the path to a custom groovy script. The latter should take exactly the same number of arguments as pyramid-creator/scripts/createPyramids.groovy
pyramid-creator /path/to/your/images --script-path /path/to/your/custom/script.groovy
  1. Use the Python backend instead of QuPath :
pyramid-creator /path/to/your/images --no-use-qupath

From a Python script

Copy the example from examples/create_pyramids.py, fill in the parameters and run the script.

Credits

pyramid-creator is basically a wrapper around QuPath or tifffile for the Python backend.

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

pyramid_creator-2024.12.18.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyramid_creator-2024.12.18.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pyramid_creator-2024.12.18.1.tar.gz.

File metadata

  • Download URL: pyramid_creator-2024.12.18.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyramid_creator-2024.12.18.1.tar.gz
Algorithm Hash digest
SHA256 7acaca7bd5a08419f76d1990c9efa9db21233a71023991f477d37c85b22a0963
MD5 747bb3d61cda2d03435b329285dfb37e
BLAKE2b-256 8d6b304e8f33665ea1bcd1076b3aaead620d5e97f9e2c1e78e454056852992ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyramid_creator-2024.12.18.1.tar.gz:

Publisher: python-publish.yml on TeamNCMC/pyramid-creator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyramid_creator-2024.12.18.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pyramid_creator-2024.12.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b26cc01a3ac701b1c5f8be5148802e167b8e84d27ebe451c00cec67d41034234
MD5 9840b94b9422e68588b4bed91e806afa
BLAKE2b-256 d619a29701b796f790708fbd22a2644a29bdd98c691e32a1b27152e9fd918201

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyramid_creator-2024.12.18.1-py3-none-any.whl:

Publisher: python-publish.yml on TeamNCMC/pyramid-creator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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