PartSegCore-compiled-backend 0.15.15__cp315-cp315t-win_amd64.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.
- PartSegCore_compiled_backend/__init__.py +14 -0
- PartSegCore_compiled_backend/_fast_unique.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/_fast_unique.pyi +0 -0
- PartSegCore_compiled_backend/_napari_mapping.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/calc_bounds.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/calc_bounds.pyi +3 -0
- PartSegCore_compiled_backend/color_image_cython.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/color_image_cython.pyi +16 -0
- PartSegCore_compiled_backend/fast_unique.py +40 -0
- PartSegCore_compiled_backend/multiscale_opening/__init__.py +3 -0
- PartSegCore_compiled_backend/multiscale_opening/mso.h +924 -0
- PartSegCore_compiled_backend/multiscale_opening/mso_bind.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/multiscale_opening/mso_bind.pyi +49 -0
- PartSegCore_compiled_backend/multiscale_opening/my_queue.h +63 -0
- PartSegCore_compiled_backend/napari_mapping.py +126 -0
- PartSegCore_compiled_backend/sprawl_utils/__init__.py +0 -0
- PartSegCore_compiled_backend/sprawl_utils/distance_utils.pxd +34 -0
- PartSegCore_compiled_backend/sprawl_utils/euclidean_cython.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/sprawl_utils/euclidean_cython.pyi +9 -0
- PartSegCore_compiled_backend/sprawl_utils/find_split.py +408 -0
- PartSegCore_compiled_backend/sprawl_utils/find_split.pyi +69 -0
- PartSegCore_compiled_backend/sprawl_utils/fuzzy_distance.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/sprawl_utils/global_consts.h +33 -0
- PartSegCore_compiled_backend/sprawl_utils/my_queue.h +63 -0
- PartSegCore_compiled_backend/sprawl_utils/path_sprawl_cython.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/sprawl_utils/path_sprawl_cython.pyi +8 -0
- PartSegCore_compiled_backend/sprawl_utils/sprawl_utils.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/sprawl_utils/sprawl_utils.pyi +23 -0
- PartSegCore_compiled_backend/triangulate.cp315t-win_amd64.pyd +0 -0
- PartSegCore_compiled_backend/triangulation/debug_util.hpp +60 -0
- PartSegCore_compiled_backend/triangulation/intersection.hpp +375 -0
- PartSegCore_compiled_backend/triangulation/point.hpp +245 -0
- PartSegCore_compiled_backend/triangulation/triangulate.hpp +1429 -0
- PartSegCore_compiled_backend/utils.py +3 -0
- PartSegCore_compiled_backend/version.py +24 -0
- partsegcore_compiled_backend-0.15.15.dist-info/DELVEWHEEL +2 -0
- partsegcore_compiled_backend-0.15.15.dist-info/METADATA +94 -0
- partsegcore_compiled_backend-0.15.15.dist-info/RECORD +42 -0
- partsegcore_compiled_backend-0.15.15.dist-info/WHEEL +5 -0
- partsegcore_compiled_backend-0.15.15.dist-info/licenses/LICENSE.txt +11 -0
- partsegcore_compiled_backend.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
- partsegcore_compiled_backend.libs/vcomp140-f96f3a14d88d8846f31f3ab38a490304.dll +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""""" # start delvewheel patch
|
|
2
|
+
def _delvewheel_patch_1_13_1():
|
|
3
|
+
import os
|
|
4
|
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'partsegcore_compiled_backend.libs'))):
|
|
5
|
+
os.add_dll_directory(libs_dir)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
_delvewheel_patch_1_13_1()
|
|
9
|
+
del _delvewheel_patch_1_13_1
|
|
10
|
+
# end delvewheel patch
|
|
11
|
+
|
|
12
|
+
from PartSegCore_compiled_backend.version import __version__
|
|
13
|
+
|
|
14
|
+
__all__ = ['__version__']
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
def calculate_borders(labels: np.ndarray, border_thick: int, per_layer: bool = True) -> np.ndarray: ...
|
|
4
|
+
def calculate_borders2d(labels: np.ndarray, border_thick: int) -> np.ndarray: ...
|
|
5
|
+
def color_grayscale(
|
|
6
|
+
cmap: np.ndarray, image: np.ndarray, min_val: float, max_val: float, single_channel: int = -1
|
|
7
|
+
) -> np.ndarray: ...
|
|
8
|
+
def add_labels(
|
|
9
|
+
image: np.ndarray,
|
|
10
|
+
labels: np.ndarray,
|
|
11
|
+
overlay: float,
|
|
12
|
+
only_border: int,
|
|
13
|
+
border_thick: int,
|
|
14
|
+
use_labels: np.ndarray,
|
|
15
|
+
label_colors: np.ndarray,
|
|
16
|
+
) -> np.ndarray: ...
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Module with fast unique calculation.
|
|
3
|
+
This implementation is faster than numpy.unique and comparable to
|
|
4
|
+
pandas.unique(data.ravel())` for data with continuous memory.
|
|
5
|
+
If data are not continuous memory this function is faster than pandas.unique.
|
|
6
|
+
|
|
7
|
+
For benchmark please see https://github.com/4DNucleome/PartSegCore-compiled-backend/blob/master/notebooks/performance_label_unique.ipynb
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
from PartSegCore_compiled_backend._fast_unique import unique1d, unique2d, unique3d
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def label_unique(array, numpy_fallback=False) -> np.ndarray:
|
|
16
|
+
"""
|
|
17
|
+
Calculate unique values in array.
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
array : np.ndarray
|
|
22
|
+
array to calculate unique values
|
|
23
|
+
numpy_fallback : bool
|
|
24
|
+
if True allow using numpy.unique if cython version is not available
|
|
25
|
+
otherwise raise RuntimeError
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
np.ndarray
|
|
30
|
+
array of unique values
|
|
31
|
+
"""
|
|
32
|
+
if array.ndim == 1:
|
|
33
|
+
return unique1d(array)
|
|
34
|
+
if array.ndim == 2:
|
|
35
|
+
return unique2d(array)
|
|
36
|
+
if array.ndim == 3:
|
|
37
|
+
return unique3d(array)
|
|
38
|
+
if numpy_fallback:
|
|
39
|
+
return np.unique(array)
|
|
40
|
+
raise RuntimeError('Array must be 1d, 2d or 3d')
|