Skip to main content

napari plugin for nd tiff folders with OpenCl deskew

Project description

napari-ndtiffs

License PyPI Python Version tests codecov

napari plugin for nd tiff folders with optional OpenCl-based deskewing.

Built-in support for folders of (skewed) lattice light sheet tiffs. file.

napari-ndtiffs demo


This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.

Features

  • Drag and drop a folder of tiffs onto napari window to view easily
    • (currently designed to detect lattice light sheet tiffs, but easily adjustable)
  • If lattice Settings.txt file is found, will deskew automatically (only if necessary)
  • Lazily loads dataset on demand. quickly load preview your data.
  • Handles .zip archives as well! Just directly compress your tiff folder, then drop it into napari.
  • All-openCL deskewing, works on GPU as well as CPU, falls back to scipy if pyopencl is unavailable.

It would not be hard to support arbitrary filenaming patterns! If you have a folder of tiffs with a consistent naming scheme and would like to take advantage of this plugin, feel free to open an issue!*

Usage

In most cases, just drop your folder onto napari, or use viewer.open("path")

Overriding parameters

You can control things like voxel size and deskewing angle as follows:

from napari_ndtiffs import parameter_override
import napari

viewer = napari.Viewer()
with parameter_override(angle=45, name="my image"):
    viewer.open("path/to/folder", plugin="ndtiffs")

Valid keys for parameter_override include:

  • dx: (float) the pixel size, in microns
  • dz: (float)the z step size, in microns
  • deskew: (bool) whether or not to deskew, (by default, will deskew if angle > 0, or if a lattice metadata file is detected that requires deskewing)
  • angle: (float) the angle of the light sheet relative to the coverslip
  • padval: (float) the value with which to pad the image edges when deskewing (default is 0)
  • contrast_limits: (2-tuple of int) (min, max) contrast_limits to use when viewing the image
  • name: (str) an optional name for the image

Sample data

Try it out with test data: download sample data

You can unzip if you like, or just drag the zip file onto the napari window.

Or, from command line, use:

napari path/to/lls_mitosis.zip

Installation

You can install napari-ndtiffs via pip:

pip install napari-ndtiffs

Debugging

To monitor file io and deskew activity, enter the following in the napari console:

import logging
logging.getLogger('napari_llsfolder').setLevel('DEBUG')

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-ndtiffs" 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-ndtiffs-0.1.0.tar.gz (9.1 MB view details)

Uploaded Source

Built Distribution

napari_ndtiffs-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file napari-ndtiffs-0.1.0.tar.gz.

File metadata

  • Download URL: napari-ndtiffs-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for napari-ndtiffs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6742b59d47f5aba0763e8e1dd84b6e16eb3847f5ec95b853aa695da46a9d701
MD5 0ea4747982fc2ece6b871b3ebbd1d8e6
BLAKE2b-256 d50be1822413aae7f81d6134c788fbef431e7971a1f1c5decd2b752a1fba417e

See more details on using hashes here.

File details

Details for the file napari_ndtiffs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: napari_ndtiffs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for napari_ndtiffs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75072cbd4ebff2b0c208c13a082e40e307ee8484d116fa8e5f437dcb649f8063
MD5 5b3675db5a9165a4ddb8aa0ce752c3de
BLAKE2b-256 c0ead86c1fd1eb0bee4c43fd8ec0a5cd40ee3ff8b49a9d6e7c0b7f772bb89e60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page