Skip to main content

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:

  • GCC 10 or later
  • Clang 8 or later
  • Python 3.8 or later
  • CMake 3.24 or later
  • Perl, for building libaom from source (default). Must be in PATH. Not required if -DTENSORSTORE_USE_SYSTEM_LIBAOM=ON is specified.
  • NASM, for building libjpeg-turbo, libaom, and dav1d from source (default). Must be in PATH.Not required if -DTENSORSTORE_USE_SYSTEM_{JPEG,LIBAOM,DAV1D}=ON is specified.
  • GNU Patch or equivalent. Must be in PATH.

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

argolid-0.0.7rc2-cp313-cp313-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.13Windows x86-64

argolid-0.0.7rc2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

argolid-0.0.7rc2-cp313-cp313-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

argolid-0.0.7rc2-cp313-cp313-macosx_10_15_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

argolid-0.0.7rc2-cp312-cp312-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.12Windows x86-64

argolid-0.0.7rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

argolid-0.0.7rc2-cp312-cp312-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

argolid-0.0.7rc2-cp312-cp312-macosx_10_15_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

argolid-0.0.7rc2-cp311-cp311-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.11Windows x86-64

argolid-0.0.7rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

argolid-0.0.7rc2-cp311-cp311-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

argolid-0.0.7rc2-cp311-cp311-macosx_10_15_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

argolid-0.0.7rc2-cp310-cp310-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.10Windows x86-64

argolid-0.0.7rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

argolid-0.0.7rc2-cp310-cp310-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

argolid-0.0.7rc2-cp310-cp310-macosx_10_15_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

argolid-0.0.7rc2-cp39-cp39-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.9Windows x86-64

argolid-0.0.7rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

argolid-0.0.7rc2-cp39-cp39-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

argolid-0.0.7rc2-cp39-cp39-macosx_10_15_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

File details

Details for the file argolid-0.0.7rc2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc2-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

Hashes for argolid-0.0.7rc2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7ba61ff4cf9777f905c1e99ad1fa03351cdc6fbd8969c6b6ef25f907058f3cd8
MD5 06e82a6ba495e75f7921f7c39d73fbcf
BLAKE2b-256 1e5034a229627e5567081a4baaf300b810483b2801cf1862fd769f12ba45dc56

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f6ae70e946ee75b65f50b8a4c339f3843ce894e568d19cbbf21bc80593f5f92
MD5 cbbdfe2ebce4a021e08a29b130b157ef
BLAKE2b-256 2b747efdfabb7b583ba6a403f975d92a8d65cb41aaeb12f73d8c4b510c9420e9

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e07ed227474faa83b170be19cc4ad770e921c5271b68b601dc506a2e0e14a772
MD5 272b9c5e16f757b41774e6815a49bbda
BLAKE2b-256 ded05d77559b42b53e7590d54bcaa43d9b820b8cbd963229be6e640eaaf4d0fb

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8310669a3bf11c46b3969d34e265cf9fcc012e91468e15db00558022d1c9a3c2
MD5 c1af32f5384c9292fa8b719b8bd7a8a8
BLAKE2b-256 d850c9e4b8b66bc2c320d8d11c6326a0f234b68225088cdccfa5208c36d54b4b

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc2-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

Hashes for argolid-0.0.7rc2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c9f9946d2c026ca6d7ab039e68505b678638e6243f01754dcb9035bd7adeb787
MD5 1a589c997da3375e4c65d36fc80754ea
BLAKE2b-256 d2b53abce1ae4a5c5338f45a7b247b3892e0d0d0d293f990e2e8c7bd1a69aa67

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99da36657280578fc3fe6969cccb751f3de2c990d852fc2b3516aee97210c779
MD5 dd76fa6fa855ff84f6c18ed6be5d0d7e
BLAKE2b-256 0d4b68de7b547ce990634a9451f5bef74439d7f5f171344df8a0fcae27662c12

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d78df327ef087cab9ab84fb49de01c7b29c96a2eb67ed1fb7aa02bafd04d6187
MD5 7beaf09a21fbe87aba34c89919f73e2b
BLAKE2b-256 1d96b865756821b15a78cb78f531254ae3357f9f69af39a7c3eea5d54a886f97

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 dccbd6227e5c2d70b07d0bd56585af4ede897953142874998f896dd753d0086f
MD5 97fa38df871febc0f2173097db974332
BLAKE2b-256 be72f16384b4db87a8c09f81900805e9a452deba7c334fc6fb58d6f33b8269aa

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc2-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

Hashes for argolid-0.0.7rc2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d42e6554edeb467bbbb3174bf0ab2e46b93ff0c486231c9e4a8a99e70d661b57
MD5 90a11ddb9841cc3874221285036c356d
BLAKE2b-256 26d035c519a72e64add13d9057b327fcd0347fce5d6ba42376fd5c1822a2afef

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb3b0796a54ea12b3414cdf7366e08eee67a4f587ea09163b48b73b1e06b2d78
MD5 3f281ecb6232b5c851d0d48c72c3c9d0
BLAKE2b-256 a35d1d73e8467b181624fbf41663fe5414de76eac43aca75824a1c412bf7e4dd

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb06c50fdf4630395192db562cd05bd2087640fab2f054288efea1f127bbcb5b
MD5 12b70eaeefcb29a0da6bb876558e0319
BLAKE2b-256 46582862d8ccfa2e08879929e93e10cd98c78ab95560bab2a666722280b3d57b

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0e5ebed0733df491ea4e58a81e6335f3eea70f6903a78a3ae0885c93319609ff
MD5 a8b3ca42cf18f3fa38c71c33ac630b81
BLAKE2b-256 f248d4e7e5a40b43ca5b9308ac95bc5069e9e9de8722229df281b4eef6e8b44a

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc2-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

Hashes for argolid-0.0.7rc2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 277ab9c3e289dd10404b6a690ff35dcb4342c25d5e817c0ac3437726462ade70
MD5 f1a8b35ab5954d78a19277cbcb9d357b
BLAKE2b-256 2be87681b9642f54bf9d24fabe6e44801c1b3f8538f29db909225e7ae11f3106

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fdee6b81db6023abbb150c312e16b8a80e89af93747629569e67f92e6e339fe4
MD5 af14639ba7e5c888dbe6401070e7a228
BLAKE2b-256 2ea5ea765feaf1cb6a1993c50dce47aaca69f5ea0695f8351fd82aa4c3f1bd18

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52a4f0c543885c2abe067da73e58dde0b39b84e17adb6fdc24433bb0de47d3e2
MD5 c99a4d43ee25f8ad7aa428cb22a79243
BLAKE2b-256 3ed584e36c80bec52c9d72dc0c24cd1e82f1cc85d2ac29674ac89b221ba8e955

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 eaf3f8235b58f9b8652424baf333491006eae8154194bfe8510d5aef086c8d5b
MD5 b3000e924c8f6e856ea1705e9be75d9e
BLAKE2b-256 91a6ac057dead3dc84f28c3a103e455e4aed17b91a06548694ab2c5850d37627

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc2-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

Hashes for argolid-0.0.7rc2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 db8a87eca41863d359367ee4d3051a60a85ace525d2640600672e33d37595f18
MD5 fe4b0997c18a06b9fb35dbb16b2b411f
BLAKE2b-256 fef513d04dc2e038c886e7902d567cf90b2bc8af4093071fdddffcaee7e4833e

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db60d99dba9a114a4c533868430162c6b3719ceb30c02ea145d52fe9a8a6e57e
MD5 a98f84928e0ac67d6e43d75111ce6765
BLAKE2b-256 36602aa3587f21d76a1c316e9ce9f17247fa6f6a159c7b575318e57cc7e9faae

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe2a3b34942560f694a224546a1878b3875003ba69506bead4d1f7d541370ff6
MD5 4567b1b128369fc48830a9b689f9436c
BLAKE2b-256 396a7035ef87e078b248060de4b56fba62f0353905e0d5456ca16edd62a31e6e

See more details on using hashes here.

File details

Details for the file argolid-0.0.7rc2-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for argolid-0.0.7rc2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 90d3e86fb1d2ae94aa5524888798599e5682fadb6d822edd7ee7a92f7a63074d
MD5 6486960760e8edb99f4f00d6fe0acb34
BLAKE2b-256 4288d86cf1502e966e64f709ebb7b0c177a82d19d333e68c31bbfef6d5e08e4d

See more details on using hashes here.

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