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.7rc1-cp313-cp313-win_amd64.whl (11.4 MB view details)

Uploaded CPython 3.13Windows x86-64

argolid-0.0.7rc1-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.7rc1-cp313-cp313-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

Uploaded CPython 3.12Windows x86-64

argolid-0.0.7rc1-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.7rc1-cp312-cp312-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

argolid-0.0.7rc1-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.7rc1-cp311-cp311-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

argolid-0.0.7rc1-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.7rc1-cp310-cp310-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.15+ x86-64

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

Uploaded CPython 3.9Windows x86-64

argolid-0.0.7rc1-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.7rc1-cp39-cp39-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

argolid-0.0.7rc1-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.7rc1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: argolid-0.0.7rc1-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.7rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6a20271702ba44816e678dc0dcf11001d3d636d8d778ba1729e1a0c641f0dbd1
MD5 d01282ac0620aeb32166655a3c8911b0
BLAKE2b-256 87ba1c6178919fe61a210edf09381ad251f07113aa0d6dbba28f0e93e6ccd697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 634115383b274aad1fb211109ac027ee909993b7f7bc3bd0bd434ebdbcb8430c
MD5 4c7a153ec786b42fd69d1e10e0acf33c
BLAKE2b-256 8117871868c6585ffe8b24725ea964b736d5630a861a8c7415747ceb1a587098

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 253f450c4948a550299ef45ab455105babf384f272042e3b9a702d111ad8d14e
MD5 c639267aae1691353b396b6651b78670
BLAKE2b-256 403f1dac7bae27080b24506fbb4da40efe4387516358e9ef6d8303d2812b7071

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c6242e3cf63d62b04c24fc8ee47ea8840cf691f421069890c308945c734b0efc
MD5 994733a07b37333fd213b6547e25afaf
BLAKE2b-256 8a6c4113bae6d5590e0edfbf104739b4a9b1d7e6c98fbb78ec55b70798a73095

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argolid-0.0.7rc1-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.7rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 68de05d16b8a6419a5d164e5bfe192337f09e6ce0c6d02150ff8a6ff20f10e3c
MD5 4db2e0b5142ab4f39f498e1335e24601
BLAKE2b-256 471c7325ea320b968f025e8f5602368238437a1425cded8e91bbe6befbf2b171

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c8f0adc494388d08e3da673947b8ac7b9471d574b691ac03a10bc87d2b53ff3
MD5 3a9a490325e7a9e1fa65d53870e9b018
BLAKE2b-256 482aeaca623d1b5f5c61ea08981703739a4eb442ff238141d01785ef9453273e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15457407016802bad7636d34a6db97d1e09917e77e93d276bd17b48aa590579a
MD5 881c775befdc0321b02918317ead7301
BLAKE2b-256 ecefcc1cd63738fe9d1b7fd034c60146b73ef7d2f38ef5f80a21bd4b81f70254

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 030fc8f9ce4dbd6163691656e88aac7182b47f1bf0cfeb1bd7c3b403887c7f7d
MD5 850d902c976d30818f009822386b85a6
BLAKE2b-256 b86d4caea6bd6e8da4a72e4f83a4f17fdf8ce11f76907b562847d3723e7ff017

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argolid-0.0.7rc1-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.7rc1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8e978a870381617ba540a3e3834184826caad8b04036ed5f71c7561cd52fdf69
MD5 3315e8bd5223a6ebb3053cb4e37cac03
BLAKE2b-256 3aa9bad7e2aa0ec9a7872f71ddbf37eff4efad6e530be2c7ddd16c619480f945

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be2bb038913a5f8d6af563795f328c463053c2d363b85ee97e09e3a1e43d6e04
MD5 c54a6aba79ce0b510d6eac8397763b14
BLAKE2b-256 54c6214c6c4bf3f97d13b4e5af31bed02e1cec185061ac25cd982fcdc5bc915a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5d78aa74bfab441d0ff4b941184fc6dc5d97c834c68229449be58ec6673e428
MD5 099cc8295090f3bf42a77ae4f57576e6
BLAKE2b-256 aeb90c3aef56b9c3fba319c22ac3c2ff6e3c6e36ee59a3a550715a886bfa9fbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ddc41d9b1c2cf7aaa56fa0fe5689c4b5c5d655696c2026d3b61d74b632991c8a
MD5 21176fd560c5bcb10be357e27b8a1fd0
BLAKE2b-256 a2471362f34735b5cf27db21d8f0f3c82e31753000e2c507478cf526c7cfc1ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argolid-0.0.7rc1-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.7rc1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c8fece397e0e5c5e6b6d0992137ec964ba12836adb5df803e0d7ab03693d4a4a
MD5 b33d7d90b3a2ba7070482a95a7a1d84f
BLAKE2b-256 8ab31868fbb52241a8273735e73bfbade1031b01796b20026573ee02daf5811b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3be721085c143dc4d54cb27b3d98f4e69d9a1db86d6c9323d95da4c9010bde8
MD5 a90e2c4f36dfcd9b43c93ad1058edc89
BLAKE2b-256 9e2e69f3052c6c0f6b0cbe6fd6bfde2f35157e6d28fbdf7a7b9c93e3d098f311

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f0741c38c88c6660b72e9f9cf574500844136608701867f68f8bedc2159d25d
MD5 f2bcf460316faf923187dcd867f4a2e9
BLAKE2b-256 0382a83b0e339303eca40ee379bfb97605fc5c1d40795b5b71a3e6a3a594c11e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2f709624aee42abb76fabbd2d45580cca5a82a6df9a79b0db29a5e2d28cc6be5
MD5 a67c75ad374e17128d0c80052235a753
BLAKE2b-256 7095daf07479a68c418eaaac2686b4d800603089c70bb91457dac64e9c5ce974

See more details on using hashes here.

File details

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

File metadata

  • Download URL: argolid-0.0.7rc1-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.7rc1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 87a9f36431d689768603b874aa388aa650e1ca3a19ad4fb93bec389048942b8f
MD5 0022244efc482c6b3139e7dd7907d6fe
BLAKE2b-256 b3db3f7e17982a403218946771d89a105bf1320a1bc630918876b53f32de670e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a82769eccc49449ec727d82de5471b7f35b680bf34a8adefb1b688bd2775fef5
MD5 76a615760723c2a58029c3435df84bc9
BLAKE2b-256 150b258dfad5841b95d0626a5259d915ff74fa54466055c723e6173be0afef9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5fdaa7789d97100e3314e9ea8732910357f6d6a6b5be5a5b447d0d544c4e1960
MD5 65ba44db51163e2ba123dcdbf3ac0c3a
BLAKE2b-256 ebace236cb00e53b141dbd7dcd8de58c94e8782b82d3e1983ef054d42dd1114a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for argolid-0.0.7rc1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 85b38deaf0e54d16d0467eabcbff23fcdd444890a78c310201fbc05962134eec
MD5 88ace629218334a7f64753bef00f04af
BLAKE2b-256 fc205b976b81eac922f0a5df55806d321735f2c04008e9b7dcad60770c244134

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