{"id":28712417,"url":"https://github.com/polusai/argolid","last_synced_at":"2026-01-20T17:20:36.138Z","repository":{"id":194618940,"uuid":"684236506","full_name":"PolusAI/argolid","owner":"PolusAI","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-26T21:04:25.000Z","size":288,"stargazers_count":0,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-11-29T16:49:05.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolusAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-28T18:19:54.000Z","updated_at":"2025-11-26T21:04:29.000Z","dependencies_parsed_at":"2023-09-14T09:59:04.938Z","dependency_job_id":"4977774d-df54-4df6-b2de-2153cdc176e1","html_url":"https://github.com/PolusAI/argolid","commit_stats":null,"previous_names":["polusai/argolid"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/PolusAI/argolid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Fargolid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Fargolid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Fargolid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Fargolid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolusAI","download_url":"https://codeload.github.com/PolusAI/argolid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Fargolid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T23:05:47.213Z","updated_at":"2026-01-20T17:20:36.126Z","avatar_url":"https://github.com/PolusAI.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Argolid\n`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.\n\n## Installation\nYou can install `Argolid` using pip (`pip install argolid`) or using `conda` (`conda install -c conda-forge argolid`).\n\n## Building from Source\n\n`Argolid` uses `Tensorstore` for reading and writing pixel data. So `Tensorstore` build requirements are needed to be satisfied. \nFor Linux, these are the requirements:\n- `GCC` 10 or later\n- `Clang` 8 or later\n- `Python` 3.8 or later\n- `CMake` 3.24 or later\n- `Perl`, for building *libaom* from source (default). Must be in `PATH`. Not required if `-DTENSORSTORE_USE_SYSTEM_LIBAOM=ON` is specified.\n- `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.\n- `GNU Patch` or equivalent. Must be in `PATH`.\n\nHere is an example of building and installing `Argolid` in a Python virtual environment.\n```\npython -m virtualenv venv\nsource venv/bin/activate\npip install cmake setuptools looseversion\ngit clone https://github.com/polusai/argolid.git \ncd argolid\nmkdir build_deps\ncd build_deps\nsh ../ci-utils/install_prereq_linux.sh # on linux prefer bash over sh\ncd ../\nexport ARGOLID_DEP_DIR=./build_deps/local_install\npython setup.py install\n```\n\n## Usage\n\n### PyramidGenerator\n\nArgolid 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:\n- Neuroglancer compatible Zarr (NG_Zarr)\n- Precomputed Neuroglancer (PCNG)\n- Viv compatible Zarr (Viv)\n\nCurrently, 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 \ndictionary, `mean` will be used as the default downsampling method\n\nHere is an example of generating a pyramid from a single image.\n```\nfrom argolid import PyramidGenerartor\ninput_file = \"/home/samee/axle/data/test_image.ome.tif\"\noutput_dir = \"/home/samee/axle/data/test_image_ome_zarr\"\nmin_dim = 1024\npyr_gen = PyramidGenerartor()\npyr_gen.generate_from_single_image(input_file, output_dir, min_dim, \"NG_Zarr\", {0:\"mode_max\"})\n\n```\nHere is an example of generating a pyramid from a collection of images and a stitching vector.\n```\nfrom argolid import PyramidGenerartor\ninput_dir = \"/home/samee/axle/data/intensity1\"\nfile_pattern = \"x{x:d}_y{y:d}_c{c:d}.ome.tiff\"\noutput_dir = \"/home/samee/axle/data/test_assembly_out\"\nimage_name = \"test_image\"\nmin_dim = 1024\npyr_gen = PyramidGenerartor()\npyr_gen.generate_from_image_collection(input_dir, file_pattern, image_name, \n                                        output_dir, min_dim, \"Viv\", {1:\"mean\"})\n\n```\n\nArgolid provides two main classes for working with volumetric data and generating multi-resolution pyramids:\n\n### VolumeGenerator\n\nThe `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.\n\nHere's an example of how to use `VolumeGenerator`:\n\n```\nfrom argolid import VolumeGenerator\n\nsource_dir = \"/path/to/image/files\"\ngroup_by = \"z\"  # Group images by z-axis\nfile_pattern = \"image_{z:d}.tif\"\nout_dir = \"/path/to/output\"\nimage_name = \"my_volume\"\n\nvolume_gen = VolumeGenerator(source_dir, group_by, file_pattern, out_dir, image_name)\nvolume_gen.generate_volume()\n```\n\n\n\n### PyramidGenerator3D\n\nHere is an example of generating a 3D pyramid from a Zarr array:\n\n\n```\nfrom argolid import PyramidGenerator3D\n\nzarr_loc_dir = \"/path/to/zarr/array\"\nbase_scale_key = 0\nnum_levels = 5\n\npyramid_gen = PyramidGenerator3D(zarr_loc_dir, base_scale_key)\npyramid_gen.generate_pyramid(num_levels)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolusai%2Fargolid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolusai%2Fargolid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolusai%2Fargolid/lists"}