Pyramid Generator For OMETiff
Project description
Argolid
Argolid is a Python package for working with volumetric data and generating multi-resolution pyramids. It provides classes for reading and writing pixel data, generating Zarr arrays, and creating multi-resolution pyramids.
Installation
You can install Argolid using pip (pip install argolid) or using conda (conda install -c conda-forge argolid).
Building from Source
Argolid uses Tensorstore for reading and writing pixel data. So Tensorstore build requirements are needed to be satisfied.
For Linux, these are the requirements:
GCC10 or laterClang8 or laterPython3.8 or laterCMake3.24 or laterPerl, for building libaom from source (default). Must be inPATH. Not required if-DTENSORSTORE_USE_SYSTEM_LIBAOM=ONis specified.NASM, for building libjpeg-turbo, libaom, and dav1d from source (default). Must be inPATH.Not required if-DTENSORSTORE_USE_SYSTEM_{JPEG,LIBAOM,DAV1D}=ONis specified.GNU Patchor equivalent. Must be inPATH.
Here is an example of building and installing Argolid in a Python virtual environment.
python -m virtualenv venv
source venv/bin/activate
pip install cmake
git clone https://github.com/sameeul/argolid.git
cd argolid
mkdir build_deps
cd build_deps
sh ../ci_utils/install_prereq_linux.sh
cd ../
export ARGOLID_DER_DIR=./build_deps/local_install
python setup.py install
Usage
PyramidGenerator
Argolid can generate 2D Pyramids from a single image or an image collection with a stitching vector provided. It can generate three different kind of pyramids:
- Neuroglancer compatible Zarr (NG_Zarr)
- Precomputed Neuroglancer (PCNG)
- Viv compatible Zarr (Viv)
Currently, three downsampling methods (mean, mode_max and mode_min) are supported. A dictionary with channel id (integer) as key and downsampling method as value can be passed to specify downsampling method for specific channel. If a channel does not exist as a key in the
dictionary, mean will be used as the default downsampling method
Here is an example of generating a pyramid from a single image.
from argolid import PyramidGenerartor
input_file = "/home/samee/axle/data/test_image.ome.tif"
output_dir = "/home/samee/axle/data/test_image_ome_zarr"
min_dim = 1024
pyr_gen = PyramidGenerartor()
pyr_gen.generate_from_single_image(input_file, output_dir, min_dim, "NG_Zarr", {0:"mode_max"})
Here is an example of generating a pyramid from a collection of images and a stitching vector.
from argolid import PyramidGenerartor
input_dir = "/home/samee/axle/data/intensity1"
file_pattern = "x{x:d}_y{y:d}_c{c:d}.ome.tiff"
output_dir = "/home/samee/axle/data/test_assembly_out"
image_name = "test_image"
min_dim = 1024
pyr_gen = PyramidGenerartor()
pyr_gen.generate_from_image_collection(input_dir, file_pattern, image_name,
output_dir, min_dim, "Viv", {1:"mean"})
Argolid provides two main classes for working with volumetric data and generating multi-resolution pyramids:
VolumeGenerator
The VolumeGenerator class is used to create Zarr arrays from image stacks. It handles reading image files, grouping them based on specified criteria, and writing the data into a Zarr array.
Here's an example of how to use VolumeGenerator:
from argolid import VolumeGenerator
source_dir = "/path/to/image/files"
group_by = "z" # Group images by z-axis
file_pattern = "image_{z:d}.tif"
out_dir = "/path/to/output"
image_name = "my_volume"
volume_gen = VolumeGenerator(source_dir, group_by, file_pattern, out_dir, image_name)
volume_gen.generate_volume()
PyramidGenerator3D
Here is an example of generating a 3D pyramid from a Zarr array:
from argolid import PyramidGenerator3D
zarr_loc_dir = "/path/to/zarr/array"
base_scale_key = 0
num_levels = 5
pyramid_gen = PyramidGenerator3D(zarr_loc_dir, base_scale_key)
pyramid_gen.generate_pyramid(num_levels)
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argolid-0.0.7-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: argolid-0.0.7-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 11.4 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8402e715d781fe79dde758098cb059eaea3c2c410077e758d5f8355e468cfe
|
|
| MD5 |
9db5aff2e57473ec0c318840e1fd6b78
|
|
| BLAKE2b-256 |
fe52b5b8f14a3075f50b342b7666a01a94f9fb60cacfcf1d61dde68be6151909
|
File details
Details for the file argolid-0.0.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7bc38814dee773631e04675017ce98b59a8a5b3622a075d9e9d5366fc02b34e
|
|
| MD5 |
c5399052752a8fae0f7fda18684f071b
|
|
| BLAKE2b-256 |
15ff16b3dcc73dab859a8c01deb1f9b77e1709e5648006288f22432019b100d4
|
File details
Details for the file argolid-0.0.7-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: argolid-0.0.7-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b68ebc34aeccd02f4cf724ce6955e255815b037932535cf7d9b618bef4f9786a
|
|
| MD5 |
fdd5596161f339b98a8939b6df089bf4
|
|
| BLAKE2b-256 |
8d14c5c438a46c3eff108bf1029ad0233bcd6b10638a54fdfc75ec94eeacef09
|
File details
Details for the file argolid-0.0.7-cp313-cp313-macosx_10_15_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp313-cp313-macosx_10_15_x86_64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.13, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c57b97c70c0c19f3bcf12a2a435bd41e5a43ea4eea58d2745d36f17aaf69c8c8
|
|
| MD5 |
bda909ac8abcbde1a7f3aeaff1ad8072
|
|
| BLAKE2b-256 |
2cec635857464776eea50a22c3ce861415abf37e16f66295648fb328099daf3c
|
File details
Details for the file argolid-0.0.7-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: argolid-0.0.7-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 11.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7f1a69e0db2f46e1ac9c8424652cd7f0e942b403b94cee00a9c1545227f57c5
|
|
| MD5 |
b316673b070308bb6a2fe9eb36d7bc72
|
|
| BLAKE2b-256 |
9def02e4fab690abc54a3d503d65a1c3854b45d4e379548b685f2610eabc3001
|
File details
Details for the file argolid-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac284b0fac134416b13901213084f3e1b71d5d05106c5ff649f6d5af071c873c
|
|
| MD5 |
c2681476310a8162d3ccff5de2002e3f
|
|
| BLAKE2b-256 |
4fcaab7b31ff889dc57c3a5b54df3caec7385eacf541b70d6e7e84f6d67d3e92
|
File details
Details for the file argolid-0.0.7-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: argolid-0.0.7-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7659bca41b85169444034d4ee3d326158c5248f16cc62ed9ad75755e6bb942a
|
|
| MD5 |
be6e40f71280bd9b12735a0bbf77b010
|
|
| BLAKE2b-256 |
57ade9918bd6b7ab1e64beee3e300c3212781f4a97729241404267a844c04434
|
File details
Details for the file argolid-0.0.7-cp312-cp312-macosx_10_15_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp312-cp312-macosx_10_15_x86_64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.12, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49d86d5f003c176d5e44bb95baae348a12cb1015c77062443f05318722f5b2ee
|
|
| MD5 |
791a687ad2996e30cc5b838acbdfc831
|
|
| BLAKE2b-256 |
be307c132cd1dc0ac63ab51d9c7105583ccdae22153ee3da4da9b1a0d50e14fd
|
File details
Details for the file argolid-0.0.7-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: argolid-0.0.7-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 11.4 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
638879a93999a55d8d78cf477687a19e5a8de643b249e252597332dec0dedb35
|
|
| MD5 |
49fdd3550ebeccb16b2e9ddc7c53b7d4
|
|
| BLAKE2b-256 |
410d2d1f4bfd37fdf0c69e554502f740c653a19c688653df187612b301114b37
|
File details
Details for the file argolid-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d8017db436fc0ada077e7b2a9d02c044f1cd7de8cf445314e81811fbc2e77d4
|
|
| MD5 |
a68299dbfe11a4ca6bb993d2f05a638a
|
|
| BLAKE2b-256 |
b979b885f35988740230271f2fa9d04e99a03087c8877071c2c618d8026ba12c
|
File details
Details for the file argolid-0.0.7-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: argolid-0.0.7-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b68baa1aab321e725d50084eb72410afd8135f049c577b6d06813b730bb07e04
|
|
| MD5 |
559be2da869830975a454605123640b8
|
|
| BLAKE2b-256 |
21ae25c6b129d3785f37d5f129078e9107f8c31ba0318384aedf119b8eb6e95d
|
File details
Details for the file argolid-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ade9c74b120c4da3ed9f2c59551b3ab817c6d22e2326d74cc6077e682c633f97
|
|
| MD5 |
771885052037e9b0c7dcee6517788975
|
|
| BLAKE2b-256 |
adb34749f1faf692bb6ea2acbe5a8160f30c7e5d6b89173344b16a3599f1f153
|
File details
Details for the file argolid-0.0.7-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: argolid-0.0.7-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 11.4 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9816acde5d5635f2a801b80213a9162efaa4d462f84882fad45ef4e21be131ce
|
|
| MD5 |
f3bd60ae73d92db61779c3ecadcf212f
|
|
| BLAKE2b-256 |
69e9d65b9218844b3e14b1e69f4f9b3573d303ad929428be25e5274e614850b2
|
File details
Details for the file argolid-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f367fc08c2251549e97254806851a5215a95045b7efed8b0dd78b6e19d89a51
|
|
| MD5 |
78138a810582a5f254f785720a5911e7
|
|
| BLAKE2b-256 |
db877d3c82b653f500087a1e42416f4f347beffd6b464ad5153d2b9306b50c60
|
File details
Details for the file argolid-0.0.7-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: argolid-0.0.7-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ef466f93ea6f2921dcb968f4cc970aac6612b48321d8012be6dfdee64e7216
|
|
| MD5 |
de309dd89cbc6e1c78bfb68192f31e8c
|
|
| BLAKE2b-256 |
4f5bd112a24c1cebbb1aeb47134c3b0deca99555fb35bef674e37b7e9fe64a18
|
File details
Details for the file argolid-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c3dd21dc3b97e0a385adce33d91824129318059d4d069814aa32c6b0eade86
|
|
| MD5 |
c02c6c99cb9550736b9a621b8c8e7e70
|
|
| BLAKE2b-256 |
c88574fe6a7f11e5610d6d04581f296ebd7567011d741ea8e9034c4d46422f23
|
File details
Details for the file argolid-0.0.7-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: argolid-0.0.7-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 11.4 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
980ba97a613a8f4407e84979623acd0ea719b73d973879b291d3573b4d8f3619
|
|
| MD5 |
8f295623c9351b6cbac155017b1fab60
|
|
| BLAKE2b-256 |
96e9d14bb2828f3c1d8253a0f13ac900dc1d68be8acf588d7f71cd7de9344126
|
File details
Details for the file argolid-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 13.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86a430eb30edf5f42501e505512dc5b33eb4a6bf64638cd9874a6685baa935bd
|
|
| MD5 |
a07cb6c131e98e5a3d6f87ef9a91643a
|
|
| BLAKE2b-256 |
b8aa3983d8e84352d57aa07922956055c4517e94c2fdb5fe8c98b27e8ae4244a
|
File details
Details for the file argolid-0.0.7-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: argolid-0.0.7-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.4 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2daa824d925faa6aa5222784de952b77b6e50d689c151b66a7634da40ee3719
|
|
| MD5 |
ed108f5ce16d4258e4723ea4ef559144
|
|
| BLAKE2b-256 |
53b40cac3bcd6b367f478992fdd4fb6d5377e4a963af73ad056b5cff1e194e8a
|
File details
Details for the file argolid-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl.
File metadata
- Download URL: argolid-0.0.7-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36e223f9c1224cedeffadbdc6775914c9e12314c8affec1a70c211c6616e1d38
|
|
| MD5 |
ef138e4c844625a957b13c8fb4e1e767
|
|
| BLAKE2b-256 |
b6dc97cb63c6453833e2a0fac4ba215ce79236c70fa593412e5927fbb2b31406
|