unveil-python 0.7.1__tar.gz → 0.7.3__tar.gz
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.
- {unveil_python-0.7.1 → unveil_python-0.7.3}/PKG-INFO +1 -1
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil/__init__.py +1 -1
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil/utils.py +2 -5
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil_python.egg-info/PKG-INFO +1 -1
- {unveil_python-0.7.1 → unveil_python-0.7.3}/LICENSE +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/README.md +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/pyproject.toml +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/setup.cfg +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil/__main__.py +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil/core.py +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil_python.egg-info/SOURCES.txt +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil_python.egg-info/dependency_links.txt +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil_python.egg-info/requires.txt +0 -0
- {unveil_python-0.7.1 → unveil_python-0.7.3}/src/unveil_python.egg-info/top_level.txt +0 -0
|
@@ -9,8 +9,7 @@ import numpy as np
|
|
|
9
9
|
from scipy.ndimage import distance_transform_edt
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
def dilate_atlas_labels(atlas, brain_mask=None, dilation_width: float = 1
|
|
13
|
-
min_label: int = 0):
|
|
12
|
+
def dilate_atlas_labels(atlas, brain_mask=None, dilation_width: float = 1):
|
|
14
13
|
"""
|
|
15
14
|
Dilates cortical atlas labels to include nearby unlabeled voxels (0),
|
|
16
15
|
constrained by a brain mask.
|
|
@@ -24,8 +23,6 @@ def dilate_atlas_labels(atlas, brain_mask=None, dilation_width: float = 1,
|
|
|
24
23
|
Binary mask of the brain (same shape as atlas). The default is one
|
|
25
24
|
dilation_width : float, optional
|
|
26
25
|
Maximum dilation distance in voxels. The default is None.
|
|
27
|
-
min_label : int, optional
|
|
28
|
-
Labels below this values are not dilated
|
|
29
26
|
|
|
30
27
|
Returns
|
|
31
28
|
-------
|
|
@@ -34,7 +31,7 @@ def dilate_atlas_labels(atlas, brain_mask=None, dilation_width: float = 1,
|
|
|
34
31
|
"""
|
|
35
32
|
|
|
36
33
|
# Mask unlabeled voxels inside the brain
|
|
37
|
-
unlabeled = np.where(atlas
|
|
34
|
+
unlabeled = np.where(atlas == 0, 1, 0)
|
|
38
35
|
if brain_mask is not None:
|
|
39
36
|
unlabeled *= brain_mask.astype('int32')
|
|
40
37
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|