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.
- napari_bootstrapper/__init__.py +11 -0
- napari_bootstrapper/_sample_data.py +42 -0
- napari_bootstrapper/_widget.py +1831 -0
- napari_bootstrapper/datasets/__init__.py +0 -0
- napari_bootstrapper/datasets/napari_2d_dataset.py +232 -0
- napari_bootstrapper/datasets/napari_3d_dataset.py +189 -0
- napari_bootstrapper/gp/add_2d_lsds.py +136 -0
- napari_bootstrapper/gp/add_obfuscated_2d_lsds.py +63 -0
- napari_bootstrapper/gp/calc_max_padding.py +32 -0
- napari_bootstrapper/gp/create_labels.py +161 -0
- napari_bootstrapper/gp/custom_grow_boundary.py +114 -0
- napari_bootstrapper/gp/custom_intensity_augment.py +131 -0
- napari_bootstrapper/gp/napari_image_source.py +37 -0
- napari_bootstrapper/gp/napari_labels_source.py +36 -0
- napari_bootstrapper/gp/np_source.py +35 -0
- napari_bootstrapper/gp/obfuscate_affs.py +98 -0
- napari_bootstrapper/gp/smooth_augment.py +73 -0
- napari_bootstrapper/gp/torch_predict.py +177 -0
- napari_bootstrapper/models/__init__.py +136 -0
- napari_bootstrapper/models/model_2d.py +75 -0
- napari_bootstrapper/models/model_3d.py +66 -0
- napari_bootstrapper/models/unet.py +513 -0
- napari_bootstrapper/napari.yaml +46 -0
- napari_bootstrapper/post/__init__.py +60 -0
- napari_bootstrapper/post/_merge_split_widget.py +789 -0
- napari_bootstrapper/post/cc.py +108 -0
- napari_bootstrapper/post/mws.py +59 -0
- napari_bootstrapper/post/ws.py +159 -0
- napari_bootstrapper/sample_data/image.npy +0 -0
- napari_bootstrapper/sample_data/labels.npy +0 -0
- napari_bootstrapper-0.1.1.dist-info/METADATA +175 -0
- napari_bootstrapper-0.1.1.dist-info/RECORD +36 -0
- napari_bootstrapper-0.1.1.dist-info/WHEEL +5 -0
- napari_bootstrapper-0.1.1.dist-info/entry_points.txt +2 -0
- napari_bootstrapper-0.1.1.dist-info/licenses/LICENSE +28 -0
- napari_bootstrapper-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -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
|
+
]
|