msr
Pure Python and cross-platform reader for MSR/OBF image files as created by Imspector.
Implementation follows the description at: https://imspectordocs.readthedocs.io/en/latest/fileformat.html
WARNING: Only tested on data from our own Abberior Expert Line STED microscope with a narrow range of Imspector versions.
Installation
pip install msr-reader
Usage
from msr_reader import OBFFile
from xml.etree import ElementTree
import ome_types
with OBFFile('file_path.msr') as f:
# reading image data
idx = 0
img = f.read_stack(idx) # read stack with index idx into numpy array
# metadata
stack_shapes = f.shapes # list of stack shapes, including stack and dimension names
pixel_sizes = f.pixel_sizes # like shapes, but with pixel sizes (unit: meters)
# imspector metadata as xml string
xml_imspector_metadata = f.get_imspector_xml_metadata(idx)
# can be parsed with ElementTree, for example
et = ElementTree.fromstring(xml_imspector_metadata)
# find, e.g. x pixel size in XML
et.find('doc/ExpControl/scan/range/x/psz').text
# OME-XML metadata as xml string
xml_ome_metadata = f.get_ome_xml_metadata()
# can be parsed with ome-types, for example
ome_meta = ome_types.from_xml(xml_ome_metadata)
Metadata
Release files for msr-reader 0.2.1
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 |
|---|---|---|---|---|
| msr_reader-0.2.1.tar.gz | 31.0 kB | Without provenance | Details for msr_reader-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msr_reader-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for msr_reader-0.2.1-py3-none-any.whl |
Total release size: 38.8 kB
Release files / msr_reader-0.2.1.tar.gz
| Download URL | msr_reader-0.2.1.tar.gz |
|---|---|
| Size | 31.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddebc49ac41beb5bbe4254077e17279fd5a0fddd156aacc6aed0598197a133cb
|
|
BLAKE2b-256 checksum How to use checksums |
6d195b3beda8fcb6f57ab2af1c9a06f8373267909a41cbe6921e3dd7c55b67fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / msr_reader-0.2.1-py3-none-any.whl
| Download URL | msr_reader-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f90165275888f83a55eed904bbb34da10f93d81b143231f7ffd5dc69eb240b31
|
|
BLAKE2b-256 checksum How to use checksums |
53390014d882d7a1102a9535e8ec6eb35e8f0951da3be3c18bfaca735ee1c7e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for msr-reader 0.2.1
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.