Skip to main content

A plugin to load images stored in .mat files with napari

Project description

PyPI version Python versions See Build Status on Azure Pipelines

Features

This plugin loads variables stored in MATLAB .mat files into napari.

It loads any variable that looks like an image. Presently, that includes any array with more than two dimensions with size greater than 20 pixels (determined by shape_is_image()).

If loading a variable with 3 or more dimensions, the plugin assumes that it is a stack of images, and the dimension with greatest size is the axis of the stack.

Loading Large Files

If loading a large .mat file saved in HDF5/v7.3 format, chunks of the images are loaded as needed, resulting in fast initial load, but potentially slower scrolling.

Slices of the image stacks are randomly sampled to determine min/max contrast values.

Requirements

This plugin relies on scipy to load small .mat files and h5py (with dask) to load larger HDF5/v7.3 .mat files.

It implicitly requires napari for use.

Installation

napari-mat-images requires napari to be installed, although it is not listed as a requirement for installation. This plugin relies on plugin functionality found in napari version > 0.2.12. Once released, this can be installed via pip from PyPI:

$ pip install napari>0.2.12

In the meantime, the latest version of napari can be installed from Github:

$ pip install git+https://github.com/napari/napari.git@master

You can install napari-mat-images via pip from PyPI:

$ pip install napari-mat-images

Usage

Once installed, the plugin will be used whenever trying to load a .mat file. This can be done from the napari GUI or commandline:

$ napari my_file.mat

Contributing

Contributions are very welcome. Tests can be run with pytest, 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-mat-images is free and open source software

Issues

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


This napari plugin was generated with Cookiecutter along with napari’s cookiecutter-napari-plugin template.

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-mat-images-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

napari_mat_images-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file napari-mat-images-0.1.0.tar.gz.

File metadata

  • Download URL: napari-mat-images-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.8.2

File hashes

Hashes for napari-mat-images-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56d186801323cd194bacfe08812c4898eeab08c4e544a42269ebcccbdc70d366
MD5 6e77d4a790604792115ff59885df56bf
BLAKE2b-256 1c0a5eff3219bb169a421bc5e7ea15b7856f2c52734ff7572bf62993dfb3c3f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: napari_mat_images-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.8.2

File hashes

Hashes for napari_mat_images-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13b220dab6f95f1717717f9886dfd67354190c62c19f62472eb982d5f91d0396
MD5 ff1d41bf3bee85e91abed7c518849c44
BLAKE2b-256 efa932bcb95e48b3e475b8b173b94e040b3d4f624381962de0d1d959aa68c9ce

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