monochrome 2025.1.17__py3-none-win_amd64.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,166 @@
1
+ Metadata-Version: 2.1
2
+ Name: monochrome
3
+ Version: 2025.1.17
4
+ Summary: Viewer for monochromatic video data
5
+ Author-Email: Jan Lebert <mail@janlebert.com>
6
+ Classifier: Development Status :: 5 - Production/Stable
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Operating System :: MacOS
11
+ Classifier: Operating System :: POSIX
12
+ Classifier: Programming Language :: C++
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Desktop Environment
15
+ Classifier: Topic :: Multimedia :: Video :: Display
16
+ Classifier: Topic :: Scientific/Engineering :: Visualization
17
+ Project-URL: Documentation, https://monochrome.readthedocs.io
18
+ Project-URL: Repository, https://github.com/sitic/monochrome
19
+ Requires-Python: >=3.6
20
+ Requires-Dist: numpy
21
+ Requires-Dist: flatbuffers>=23.5.26
22
+ Requires-Dist: pytest; extra == "test"
23
+ Requires-Dist: sphinx; extra == "docs"
24
+ Requires-Dist: sphinxcontrib-napoleon; extra == "docs"
25
+ Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
26
+ Requires-Dist: sphinxcontrib-video; extra == "docs"
27
+ Requires-Dist: sphinx-autobuild; extra == "docs"
28
+ Requires-Dist: sphinx-copybutton; extra == "docs"
29
+ Requires-Dist: sphinx-codeautolink; extra == "docs"
30
+ Requires-Dist: furo; extra == "docs"
31
+ Requires-Dist: myst_nb>=1.0.0; extra == "docs"
32
+ Requires-Dist: jupytext; extra == "docs"
33
+ Requires-Dist: jupyter-cache; extra == "docs"
34
+ Requires-Dist: sphinx-remove-toctrees; extra == "docs"
35
+ Requires-Dist: sphinx-design; extra == "docs"
36
+ Requires-Dist: enum-tools[sphinx]; extra == "docs"
37
+ Requires-Dist: opticalmapping[all]; extra == "docs"
38
+ Provides-Extra: test
39
+ Provides-Extra: docs
40
+ Description-Content-Type: text/markdown
41
+
42
+ # Monochrome: Viewer for Monochromatic Video Data
43
+ [![docs](https://readthedocs.org/projects/monochrome/badge/?version=latest&style=)](https://monochrome.readthedocs.org)
44
+ [![tests](https://github.com/sitic/monochrome/actions/workflows/build.yml/badge.svg)](https://github.com/sitic/monochrome/actions/workflows/build.yml)
45
+ [![PyPI](https://img.shields.io/pypi/v/monochrome.svg)](https://pypi.org/project/monochrome/)
46
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/monochrome.svg)](https://python.org)
47
+
48
+ Monochrome is a lightweight and fast video viewer for scientific monochromatic videos with high-dynamic range (float, uint16, etc.).
49
+
50
+ It is designed for viewing high-speed monochromatic fluorescence video data from scientific cameras and meet our specific needs for cardiac optical mapping data (together with [optimap](https://github.com/cardiacvision/optimap)):
51
+ * Support for high-dynamic range (uint16, 32-bit float) data with sliders to adjust intensity range
52
+ * Playback of multiple videos in sync
53
+ * High-speed playback with precise frame-rate control
54
+ * Viewing of optical traces (average intensity in a region of interest over time)
55
+ * Rendering of layers on top of videos with transparency
56
+ * Rendering of point positions over time (e.g. for tracking or optical flow visualization)
57
+ * Exporting videos as a sequence of PNG images or MP4 videos with control over frame rate and frame skipping
58
+ * Cross-platform (Linux, Windows, MacOS)
59
+
60
+ It is designed to be fast and lightweight, i.e. it uses memory-mapping to load video files to avoid copying the data into RAM.
61
+
62
+ ## Installation
63
+
64
+ There are two ways to install Monochrome: as a standalone application and/or with its Python interface through pip.
65
+
66
+ In the standalone application, supported video files can be loaded by drag & drop them into the window or by associating the file extension with Monochrome to open them with a double-click. The Python interface allows to load and play videos from Python scripts and Jupyter notebooks.
67
+
68
+ ### Standalone Application
69
+
70
+ Download the relevant executable (Windows, macOS, or Linux) from the latest [release page](https://github.com/sitic/monochrome/releases/latest). See the [installation instructions](https://monochrome.readthedocs.io/latest/installation_standalone/) for details.
71
+
72
+ ### Python Library
73
+
74
+ The Python library includes all necessary files and does not require the installation of the standalone Monochrome application. Open a terminal window and run the following command:
75
+
76
+ ```bash
77
+ python -m pip install monochrome
78
+ ```
79
+
80
+ See the [Python installation guide](https://monochrome.readthedocs.io/latest/installation_python/) for further details. To start the viewer in standalone mode, run:
81
+ ```bash
82
+ python -m monochrome
83
+ ```
84
+
85
+ See the [tutorial](https://monochrome.readthedocs.io/latest/tutorial/) for an introduction to the Python library, here is a brief overview:
86
+
87
+ ```python
88
+ import monochrome as mc
89
+ import numpy as np
90
+
91
+ # Create some video with shape (time, height, width) as a numpy array
92
+ video = np.random.rand(500, 256, 256)
93
+
94
+ # Display the video, see the tutorial for more details and options.
95
+ # Monochrome should automatically start and show the video in a loop.
96
+ mc.show_video(video, name="First Video", cmap='viridis', vmin=0, vmax=1)
97
+
98
+ # Play second video in sync with the first (note that the videos should have the same length)
99
+ video2 = (np.random.rand(500, 256, 256) * 65535).astype(dtype=np.uint16)
100
+ mc.show_video(video2, name="Second Video", comment="This is a uint16 video", bitrange="uint16")
101
+ # `bitrange` argument is optional, Monochrome will auto-detect the data type
102
+
103
+ # Layers can be added on top of video
104
+ overlay = np.random.rand(500, 256, 256)
105
+ overlay[:, 64:192, :] = np.nan # NaN values will be transparent pixels, see tutorial
106
+ mc.show_layer(overlay, parent="Second Video", cmap='PRGn', opacity='centered')
107
+
108
+ # List of functions:
109
+ # mc.show() is a shortcut for mc.show_video()/show_layer()/show_image()/show_file(),
110
+ # it will try to auto-detect the input type and call the appropriate function.
111
+ # mc.show_video() to show videos
112
+ # mc.show_image() to show single images
113
+ # mc.show_layer() to show layers on top of videos/images
114
+ # mc.show_points() to visualize point positions over time over videos
115
+ # mc.show_flow() to visualize optical flow fields over time
116
+ # mc.show_file() to load videos from file in Monochrome
117
+ # mc.close_video() to close a video/layer/image
118
+ # mc.export_video() export a window (video+layers+...) as a MP4 video
119
+ # mc.launch() to start Monochrome from Python
120
+ # mc.quit() to close Monochrome
121
+ ```
122
+
123
+ ## Native Video File Formats
124
+ Monochrome supports loading the following video file formats:
125
+
126
+ * `.npy`, NumPy array with shape (time, width, height). The data type can be float (np.float32, np.float64), integer (uint8, uint16, etc.), or boolean.
127
+ * `.dat`, raw binary file with shape (time, width, height) and data type float32
128
+ * `.dat`, MultiRecorder file format (used in the cardiac optical mapping community)
129
+
130
+ Drag & drop the file into the window or associate the file extension with Monochrome to open it with a double-click.
131
+
132
+ ## Usage & Key Bindings
133
+
134
+ Adjust settings for each video in the main control window. To view optical traces (average intensity in a region of interest over time), click in a video. Click and drag to move the region of interest. Right-click to remove the region of interest.
135
+
136
+ Keyboard shortcuts:
137
+
138
+ | Keybinding &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Action &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
139
+ | --- | --- |
140
+ | `Ctrl + q` | Quit Monochrome |
141
+ | `Esc` or `q` | Close focused recording |
142
+ | `Space` | Play/Pause |
143
+ | `Up` | Increase playback speed (frame skip) |
144
+ | `Down` | Decrease playback speed (frame skip) |
145
+ | `0` or `r` | Reset playback to beginning |
146
+ | `Left` | Skip to next frame |
147
+ | `Right` | Skip to previous frame |
148
+ | `Shift + Left` | 10x previous frame |
149
+ | `Shift + Right` | 10x next frame |
150
+ | `Ctrl + Left` | Previous frame in focused recording only |
151
+ | `Ctrl + Right` | Next frame in focused recording only |
152
+ | `Ctrl + Left + Shift` | 10x previous frame in focused recording only |
153
+ | `Ctrl + Right + Shift` | 10x next frame in focused recording only |
154
+ | `p` | Save screenshot of focused recording |
155
+ | `s` | Sync playback of all recordings |
156
+
157
+ ## Additional Resources
158
+
159
+ * [Documentation](https://monochrome.readthedocs.io)
160
+ * [Python Tutorial](https://monochrome.readthedocs.io/latest/tutorial/)
161
+ * [PyPI package](https://pypi.org/project/monochrome/)
162
+ * [GitHub repository](https://github.com/sitic/monochrome)
163
+
164
+ ## License
165
+
166
+ Monochrome is licensed under the MIT License.
@@ -0,0 +1,30 @@
1
+ monochrome/__init__.py,sha256=K9n6ztGQJhtcB8deigemASPJbg-1tjuQbSe_mfPNdV4,596
2
+ monochrome/__main__.py,sha256=Jj4xELPOHEEY4tfjPs7w_T9hEjBF4T9PXhdqTGKNfKg,111
3
+ monochrome/_version.py,sha256=FqnZuoibzkVc0O_wQDkN9hP8JNGZyVTGzvfnbnWnx5k,435
4
+ monochrome/data/bin/Monochrome.exe,sha256=7D9jZ0j1z-hW8mBARP8HiO9hgmF6iizo4Lci7tRF4-w,3004416
5
+ monochrome/fbs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ monochrome/fbs/Array3DataChunkf.py,sha256=BOjp4LGcdpQiEtg2pgJxmgapwu6OSnIXGZaUUq91KzU,3166
7
+ monochrome/fbs/Array3DataChunku16.py,sha256=XtZv5L1fHaXS7tdplPgNGICVp3pLWPO6fV-dXn7ablY,3202
8
+ monochrome/fbs/Array3DataChunku8.py,sha256=9HLKxxJD8KG9JKeOhdlJCofDTgTmGoiSgBkRT70--nE,3181
9
+ monochrome/fbs/Array3Meta.py,sha256=CfnzQm5SvE_Tjiqn9PUMljJ37bZ4igVmaWxAs0JoC2A,9689
10
+ monochrome/fbs/Array3MetaFlow.py,sha256=VgQUVuhMdrFz6m5GuxMCqg7saMS21LHtWqsEoMB5QLo,4201
11
+ monochrome/fbs/ArrayDataType.py,sha256=lute99L_Zh9sbLRxl1k13X0hqEp2Qhhi1dY3MEvDKck,195
12
+ monochrome/fbs/BitRange.py,sha256=E1yT-kOzdilhgCVrEUKyLvM7JOrg8IUprf6YXmIvf0k,322
13
+ monochrome/fbs/CloseVideo.py,sha256=IG1P6PI5mMrsdWM0EGUoXNNR0p508EWk0hmF8d8g1wQ,1636
14
+ monochrome/fbs/Color.py,sha256=z2wSydIqYfunYRKwzEGI2B06tQHv5ocLcaGYDFSXtd4,1415
15
+ monochrome/fbs/ColorMap.py,sha256=yXw7BhStk97kAPFkmqlZ7XTLU6WbzaW3seeRiMkJiyo,288
16
+ monochrome/fbs/Data.py,sha256=T3Kx7EBaHGU0hBZ-hHtNjRjb1DnaT4AYccAnS8qmXVo,375
17
+ monochrome/fbs/DictEntry.py,sha256=gztgZ7-PAgDCx02RFZf6tQ0OzRDg0mWnRxhvUwp7bvs,2105
18
+ monochrome/fbs/Filepaths.py,sha256=2EJBdPAlv4pF81AosFuVZu_Y90yi9XahiDINPG1jsfQ,2258
19
+ monochrome/fbs/OpacityFunction.py,sha256=aHUNKVM2el-J47rW113jiSKssG8pPOv_lgfGFHGcr-0,307
20
+ monochrome/fbs/PointsVideo.py,sha256=0YGKXQwXQoE7Nt9plVAA6j5W76Iinmvp6RmkAX-JEm8,6378
21
+ monochrome/fbs/Quit.py,sha256=xJhsWUvABgK9PznKnPVOFfr37JZXMAuiAL6iJ3Hxwrk,1060
22
+ monochrome/fbs/Root.py,sha256=Wb5Q8q1jqcQKcjV_u33tGjUGDueBn_-vAUVNdyct_7g,2141
23
+ monochrome/fbs/VideoExport.py,sha256=u6hS-TbPvz4vUdoue-FRNx21AtRslm8RH7T-LGJt7eo,5243
24
+ monochrome/fbs/VideoExportFormat.py,sha256=qR6xpBFK3zZf8uTtOFdhWGHrDvroKRxCSDuPR8bdu0w,182
25
+ monochrome/ipc.py,sha256=6YA0aeXWb0KK9w56uBFhlULaNGjDgjcXFoSQvv2e-vE,22624
26
+ monochrome-2025.1.17.dist-info/METADATA,sha256=ILGuiinoKW_qLQc-2JiDtEt7h0wuXBeDND2ggN2eQsE,8338
27
+ monochrome-2025.1.17.dist-info/WHEEL,sha256=EShulKv4epvXf2hxJKX50LEbDeR3f4CaySDu_eXD8pg,103
28
+ monochrome-2025.1.17.dist-info/entry_points.txt,sha256=kVQolmivZmjNMMIQgDe1F6gbGv1POeXEq2c5MlDwNTw,62
29
+ monochrome-2025.1.17.dist-info/licenses/LICENSE.md,sha256=ONCQDA6lwlpvDNkB_le4Pn8DuMr1huK2DUzgG-f-BTE,1073
30
+ monochrome-2025.1.17.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: scikit-build-core 0.10.7
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
5
+
@@ -0,0 +1,3 @@
1
+ [gui_scripts]
2
+ Monochrome = monochrome.ipc:console_entrypoint
3
+
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024 Jan Lebert
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.