Skip to main content

A napari plugin to read and write scientific data formats using RosettaSciIO

Project description

napari-rosettasciio

License MIT PyPI Python Version napari hub npe2

A napari plugin to read and write scientific data formats using RosettaSciIO.


Overview

This plugin integrates RosettaSciIO with napari, enabling napari to read and write a wide range of scientific data formats, particularly those used in electron microscopy and spectroscopy.

Note: This plugin focuses on scientific data formats not natively supported by napari. Standard image formats (PNG, JPEG, TIFF, BMP, GIF) and NumPy arrays are handled by napari's built-in readers and are excluded from this plugin to avoid conflicts.

Supported File Formats

RosettaSciIO supports many scientific data formats including:

  • HDF5-based formats: HyperSpy (.hspy), EMD (.emd), NeXus (.nxs), USID
  • Microscopy formats: Digital Micrograph (.dm3, .dm4), MRC (.mrc), FEI/TIA (.ser, .emi)
  • Spectroscopy formats: EDAX (.spc, .spd), Bruker (.bcf), Renishaw WiRE (.wdf)
  • And many more specialized scientific formats...

For a complete list of supported formats, see the RosettaSciIO documentation.

Installation

You can install napari-rosettasciio via pip:

pip install napari-rosettasciio

Optional Dependencies

To enable support for specific file formats, you can install with optional dependencies:

# For HDF5 formats (HyperSpy, EMD, NeXus, etc.)
pip install "napari-rosettasciio[hdf5]"

# For image formats (PNG, JPEG, etc.)
pip install "napari-rosettasciio[image]"

# For Zarr-based formats
pip install "napari-rosettasciio[zspy]"

# For all formats
pip install "napari-rosettasciio[all]"

Usage

Once installed, the plugin will automatically register with napari. You can then:

  1. Open files: Use File > Open or drag and drop files into napari
  2. Save files: Use File > Save and select the desired format

The plugin will automatically detect and use the appropriate reader/writer based on the file extension.

Preserving Metadata

The plugin preserves metadata from the original files, including:

  • Axes scales and units
  • Original metadata structures
  • Custom attributes

This metadata is stored in the layer metadata and can be preserved when saving to formats that support it (e.g., HDF5, Zarr).

Format Limitations

Some formats have specific requirements:

  • MRCZ (.mrcz): Only supports 3D volumetric data. This format is currently excluded from the writer capabilities as it cannot handle 2D images.

License

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

Issues

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

Acknowledgements

This plugin is built on top of RosettaSciIO, which originated from the HyperSpy project. We are grateful to all contributors to these projects.

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_rosettasciio-0.0.3.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

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

napari_rosettasciio-0.0.3-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file napari_rosettasciio-0.0.3.tar.gz.

File metadata

  • Download URL: napari_rosettasciio-0.0.3.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for napari_rosettasciio-0.0.3.tar.gz
Algorithm Hash digest
SHA256 30e167941b7ef160f074e1b2aabc955a0daa5c08e0486a6a5e6cd82e3efe85c0
MD5 3cc6459eb46895904f7b7e40c4fd0182
BLAKE2b-256 eb28d80973023975738dc178bdce12bc83e3b21e0d1215e7d7ea29b9b0d0481d

See more details on using hashes here.

File details

Details for the file napari_rosettasciio-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_rosettasciio-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 627584aa391fb08486b3fbb88a9aec3de7089922c2c4b3f160a45734d29f7fa4
MD5 d7b15f06363af45dfb5a7cbadfbebc35
BLAKE2b-256 24fd31db9903c92b124bf4f06742efe45ecd1880cd07002e70d2e06105cf78c9

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