Content-adaptive image processing using the Adaptive Particle Representation
Project description
pyapr
Documentation can be found here.
Content-adaptive storage and processing of large volumetric microscopy data using the Adaptive Particle Representation (APR).
The APR is an adaptive image representation designed primarily for large 3D fluorescence microscopy datasets. By replacing pixels with particles positioned according to the image content, it enables orders-of-magnitude compression of sparse image data while maintaining image quality. However, unlike most compression formats, the APR can be used directly in a wide range of processing tasks - even on the GPU!
Pixels | APR |
---|---|
Uniform sampling | Adaptive sampling |
image source, illustration source
For more detailed information about the APR and its use, see:
- Adaptive particle representation of fluorescence microscopy images (nature communications)
- Parallel Discrete Convolutions on Adaptive Particle Representations of Images (IEEE Transactions on Image Processing)
pyapr is built on top of the C++ library LibAPR using pybind11.
Quick start guide
Convert images to APR using minimal amounts of code (see get_apr_demo and get_apr_interactive_demo for additional options).
import pyapr
from skimage import io
# read image into numpy array
img = io.imread('my_image.tif')
# convert to APR using default settings
apr, parts = pyapr.converter.get_apr(img)
# write APR to file
pyapr.io.write('my_image.apr', apr, parts)
To return to the pixel representation:
# reconstruct pixel image
img = pyapr.reconstruction.reconstruct_constant(apr, parts)
Inspect APRs using our makeshift image viewers (see napari-apr-viewer for less experimental visualization options).
# read APR from file
apr, parts = pyapr.io.read('my_image.apr')
# launch viewer
pyapr.viewer.parts_viewer(apr, parts)
The View Level
toggle allows you to see the adaptation (brighter = higher resolution).
Or view the result in 3D using APR-native maximum intensity projection raycast (cpu).
# launch raycast viewer
pyapr.viewer.raycast_viewer(apr, parts)
See the demo scripts for more examples.
Installation
For Windows 10, OSX, and Linux direct installation with OpenMP support should work via pip:
pip install pyapr
Note: Due to the use of OpenMP, it is encouraged to install as part of a virtualenv.
See INSTALL for manual build instructions.
License
pyapr is distributed under the terms of the Apache Software License 2.0.
Issues
If you encounter any problems, please file an issue with a short description.
Contact us
If you have a project or algorithm in which you would like to try using the APR, don't hesitate to get in touch with us. We would be happy to assist you!
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
File details
Details for the file pyapr-1.0.6-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69e15e686932f48e2dbb78d8783e0c68f1989932d239367200c0bcd2c739ef92 |
|
MD5 | 1799a50ad4a258163e8204c9e8a85f38 |
|
BLAKE2b-256 | bf3983b307a1c67dbf9d71484daeacf138371ffe428b6d35b853d0a935a37234 |
File details
Details for the file pyapr-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a8eb4b8579c16efb4347a1c0d622cb664e7edd9313a29b932b853600d8c9df |
|
MD5 | ed09a458a33f28aeb438950be219e8de |
|
BLAKE2b-256 | ee31445df071252cd97f61f094f6287692778bb21fd0fb52f0e95988644c91f2 |
File details
Details for the file pyapr-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 123358afeed75911a9088fc2177345cc6d3efaa396d2ce68a0c3dc284c755355 |
|
MD5 | 90037ac3e40f8e587b62646607773d71 |
|
BLAKE2b-256 | 807e29e43538a7b51163bde466c0a2be79c4f89d8e7267d4c2bf097f10c79558 |
File details
Details for the file pyapr-1.0.6-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f5e933d909553a9e7d03931404d677003682cb04dd317ff0488cba3525797c7 |
|
MD5 | e7c20ffd5005a4c10cafdb3f9d39a2c5 |
|
BLAKE2b-256 | 65c139c3b51b24282215b1531c811084cc54d1c97625d1422c8c1ba4024d8d31 |
File details
Details for the file pyapr-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f2a763cc1027b1b89698fb581e29204817572124b50674b1349952d7666fe0c |
|
MD5 | 67c8435a6383df55f4ced69f1ee2a7d0 |
|
BLAKE2b-256 | 74fd7101d8b10476e348bd164ea59a0e3f9bf439a1dced7943470cf6d332b49b |
File details
Details for the file pyapr-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 529e6758347782418a3511fdb06cb076e58ec38c8e9b592118ffcf86cad4c177 |
|
MD5 | a824d781d5cf227e72ce448c3b08d8b1 |
|
BLAKE2b-256 | 4adeca69a4a2859b8e62a0086c64e2043284bff283fbf578bb16906cdf592f2d |
File details
Details for the file pyapr-1.0.6-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 692bb5ed42a7de47a03e3ea7b6022023dc564f0b1633b123d34949c64f3501f5 |
|
MD5 | d882ec19a6f1e1a31d224d371e089128 |
|
BLAKE2b-256 | cf1f794fbd05fe742707a7513751fb2d213329db989968d06653ee7dd2273573 |
File details
Details for the file pyapr-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4ce14c8f2365e12a7e1c97d54a5e98057b8c313e01614675ca644224582764c |
|
MD5 | e154f3f2d2362fdf4a89d689f3c87f76 |
|
BLAKE2b-256 | 68464fc4adc859b0cc6d745723bb9b223a0df0bc2a914a066990c8326e5fa7c0 |
File details
Details for the file pyapr-1.0.6-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb04d0c894d923b6f3f145baae13f816860bc1385b35bf9215f2d4ce4db2984 |
|
MD5 | 85f10b607132c644a331cb2bc72d554a |
|
BLAKE2b-256 | 7dbe1d998361a4e06a6bfc312032801a87e2bb251db57e02f0f04f22bcfae36a |
File details
Details for the file pyapr-1.0.6-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20dbe66047921b740c677a545985716d65e63b5c6a727223b2753d96ce7770dd |
|
MD5 | a265bf77f0ec20a0167ed3976f86cbd3 |
|
BLAKE2b-256 | 901cebc5d559788017ec5e20f239405bfd9adcda695bc8b5d5b82f858489c4e2 |
File details
Details for the file pyapr-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12d7094966c110a19a443125b956638f6ac548b9a2c9c4f40174e372567ff17b |
|
MD5 | f6efbe6eb9fa7f5cd8330785350f9e80 |
|
BLAKE2b-256 | 9d2bf9fc34fb4a06c5ea43f63caeebf7cd5456b94bf060acd2723fbad544a36d |
File details
Details for the file pyapr-1.0.6-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyapr-1.0.6-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98cd6ab71a5762ce9d23a122192596900cdc2b0a1ffedfe9b1f46dc819eb5dcc |
|
MD5 | 3265772a83ef538844d99d8f8291d970 |
|
BLAKE2b-256 | 350ad8c2f7b7832fade807fd9476ee4fdaa9fb395e2eca97d18b4d3083956520 |