Skip to main content

Napari plugin for DPR Resolution Enhancement

Project description

napari-dpr

License MIT PyPI version Python Version napari hub

⚠️ IMPORTANT: Original Work Acknowledgment

This napari plugin is based on and extends the work from the original DPR-Resolution_enhancement_with_deblurring_by_pixel_reassignment repository.

The algorithm was originally developed by Zhao, B. and Mertz, J., as described in their paper "Resolution enhancement with deblurring by pixel reassignment (DPR)" (DOI: 10.1117/1.AP.5.6.066004).

DPR Algorithm Schematic

If you use this plugin for your research, please cite the original paper:

Zhao, B., and Mertz, J. "Resolution enhancement with deblurring by pixel reassignment (DPR)." 
Advanced Photonics, 5(6), 066004 (2023). DOI: 10.1117/1.AP.5.6.066004

A napari plugin for image resolution enhancement using Deconvolution by Pixel Reassignment (DPR).

Description

DPR is a technique for enhancing the resolution of images, particularly useful in microscopy. This plugin provides easy access to DPR functionality within napari, allowing for quick and intuitive image enhancement without leaving your viewer.

The algorithm works by:

  1. Applying a specialized deconvolution approach
  2. Reassigning pixels based on local information
  3. Enhancing fine details while preserving image structure

Installation

You can install napari-dpr via pip:

pip install napari-dpr

Usage

  1. Open napari and load an image
  2. In the menu, go to Plugins > DPR Enhancement
  3. Select your image from the dropdown
  4. Adjust parameters as needed:
    • PSF: Point spread function size (typical values: 2-6)
    • Gain: Enhancement gain (typical values: 1-3)
    • Background: Background subtraction (typical values: 5-20)
  5. Click "Enhance Resolution"
  6. Two new layers will be added to your viewer:
    • [original_name]_DPR_enhanced: The DPR-enhanced image
    • [original_name]_magnified: The magnified original for comparison

Parameters

  • PSF (Point Spread Function): Controls the width of the point spread function used in the algorithm. Larger values capture wider spatial correlations but may reduce detail resolution.
  • Gain: Controls the enhancement strength. Higher values increase contrast but may introduce artifacts.
  • Background: Controls background subtraction. Higher values remove more background but may affect relevant image features.

Standalone Usage

You can also use the DPR algorithm programmatically:

from napari_dpr.dpr_core import apply_dpr
import numpy as np
import matplotlib.pyplot as plt

# Load your image data (should be 3D: HEIGHT, WIDTH, TIME)
image_data = your_image_loading_function()
if image_data.ndim == 2:
    image_data = image_data[:, :, np.newaxis]  # Add time dimension if 2D

# Apply DPR
dpr_enhanced, magnified = apply_dpr(image_data, psf=4.0, gain=2.0, background=10.0)

# Visualize results
plt.figure(figsize=(12, 6))
plt.subplot(121)
plt.title("Original (Magnified)")
plt.imshow(magnified.sum(axis=2))
plt.subplot(122)
plt.title("DPR Enhanced")
plt.imshow(dpr_enhanced)
plt.tight_layout()
plt.show()

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Distributed under the terms of the MIT license, "napari-dpr" is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

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

Source Distribution

napari_dpr-0.1.0.tar.gz (336.6 kB view details)

Uploaded Source

Built Distributions

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

napari_dpr-0.1.0-cp313-cp313-win_amd64.whl (333.3 kB view details)

Uploaded CPython 3.13Windows x86-64

napari_dpr-0.1.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

napari_dpr-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (387.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

napari_dpr-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl (392.2 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

napari_dpr-0.1.0-cp312-cp312-win_amd64.whl (286.8 kB view details)

Uploaded CPython 3.12Windows x86-64

napari_dpr-0.1.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

napari_dpr-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (387.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

napari_dpr-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl (391.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

napari_dpr-0.1.0-cp311-cp311-win_amd64.whl (336.6 kB view details)

Uploaded CPython 3.11Windows x86-64

napari_dpr-0.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (398.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

napari_dpr-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (387.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

napari_dpr-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (392.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

napari_dpr-0.1.0-cp310-cp310-win_amd64.whl (286.1 kB view details)

Uploaded CPython 3.10Windows x86-64

napari_dpr-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (404.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

napari_dpr-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (388.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

napari_dpr-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (392.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

napari_dpr-0.1.0-cp39-cp39-win_amd64.whl (237.2 kB view details)

Uploaded CPython 3.9Windows x86-64

napari_dpr-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (404.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

napari_dpr-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (388.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

napari_dpr-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl (392.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file napari_dpr-0.1.0.tar.gz.

File metadata

  • Download URL: napari_dpr-0.1.0.tar.gz
  • Upload date:
  • Size: 336.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f081e345080490e24ea5d079a6ec9b12856257433b7b0465ad874fe458b7b08
MD5 4f076807b4618e2af69008a3f22c7607
BLAKE2b-256 76de486768f5c10f7c965999de303a2fc40050c8af163d7807028ad59b678376

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: napari_dpr-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 333.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 aba586976470ba64adfa3bb4a1288b0a2886d1feadb32c8965bd663783f353fd
MD5 0be16539925e4e845aeeb5e9b6717185
BLAKE2b-256 142b33cf2c50a18dfd68cb6d40642d40d635e4f4d2ec3a1da9274b78fc37d64a

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e2b0c81d5a192626b715185f0f1e8c5b712d7b2b3fe43d42ae2daca9aeb169b
MD5 f7ae6cdcc9f64c0870c09e64bacca977
BLAKE2b-256 ceb2d72374723971ec620af9232118de7398836d0d3766c569a7edca1de487f7

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68671f5596322028f0d4dad59851d1c83a9492fda858ecb99d9aa55ef69a3d58
MD5 d63c93b79afafac3172cdd6b5de302b8
BLAKE2b-256 97013240e1b1d6096f2df530c6e17351cd5bd214acd1392df1e77564a1787919

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 55b400eb8893595c057a18f3e38995ea134f79e925b61086834f8be03d2b33ae
MD5 18a95edfd0a444343ecb5c143a474906
BLAKE2b-256 63df031bf0e0d355e995c0d5c41d49544a85be61df6c142bf0ff8cc48660ed9d

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: napari_dpr-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 286.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eaba57f9eb0256d981419f6f9aacead860b5d2cee2ebf6f06e74d58ee1a4c958
MD5 67e4027bd51d3d9315176e454d08a599
BLAKE2b-256 a4fead9eca24e33fbcad7cfe6a5a6e4b6448d22d724dc90b846261a8e965b33c

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 094368947cabca3c4571627d1d23915e9c4b42de1479942303605b6c99628b3a
MD5 6b80a8ad5e2b3ddc85c674987214310a
BLAKE2b-256 735014524c90118e6a9bb1b6f2018d171b89483c302ab17f0a537903a0a72cde

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 869f3c09b36d45ac55c97cdb17a8e444929603167f4672a013d2d3b3c1e61f84
MD5 1845fe31fe43407bb3683ef3c03b417f
BLAKE2b-256 323b916772030d28947036db2bb56b364a0d7d1a1101d8564916b62498d24b7b

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2c18532d0763be745a0f38d915b3e7abed795d216dbbfb0c4e09b689a6570d1a
MD5 075570bde376f9f98fa45f727fa0377a
BLAKE2b-256 1d55c7ecadf5894b3eeda9d7288bfbe2b8d780ed9464dcdc587a120e230bff2d

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: napari_dpr-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 336.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3c102bf189654fd6b57a9b4cfe59398b3952fb64965ac86a5cbec6dc27c28c48
MD5 ce3c0988df1ba0e9e94f8dd05595afb8
BLAKE2b-256 776a0885f9ceb6ee0b11b5b3622b280e4135028d50938ccb96b9619ff6ea4401

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 303bce0294a8f4ee09a72274c3f08eee7eb99565f0e3f7c01fd0e1e21ce6498f
MD5 819846590cfe9b27790f6bdae74933e0
BLAKE2b-256 437a77a1d4a3a07e77459ad01001c605992f9128a9d86ce05d2f6168c16f4413

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b123895c1371b93bcd4e5ca791da37e4e8bca78c46736bee82291866916f850
MD5 18351cebcdd705a69b95ea8387794832
BLAKE2b-256 e80f2a4b7c38bc65a55120b8c10e607513be0eab5c75d628bab612c410bd0367

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bcf1025ecf585fc179f22e58f4fa5098212772c45394ac248f11f4fcb1332441
MD5 48779f97889707cdfec61650fb9c164b
BLAKE2b-256 240296adf4b8db0c4863e83af3a478f4aaa3b3f4537d76d34e8f547de7349e97

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: napari_dpr-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 286.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cd78fda42f3ea2cb2ae5f45aefffce83e7be27456a8d694d4bd4d5bad63cedc8
MD5 8154a2dcc76fbd597e2d6083af3ec1e8
BLAKE2b-256 a87b08cc65eef43dad25970812c0b050b2b4cd8400b3d6c0e2cddd191112744e

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6716671548209661836acc8d300b3f946078916768fbfabfa7f8e15212304cfd
MD5 ee52aea0716955b9dc1ff935ff3c023e
BLAKE2b-256 daaa2c52c78dd08a10a72880570f8f314b193f751394c1e940e967ff96b13abb

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c4570eeaa03fd0be36daec517258b1db813a8ae6aa65d3139e1f92fee9a5a34
MD5 ae355bc4127363ce53736300b0049f50
BLAKE2b-256 c9e52cd7a7f60893fce44d5599ac7096bf7f4c6c2759f2b7c9e5747df1e637e0

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3be85c56a8970e0cf586e587e5e965050557d753743a485b19c4f67664bf63d9
MD5 e7781ed59eb7510ad0f3367ab81a356e
BLAKE2b-256 17e54f1305d152e53d0e31cde285a1650947633138312d6060fae75911bbe938

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: napari_dpr-0.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 237.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for napari_dpr-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7098f4d3d4e9f3058c955c06f49110a698904afda97aeabbfd46c2152e44866a
MD5 7023a6d231ab10973a75b47dd5fe26a6
BLAKE2b-256 b7f337557674a7cfaef99a563c7be3abc41bbb634def6b418d3c659df6702c9d

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f62b3462e74be933803b0996644e7562efc2485c3355c7071556419ab49fdda
MD5 3b486c14f1bbf9b8afefc918b689f236
BLAKE2b-256 6c7c7e0b78c8ef58b106c593437c770c0abb4ca7b1d8bbe0580322688bb05864

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 335e2268dace7f6871a0fdc9652988cf0241d85d4f7819b0739e3436944a7d84
MD5 4e5660d6574e7b318a31ce361448cd2d
BLAKE2b-256 67495e977ef02665667d388e96272804ce08889af44b3513679a27c9e9459a30

See more details on using hashes here.

File details

Details for the file napari_dpr-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for napari_dpr-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2577c8570f1099acc6363502f19d8596195959a98015a57f01e3ded64e243412
MD5 14847303a89b1f49fa3e404baa532cd5
BLAKE2b-256 8341a57bb7202d1fc938526ad455d04009fd280f879015418169107cc297fb5d

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