obffile 2026.2.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ BSD-3-Clause license
2
+
3
+ Copyright (c) 2025-2026, Christoph Gohlke
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,31 @@
1
+ include LICENSE
2
+ include README.rst
3
+ include CHANGES.rst
4
+ include pyproject.toml
5
+
6
+ include obffile/py.typed
7
+
8
+ include docs/conf.py
9
+ include docs/index.rst
10
+ include docs/_static/custom.css
11
+
12
+ # include .github/workflows/wheel.yml
13
+
14
+ exclude .env
15
+ exclude *.cmd
16
+ exclude *.yaml
17
+ exclude mypy.ini
18
+ exclude ruff.toml
19
+ recursive-exclude doc *
20
+ recursive-exclude docs *
21
+ recursive-exclude test *
22
+ recursive-exclude tests *
23
+
24
+ recursive-exclude * __pycache__
25
+ recursive-exclude * *.py[co]
26
+ recursive-exclude * *Copy*
27
+
28
+ # recursive-include tests readme.txt
29
+
30
+ include tests/conftest.py
31
+ include tests/test_obffile.py
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: obffile
3
+ Version: 2026.2.20
4
+ Summary: Read Imspector object binary format files (OBF and MSR)
5
+ Home-page: https://www.cgohlke.com
6
+ Author: Christoph Gohlke
7
+ Author-email: cgohlke@cgohlke.com
8
+ License: BSD-3-Clause
9
+ Project-URL: Bug Tracker, https://github.com/cgohlke/obffile/issues
10
+ Project-URL: Source Code, https://github.com/cgohlke/obffile
11
+ Platform: any
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy
25
+ Provides-Extra: all
26
+ Requires-Dist: xarray; extra == "all"
27
+ Requires-Dist: tifffile; extra == "all"
28
+ Requires-Dist: matplotlib; extra == "all"
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: license
36
+ Dynamic: license-file
37
+ Dynamic: platform
38
+ Dynamic: project-url
39
+ Dynamic: provides-extra
40
+ Dynamic: requires-dist
41
+ Dynamic: requires-python
42
+ Dynamic: summary
43
+
44
+ Read Imspector object binary format files (OBF and MSR)
45
+ =======================================================
46
+
47
+ Obffile is a Python library to read image and metadata from
48
+ Object Binary Format (OBF) and Measurement Summary Record (MSR) image files.
49
+ These files are written by Imspector software to store image and metadata
50
+ from microscopy experiments.
51
+
52
+ :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
53
+ :License: BSD-3-Clause
54
+ :Version: 2026.2.20
55
+
56
+ Quickstart
57
+ ----------
58
+
59
+ Install the obffile package and all dependencies from the
60
+ `Python Package Index <https://pypi.org/project/obffile/>`_::
61
+
62
+ python -m pip install -U obffile[all]
63
+
64
+ See `Examples`_ for using the programming interface.
65
+
66
+ Source code and support are available on
67
+ `GitHub <https://github.com/cgohlke/obffile>`_.
68
+
69
+ Requirements
70
+ ------------
71
+
72
+ This revision was tested with the following requirements and dependencies
73
+ (other versions may work):
74
+
75
+ - `CPython <https://www.python.org>`_ 3.11.9, 3.12.10, 3.13.12, 3.14.3 64-bit
76
+ - `NumPy <https://pypi.org/project/numpy>`_ 2.4.2
77
+ - `Xarray <https://pypi.org/project/xarray>`_ 2026.2.0 (recommended)
78
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.8 (optional)
79
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2026.2.16 (optional)
80
+
81
+ Revisions
82
+ ---------
83
+
84
+ 2026.2.20
85
+
86
+ - Initial alpha release.
87
+ - …
88
+
89
+ Notes
90
+ -----
91
+
92
+ `Imspector <https://imspectordocs.readthedocs.io>`_ is a software platform for
93
+ super-resolution and confocal microscopy developed by Abberior Instruments.
94
+
95
+ This library is in its early stages of development. It is not feature-complete.
96
+ Large, backwards-incompatible changes may occur between revisions.
97
+
98
+ Specifically, the following features are not supported:
99
+ writing or modifying OBF/MSR files, non-OBF based MSR files, reading
100
+ MSR-specific non-image data (window positions, hardware configuration),
101
+ and compression types other than zlib.
102
+
103
+ The library has been tested with a limited number of files only.
104
+
105
+ The Imspector image file formats are documented at
106
+ https://imspectordocs.readthedocs.io/en/latest/fileformat.html.
107
+
108
+ Other implementations for reading Imspector image files are
109
+ `msr-reader <https://github.com/hoerlteam/msr-reader>`_,
110
+ `obf_support.py <https://github.com/biosciflo/VISION>`_, and
111
+ `bio-formats <https://github.com/ome/bioformats>`_.
112
+
113
+ Examples
114
+ --------
115
+
116
+ Read an image stack and metadata from a OBF file:
117
+
118
+ >>> with ObfFile('tests/data/Test.obf') as obf:
119
+ ... assert obf.header.metadata['ome_xml'].startswith('<?xml')
120
+ ... for stack in obf.stacks:
121
+ ... _ = stack.name, stack.dims, stack.shape, stack.dtype
122
+ ... obf.stacks[0].asxarray()
123
+ ...
124
+ <xarray.DataArray 'Abberior STAR RED.Confocal' (T: 18, Z: 2, Y: 339, X: 381)...
125
+ array([[[[0, 0, 0, ..., 3, 3, 3],
126
+ [0, 0, 0, ..., 4, 3, 3],
127
+ ...,
128
+ [0, 0, 0, ..., 0, 0, 0],
129
+ [0, 0, 0, ..., 0, 0, 0]]]], shape=(18, 2, 339, 381), dtype=int16)
130
+ Coordinates:
131
+ * T (T) float64 144B 0.0 0.0 0.0 0.0 0.0 0.0 ...
132
+ * Z (Z) float64 16B 1.25e-07 3.75e-07
133
+ * Y (Y) float64 3kB 0.0 2e-07 4e-07 ...
134
+ * X (X) float64 3kB 0.0 2.002e-07 4.003e-07 ...
135
+ ...
136
+
137
+ View the image stack and metadata in a OBF file from the console::
138
+
139
+ $ python -m obffile tests/data/Test.obf
@@ -0,0 +1,101 @@
1
+ ..
2
+ This file is generated by setup.py
3
+
4
+ Read Imspector object binary format files (OBF and MSR)
5
+ =======================================================
6
+
7
+ Obffile is a Python library to read image and metadata from
8
+ Object Binary Format (OBF) and Measurement Summary Record (MSR) image files.
9
+ These files are written by Imspector software to store image and metadata
10
+ from microscopy experiments.
11
+
12
+ :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
13
+ :License: BSD-3-Clause
14
+ :Version: 2026.2.20
15
+
16
+ Quickstart
17
+ ----------
18
+
19
+ Install the obffile package and all dependencies from the
20
+ `Python Package Index <https://pypi.org/project/obffile/>`_::
21
+
22
+ python -m pip install -U obffile[all]
23
+
24
+ See `Examples`_ for using the programming interface.
25
+
26
+ Source code and support are available on
27
+ `GitHub <https://github.com/cgohlke/obffile>`_.
28
+
29
+ Requirements
30
+ ------------
31
+
32
+ This revision was tested with the following requirements and dependencies
33
+ (other versions may work):
34
+
35
+ - `CPython <https://www.python.org>`_ 3.11.9, 3.12.10, 3.13.12, 3.14.3 64-bit
36
+ - `NumPy <https://pypi.org/project/numpy>`_ 2.4.2
37
+ - `Xarray <https://pypi.org/project/xarray>`_ 2026.2.0 (recommended)
38
+ - `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.8 (optional)
39
+ - `Tifffile <https://pypi.org/project/tifffile/>`_ 2026.2.16 (optional)
40
+
41
+ Revisions
42
+ ---------
43
+
44
+ 2026.2.20
45
+
46
+ - Initial alpha release.
47
+ - …
48
+
49
+ Notes
50
+ -----
51
+
52
+ `Imspector <https://imspectordocs.readthedocs.io>`_ is a software platform for
53
+ super-resolution and confocal microscopy developed by Abberior Instruments.
54
+
55
+ This library is in its early stages of development. It is not feature-complete.
56
+ Large, backwards-incompatible changes may occur between revisions.
57
+
58
+ Specifically, the following features are not supported:
59
+ writing or modifying OBF/MSR files, non-OBF based MSR files, reading
60
+ MSR-specific non-image data (window positions, hardware configuration),
61
+ and compression types other than zlib.
62
+
63
+ The library has been tested with a limited number of files only.
64
+
65
+ The Imspector image file formats are documented at
66
+ https://imspectordocs.readthedocs.io/en/latest/fileformat.html.
67
+
68
+ Other implementations for reading Imspector image files are
69
+ `msr-reader <https://github.com/hoerlteam/msr-reader>`_,
70
+ `obf_support.py <https://github.com/biosciflo/VISION>`_, and
71
+ `bio-formats <https://github.com/ome/bioformats>`_.
72
+
73
+ Examples
74
+ --------
75
+
76
+ Read an image stack and metadata from a OBF file:
77
+
78
+ .. code-block:: python
79
+
80
+ >>> with ObfFile('tests/data/Test.obf') as obf:
81
+ ... assert obf.header.metadata['ome_xml'].startswith('<?xml')
82
+ ... for stack in obf.stacks:
83
+ ... _ = stack.name, stack.dims, stack.shape, stack.dtype
84
+ ... obf.stacks[0].asxarray()
85
+ ...
86
+ <xarray.DataArray 'Abberior STAR RED.Confocal' (T: 18, Z: 2, Y: 339, X: 381)...
87
+ array([[[[0, 0, 0, ..., 3, 3, 3],
88
+ [0, 0, 0, ..., 4, 3, 3],
89
+ ...,
90
+ [0, 0, 0, ..., 0, 0, 0],
91
+ [0, 0, 0, ..., 0, 0, 0]]]], shape=(18, 2, 339, 381), dtype=int16)
92
+ Coordinates:
93
+ * T (T) float64 144B 0.0 0.0 0.0 0.0 0.0 0.0 ...
94
+ * Z (Z) float64 16B 1.25e-07 3.75e-07
95
+ * Y (Y) float64 3kB 0.0 2e-07 4e-07 ...
96
+ * X (X) float64 3kB 0.0 2.002e-07 4.003e-07 ...
97
+ ...
98
+
99
+ View the image stack and metadata in a OBF file from the console::
100
+
101
+ $ python -m obffile tests/data/Test.obf
@@ -0,0 +1,9 @@
1
+ # obffile/__init__.py
2
+
3
+ from .obffile import *
4
+ from .obffile import __all__, __doc__, __version__
5
+
6
+ # constants are repeated for documentation
7
+
8
+ __version__ = __version__
9
+ """Obffile version string."""
@@ -0,0 +1,9 @@
1
+ # obffile/__main__.py
2
+
3
+ """Obffile package command line script."""
4
+
5
+ import sys
6
+
7
+ from .obffile import main
8
+
9
+ sys.exit(main())