smalldataviewer
Simple matplotlib-based tool for viewing small amounts of 3D image data; helpful for debugging. Supports python 2.7 and 3.4+.
Adapted from this matplotlib recipe.
Installation
pip install smalldataviewer
Some file types require additional dependencies:
Usage
As executable
usage: smalldataviewer [-h] [-i INTERNAL_PATH] [-t TYPE] [-o ORDER]
[-f OFFSET] [-s SHAPE] [-v]
path
positional arguments:
path Path to HDF5, N5, zarr, npy, npz or JSON file
containing a 3D dataset
optional arguments:
-h, --help show this help message and exit
-i INTERNAL_PATH, --internal_path INTERNAL_PATH
Internal path of dataset inside HDF5, N5, zarr or npz
file. If JSON, assumes the outerobject is a dict, and
internal_path is the key of the array
-t TYPE, --type TYPE Dataset file type. Inferred from extension if not
given.
-o ORDER, --order ORDER
Order of spatial axes for axis labelling purposes.
Data is not transposed: dimension 0 will be scrolled
through, dimension 1 will be on the up-down axis,
dimension 2 will be on the left-right axis,
anddimension 3, if it exists, will be used as the
colour channels. Default "zyx".
-f OFFSET, --offset OFFSET
3D offset of ROI from (0, 0, 0) in pixels, in the form
"<scroll>,<vertical>,<horizontal>"
-s SHAPE, --shape SHAPE
3D shape of ROI in pixels, in the form
"<scroll>,<vertical>,<horizontal>"
-v, --verbose Increase logging verbosity
smalldataviewer my_data.hdf5 -i /my_group/my_volume
Note: because of the circumstances under which python holds file descriptors open, and under which matplotlib blocks, the executable form reads the data into memory in its entirety. If your data are too big for this, look at small chunks with the oFfset and Shape options.
As library
from smalldataviewer import DataViewer, dataviewer_from_file
import numpy as np
data = np.random.random((30, 100, 100))
viewer = DataViewer(data)
viewer.show() # or matplotlib.pyplot.show()
viewer2 = dataviewer_from_file(dataviewer, "my_data.npz", "volume")
viewer2.show()
Note: dataviewer_from_file reads the requested data into memory. DataViewer does not, by default. However, you may need to, depending on the rest of your script.
Metadata
Release files for smalldataviewer 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smalldataviewer-0.3.2.tar.gz | 7.2 kB | Without provenance | Details for smalldataviewer-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smalldataviewer-0.3.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for smalldataviewer-0.3.2-py2.py3-none-any.whl |
Total release size: 17.1 kB
Release files / smalldataviewer-0.3.2.tar.gz
| Download URL | smalldataviewer-0.3.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7439dee037c2faad28701ae2b2c932474a0a46b2cec864c3cb8c7eacf32a60b6
|
|
BLAKE2b-256 checksum How to use checksums |
ebf7b096dcb441e90db174004922fc217abc33abe854bb837d61bdbcacf8f14d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / smalldataviewer-0.3.2-py2.py3-none-any.whl
| Download URL | smalldataviewer-0.3.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9a8b106e492b7c1ba55e3df2a08e5435c49fb8164c26f730c85dbee512442652
|
|
BLAKE2b-256 checksum How to use checksums |
220dd6e4fb9cb326a2934fbf18729fcbd6c2d08def86cb63b20e5ed6d90bdb67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for smalldataviewer 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.