https://github.com/xtensor-stack/xtensor-io
xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 15 committers (13.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5
Basic Info
Statistics
- Stars: 86
- Watchers: 16
- Forks: 28
- Open Issues: 23
- Releases: 7
Topics
Metadata Files
README.md
Reading and writing image, sound and npz file formats to and from xtensor data structures.
Try it live in the browser!
Introduction
xtensor-io offers an API to read and write various file formats into xtensor data structures:
- images,
- audio files,
- NumPy's compressed storage format (NPZ),
- HDF5 files,
- Blosc.
xtensor-io wraps the OpenImageIO, libsndfile, zlib, HighFive, and blosc libraries.
Installation
xtensor-io is a header-only library. We provide a package for the mamba (or conda) package manager.
bash
mamba install xtensor-io -c conda-forge
xtensor-iodepends onxtensor^0.25.0.OpenImageIO,libsndfile,zlib,HighFive, andbloscare optional dependencies toxtensor-ioOpenImageIOis required to read and write image files.libsndfileis required to read and write sound files.zlibis required to load NPZ files.HighFive(and theHDF5library) is required to read and write HDF5 files.bloscis required to read and write Blosc files.
All five libraries are available for the conda package manager.
You can also install xtensor-io from source:
mkdir build
cd build
cmake ..
make
sudo make install
Trying it online
To try out xtensor-io interactively in your web browser, just click on the binder link:
Documentation
To get started with using xtensor-io, check out the full documentation
http://xtensor-io.readthedocs.io/
Usage
```cpp // loads png image into xarray with shape HEIGHT x WIDTH x CHANNELS auto imgarr = xt::loadimage("test.png");
// write xarray out to JPEG image xt::dumpimage("dumptest.jpg", imgarr + 5);
// load npz file containing multiple arrays auto npymap = xt::loadnpz("test.npz");
auto arr0 = npymap["arr0"].cast
// open a wav file auto audio = xt::loadaudio("files/xtensor.wav"); auto& audioarr = std::get<1>(audio); // audio contents (like scipy.io.wavfile results)
// save a sine wave sound int freq = 2000; int sampling_freq = 44100; double duration = 1.0;
auto t = xt::arange(0.0, duration, 1.0 / samplingfreq);
auto y = xt::sin(2.0 * xt::numericconstants
xt::dumpaudio("files/sine.wav", y, samplingfreq); ```
License
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.
Owner
- Name: Xtensor Stack
- Login: xtensor-stack
- Kind: organization
- Repositories: 24
- Profile: https://github.com/xtensor-stack
Data structures for data sciences
GitHub Events
Total
- Watch event: 4
- Issue comment event: 2
Last Year
- Watch event: 4
- Issue comment event: 2
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Johan Mabille | j****e@g****m | 64 |
| David Brochart | d****t@g****m | 58 |
| Wolf Vollprecht | w****t@g****m | 33 |
| Sylvain Corlay | s****y@g****m | 22 |
| Andrew Hardin | a****t@g****m | 11 |
| Phillip Cloud | c****d@g****m | 6 |
| Tom de Geus | t****m@g****e | 5 |
| Ullrich Koethe | u****e@i****e | 3 |
| Zhihao Yuan | zy@s****m | 3 |
| hychiang@cml23 | k****2@g****m | 3 |
| sg-james | j****s@s****m | 3 |
| Dženan Zukić | d****c@k****m | 3 |
| DOMINIQUE GEFFROY | g****e@f****r | 1 |
| Eric Fang | e****y@g****m | 1 |
| hankliu5 | y****9@u****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 23
- Total pull requests: 82
- Average time to close issues: 7 months
- Average time to close pull requests: 8 days
- Total issue authors: 16
- Total pull request authors: 9
- Average comments per issue: 0.57
- Average comments per pull request: 0.85
- Merged pull requests: 73
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- davidbrochart (4)
- JohanMabille (3)
- tdegeus (2)
- raphaelsulzer (2)
- CHN-beta (1)
- hankliu5 (1)
- dzenanz (1)
- pberger514 (1)
- jerome-colin (1)
- zhihaoy (1)
- wolfv (1)
- yurivict (1)
- sg-james (1)
- MiraaChan (1)
- Sagigamil (1)
Pull Request Authors
- davidbrochart (38)
- JohanMabille (29)
- SylvainCorlay (5)
- sg-james (3)
- cpcloud (3)
- tdegeus (2)
- dzenanz (2)
- arjundashrath (1)
- hankliu5 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
- Total downloads: unknown
-
Total dependent packages: 7
(may contain duplicates) -
Total dependent repositories: 5
(may contain duplicates) - Total versions: 26
- Total maintainers: 1
spack.io: xtensor
Multi-dimensional arrays with broadcasting and lazy computing
- Homepage: https://github.com/xtensor-stack/xtensor-io
- License: []
-
Latest release: 0.23.10
published almost 4 years ago
Rankings
Maintainers (1)
conda-forge.org: xtensor-io
This library enables loading of many image formats into xtensor/xarrays and NPZ.
- Homepage: https://github.com/xtensor-stack/xtensor-io
- License: BSD-3-Clause
-
Latest release: 0.13.0
published over 4 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- mamba-org/setup-micromamba main composite