napari-memmap-tiff 1.0.0__py3-none-any.whl → 1.1.0__py3-none-any.whl
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.
- napari_memmap_tiff/_version.py +2 -2
- napari_memmap_tiff/_widget.py +12 -2
- {napari_memmap_tiff-1.0.0.dist-info → napari_memmap_tiff-1.1.0.dist-info}/METADATA +1 -1
- napari_memmap_tiff-1.1.0.dist-info/RECORD +12 -0
- napari_memmap_tiff-1.0.0.dist-info/RECORD +0 -12
- {napari_memmap_tiff-1.0.0.dist-info → napari_memmap_tiff-1.1.0.dist-info}/WHEEL +0 -0
- {napari_memmap_tiff-1.0.0.dist-info → napari_memmap_tiff-1.1.0.dist-info}/entry_points.txt +0 -0
- {napari_memmap_tiff-1.0.0.dist-info → napari_memmap_tiff-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {napari_memmap_tiff-1.0.0.dist-info → napari_memmap_tiff-1.1.0.dist-info}/top_level.txt +0 -0
napari_memmap_tiff/_version.py
CHANGED
napari_memmap_tiff/_widget.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from typing import TYPE_CHECKING
|
2
2
|
|
3
3
|
import numpy as np
|
4
|
+
import tifffile
|
4
5
|
from imageio.config.extensions import extension_list
|
5
6
|
from imageio.config.plugins import PluginConfig, known_plugins
|
6
7
|
from imageio.plugins.tifffile_v3 import TifffilePlugin
|
@@ -12,8 +13,12 @@ if TYPE_CHECKING:
|
|
12
13
|
|
13
14
|
class MemmapTifffilePlugin(TifffilePlugin):
|
14
15
|
|
15
|
-
def read(
|
16
|
-
|
16
|
+
def read(
|
17
|
+
self, *, index: int = None, page: int = None, **kwargs
|
18
|
+
) -> np.ndarray:
|
19
|
+
if index in (Ellipsis, None) and page is None:
|
20
|
+
return tifffile.memmap(self.request.get_local_filename())
|
21
|
+
return super().read(index=index, page=page, out="memmap", **kwargs)
|
17
22
|
|
18
23
|
|
19
24
|
@magic_factory(auto_call=True, persist=False)
|
@@ -26,6 +31,11 @@ def memmap_config_widget(
|
|
26
31
|
:param enable_memory_map: If enabled, tiff or tif files will be loaded as
|
27
32
|
memory mapped data directly from disk, instead of loading it fully into
|
28
33
|
memory at once.
|
34
|
+
|
35
|
+
Closing and re-opening the plugin removes the checkmark, but it stays
|
36
|
+
set to the last value until napari is re-opened when it's reset. So
|
37
|
+
check and then uncheck the box to disable, after hiding / showing the
|
38
|
+
plugin.
|
29
39
|
"""
|
30
40
|
if enable_memory_map:
|
31
41
|
if "tifffile_memmap" in known_plugins:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: napari-memmap-tiff
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.0
|
4
4
|
Summary: When installed and enabled in the options, it adds an option that when enabled will make napari load tiffs via memory mapping instead of fully into RAM.
|
5
5
|
Author: Matthew Einhorn
|
6
6
|
Author-email: matt@einhorn.dev
|
@@ -0,0 +1,12 @@
|
|
1
|
+
napari_memmap_tiff/__init__.py,sha256=QjsJIUwEYceKGbOvURi2pHFOa2XFhBXiHyzzPsgnM4I,181
|
2
|
+
napari_memmap_tiff/_version.py,sha256=UNO7UaKPam6Zugzw6NMt_RQBnRzrv9GVeKUjWt-tl6I,511
|
3
|
+
napari_memmap_tiff/_widget.py,sha256=4MZCzAXnbOq-FNQP_h80TaAFqJQFT2oD0K518HRkKKk,2164
|
4
|
+
napari_memmap_tiff/napari.yaml,sha256=WW43IHcG3Hi_8LEgUVopoUrsQsXd-ZteKOcWj3fKYn8,612
|
5
|
+
napari_memmap_tiff/_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
napari_memmap_tiff/_tests/test_widget.py,sha256=rltLZlP8bLvyRK4WVpX4I8fAjSRTQzBpgcXxTviz8A0,317
|
7
|
+
napari_memmap_tiff-1.1.0.dist-info/licenses/LICENSE,sha256=AKMeoFqPgD4lKUkLDHO1Hj5-Noqm2LFV8_qK6VlposU,1083
|
8
|
+
napari_memmap_tiff-1.1.0.dist-info/METADATA,sha256=7PBN99YSDpW5vIiIEAa4up4sa1SvxtPOCnFqEz8G4U0,6339
|
9
|
+
napari_memmap_tiff-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
10
|
+
napari_memmap_tiff-1.1.0.dist-info/entry_points.txt,sha256=F2ggm_mIQqjB0RzmAKAAWYA6Ut2NKT25xlUz0i5nvLo,70
|
11
|
+
napari_memmap_tiff-1.1.0.dist-info/top_level.txt,sha256=xgp7Jn5_5Cyj_qhu67lx2Wz176Gp4aecnmVF95jB_K4,19
|
12
|
+
napari_memmap_tiff-1.1.0.dist-info/RECORD,,
|
@@ -1,12 +0,0 @@
|
|
1
|
-
napari_memmap_tiff/__init__.py,sha256=QjsJIUwEYceKGbOvURi2pHFOa2XFhBXiHyzzPsgnM4I,181
|
2
|
-
napari_memmap_tiff/_version.py,sha256=fo5PXsZuloQZu3LdpIFTUAXvJmY2L9N5sNGe2tvdU98,511
|
3
|
-
napari_memmap_tiff/_widget.py,sha256=hEotDzhU3CmwV-gdB9SpZ1824b7v2rtyW4rgWWUORDA,1710
|
4
|
-
napari_memmap_tiff/napari.yaml,sha256=WW43IHcG3Hi_8LEgUVopoUrsQsXd-ZteKOcWj3fKYn8,612
|
5
|
-
napari_memmap_tiff/_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
napari_memmap_tiff/_tests/test_widget.py,sha256=rltLZlP8bLvyRK4WVpX4I8fAjSRTQzBpgcXxTviz8A0,317
|
7
|
-
napari_memmap_tiff-1.0.0.dist-info/licenses/LICENSE,sha256=AKMeoFqPgD4lKUkLDHO1Hj5-Noqm2LFV8_qK6VlposU,1083
|
8
|
-
napari_memmap_tiff-1.0.0.dist-info/METADATA,sha256=WEeWqtbFQKaRFOI-qSwtSSNoW7HSGEfpieGmRcjer-E,6339
|
9
|
-
napari_memmap_tiff-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
10
|
-
napari_memmap_tiff-1.0.0.dist-info/entry_points.txt,sha256=F2ggm_mIQqjB0RzmAKAAWYA6Ut2NKT25xlUz0i5nvLo,70
|
11
|
-
napari_memmap_tiff-1.0.0.dist-info/top_level.txt,sha256=xgp7Jn5_5Cyj_qhu67lx2Wz176Gp4aecnmVF95jB_K4,19
|
12
|
-
napari_memmap_tiff-1.0.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|