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, thepyramid-creatorscript 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-creatorshould 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 :
- Pyramidalize all .ome.tiff files found in a directory, using default values (therefore using QuPath backend)
pyramid-creator /path/to/your/images
- Change the tile size
pyramid-creator /path/to/your/images --tile-size 1024
- 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
- 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.
Metadata
Release files for pyramid-creator 2024.12.18.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyramid_creator-2024.12.18.1.tar.gz | 8.9 kB | With provenance | Details for pyramid_creator-2024.12.18.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyramid_creator-2024.12.18.1-py3-none-any.whl | Python 3 | none | any | Details for pyramid_creator-2024.12.18.1-py3-none-any.whl |
Total release size: 18.1 kB
Release files / pyramid_creator-2024.12.18.1.tar.gz
| Download URL | pyramid_creator-2024.12.18.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7acaca7bd5a08419f76d1990c9efa9db21233a71023991f477d37c85b22a0963
|
|
BLAKE2b-256 checksum How to use checksums |
8d6b304e8f33665ea1bcd1076b3aaead620d5e97f9e2c1e78e454056852992ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 18, 2024.
Transparency logRelease files / pyramid_creator-2024.12.18.1-py3-none-any.whl
| Download URL | pyramid_creator-2024.12.18.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b26cc01a3ac701b1c5f8be5148802e167b8e84d27ebe451c00cec67d41034234
|
|
BLAKE2b-256 checksum How to use checksums |
d619a29701b796f790708fbd22a2644a29bdd98c691e32a1b27152e9fd918201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 18, 2024.
Transparency logSecurity for pyramid-creator 2024.12.18.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pyramid_creator-2024.12.18.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 18, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.