napari-bootstrapper 0.1.1__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.
Files changed (36) hide show
  1. napari_bootstrapper/__init__.py +11 -0
  2. napari_bootstrapper/_sample_data.py +42 -0
  3. napari_bootstrapper/_widget.py +1831 -0
  4. napari_bootstrapper/datasets/__init__.py +0 -0
  5. napari_bootstrapper/datasets/napari_2d_dataset.py +232 -0
  6. napari_bootstrapper/datasets/napari_3d_dataset.py +189 -0
  7. napari_bootstrapper/gp/add_2d_lsds.py +136 -0
  8. napari_bootstrapper/gp/add_obfuscated_2d_lsds.py +63 -0
  9. napari_bootstrapper/gp/calc_max_padding.py +32 -0
  10. napari_bootstrapper/gp/create_labels.py +161 -0
  11. napari_bootstrapper/gp/custom_grow_boundary.py +114 -0
  12. napari_bootstrapper/gp/custom_intensity_augment.py +131 -0
  13. napari_bootstrapper/gp/napari_image_source.py +37 -0
  14. napari_bootstrapper/gp/napari_labels_source.py +36 -0
  15. napari_bootstrapper/gp/np_source.py +35 -0
  16. napari_bootstrapper/gp/obfuscate_affs.py +98 -0
  17. napari_bootstrapper/gp/smooth_augment.py +73 -0
  18. napari_bootstrapper/gp/torch_predict.py +177 -0
  19. napari_bootstrapper/models/__init__.py +136 -0
  20. napari_bootstrapper/models/model_2d.py +75 -0
  21. napari_bootstrapper/models/model_3d.py +66 -0
  22. napari_bootstrapper/models/unet.py +513 -0
  23. napari_bootstrapper/napari.yaml +46 -0
  24. napari_bootstrapper/post/__init__.py +60 -0
  25. napari_bootstrapper/post/_merge_split_widget.py +789 -0
  26. napari_bootstrapper/post/cc.py +108 -0
  27. napari_bootstrapper/post/mws.py +59 -0
  28. napari_bootstrapper/post/ws.py +159 -0
  29. napari_bootstrapper/sample_data/image.npy +0 -0
  30. napari_bootstrapper/sample_data/labels.npy +0 -0
  31. napari_bootstrapper-0.1.1.dist-info/METADATA +175 -0
  32. napari_bootstrapper-0.1.1.dist-info/RECORD +36 -0
  33. napari_bootstrapper-0.1.1.dist-info/WHEEL +5 -0
  34. napari_bootstrapper-0.1.1.dist-info/entry_points.txt +2 -0
  35. napari_bootstrapper-0.1.1.dist-info/licenses/LICENSE +28 -0
  36. napari_bootstrapper-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,11 @@
1
+ __version__ = "0.1.1"
2
+
3
+ from ._sample_data import make_sample_data
4
+ from ._widget import (
5
+ Widget,
6
+ )
7
+
8
+ __all__ = (
9
+ "make_sample_data",
10
+ "Widget",
11
+ )
@@ -0,0 +1,42 @@
1
+ """
2
+ This module is an example of a barebones sample data provider for napari.
3
+
4
+ It implements the "sample data" specification.
5
+ see: https://napari.org/stable/plugins/building_a_plugin/guides.html#sample-data
6
+
7
+ Replace code below according to your needs.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from pathlib import Path
13
+
14
+ import numpy as np
15
+
16
+ CREMI_IMAGE_SAMPLE = Path(__file__).parent / "sample_data" / "image.npy"
17
+ CREMI_LABELS_SAMPLE = Path(__file__).parent / "sample_data" / "labels.npy"
18
+
19
+
20
+ def make_sample_data():
21
+ raw = np.load(CREMI_IMAGE_SAMPLE, "r")
22
+ painting = np.load(CREMI_LABELS_SAMPLE, "r")
23
+ raw = raw.astype(np.uint8)
24
+ painting = painting.astype(np.uint32)
25
+ return [
26
+ (
27
+ raw,
28
+ {
29
+ "name": "Raw",
30
+ "metadata": {"axes": ["z", "y", "x"]},
31
+ },
32
+ "image",
33
+ ),
34
+ (
35
+ painting,
36
+ {
37
+ "name": "Sparse Labels",
38
+ "metadata": {"axes": ["z", "y", "x"]},
39
+ },
40
+ "Labels",
41
+ ),
42
+ ]