Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 445f2be8 authored by DEBREUVE Eric's avatar DEBREUVE Eric
Browse files

refactoring

parent 2e524b41
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@ __material__/
__runtime__/
__version__/
__when__.txt
data/
mprofile_*.dat
......
......@@ -68,8 +68,8 @@ def ShortestPathFromToN(
point: site_h,
costs: array_t,
candidate_points_fct: Callable,
max_straight_sq_dist: cy_.double = np_.inf,
) -> Tuple[site_path_h, cy_.double]:
max_straight_sq_dist: float = np_.inf,
) -> Tuple[site_path_h, float]:
#
candidate_points, candidate_indexing = candidate_points_fct(
point, max_straight_sq_dist
......
......@@ -126,7 +126,7 @@ class extension_t(glial_cmp_t):
)
@staticmethod
def ExtensionWithSite(
def ExtensionContainingSite(
extensions: Sequence[extension_t], site: site_h
) -> Optional[extension_t]:
#
......
......@@ -36,8 +36,6 @@ from brick.general.type import array_t, np_array_picker_h, py_array_picker_h, si
from abc import abstractmethod
from typing import Dict, List, Optional, Tuple
import numpy as np_
class glial_cmp_t:
#
......
......@@ -34,9 +34,6 @@ from brick.general.type import array_t
import numpy as np_
invalid_n_neighbors_c = 27 # Must be positive and higher (strictly) than
# the max number of neighbors in a skeleton
shifts_of_26_neighbors_c = tuple(
(i, j, k)
for i in (-1, 0, 1)
......@@ -44,6 +41,8 @@ shifts_of_26_neighbors_c = tuple(
for k in (-1, 0, 1)
if i != 0 or j != 0 or k != 0 # take every direct neighbors except itself
)
# Must be positive and higher (strictly) than the max number of neighbors
invalid_n_neighbors_c = shifts_of_26_neighbors_c.__len__() + 1
def PartLMap(map_: array_t) -> array_t:
......
......@@ -235,7 +235,7 @@ while should_look_for_connections:
max_straight_sq_dist=max_straight_sq_dist_c,
)
if length <= max_weighted_length_c:
tgt_extenstion = extension_t.ExtensionWithSite(extensions, path[-1])
tgt_extenstion = extension_t.ExtensionContainingSite(extensions, path[-1])
cn_.ValidateConnection(tgt_extenstion, extension, path, dijkstra_costs)
should_look_for_connections = True
print(": Made")
......
......@@ -33,6 +33,7 @@ import skimage.morphology as mp_
data_path = "./data/DIO_6H_6_1.70bis_2.2_3.tif"
channel = 1
with_plot = True
soma_low_c = 0.15
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment