Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NutriMorph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DEBREUVE Eric
NutriMorph
Commits
6e2a11eb
Commit
6e2a11eb
authored
4 years ago
by
NADAL Morgane
Browse files
Options
Downloads
Patches
Plain Diff
dealt with hysteresis pb + added features:
* ellipsoid axes sorted in croissant order * other parameters adjusted
parent
a09e72c6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
nutrimorph.py
+1
-1
1 addition, 1 deletion
nutrimorph.py
parameters.ini
+1
-1
1 addition, 1 deletion
parameters.ini
sklgraph/brick/edge.py
+4
-2
4 additions, 2 deletions
sklgraph/brick/edge.py
sklgraph/skl_graph.py
+2
-2
2 additions, 2 deletions
sklgraph/skl_graph.py
with
8 additions
and
6 deletions
nutrimorph.py
+
1
−
1
View file @
6e2a11eb
...
...
@@ -123,7 +123,7 @@ image = in_.ImageVerification(image, channel)
# iv_.image_verification(image, channel) # -> PySide2 user interface # TODO: must return the modified image!
# /!\ conflicts between some versions of PySide2 and Python3
image
=
image
[:,
512
:,
512
:]
# 512 # 562 # Just for development
image
=
image
[:,
800
:,
800
:]
# 512 # 562 # Just for development
img_shape
=
image
.
shape
#
...
...
This diff is collapsed.
Click to expand it.
parameters.ini
+
1
−
1
View file @
6e2a11eb
...
...
@@ -70,7 +70,7 @@ soma_min_area_c : (0.24050024 ** 2) * 1000
[Extensions]
; for hysteresis
ext_low_c
:
1e-20
ext_high_c
:
0.1
ext_high_c
:
0.1
5
; for morphological cleaning
ext_selem_micron_c
:
0.24050024
*
1
ext_min_area_c
:
(0.24050024
**
2)
*
100
...
...
This diff is collapsed.
Click to expand it.
sklgraph/brick/edge.py
+
4
−
2
View file @
6e2a11eb
...
...
@@ -95,14 +95,16 @@ class edge_t:
self
.
widths
=
widths
[
self
.
sites
]
def
SetLengths
(
self
,
size_voxel
:
lis
t
,
widths
:
array_t
=
None
,
check_validity
:
bool
=
False
)
->
None
:
def
SetLengths
(
self
,
size_voxel
:
array_
t
,
widths
:
array_t
=
None
,
check_validity
:
bool
=
False
)
->
None
:
#
if
self
.
node_uids
.
__len__
()
!=
2
:
raise
ValueError
(
"
Edge: Missing sites from adjacent nodes
"
)
sites_as_array
=
np_
.
array
(
self
.
sites
)
segments
=
np_
.
diff
(
sites_as_array
,
axis
=
1
)
sq_lengths
=
(
segments
.
transpose
()
*
np_
.
diag
(
size_voxel
)
*
segments
).
sum
(
axis
=
0
)
# TODO add param size_voxel everyzhere
# segmentsT = segments.transpose()
# sq_lengths = (segmentsT.dot(np_.diag(size_voxel)).dot(segments)).sum(axis=0)
sq_lengths
=
(
segments
**
2
).
sum
(
axis
=
0
)
lengths
=
np_
.
sqrt
(
sq_lengths
)
length
=
lengths
.
sum
().
item
()
...
...
This diff is collapsed.
Click to expand it.
sklgraph/skl_graph.py
+
2
−
2
View file @
6e2a11eb
...
...
@@ -72,7 +72,7 @@ class skl_graph_t(nx_.MultiGraph):
@classmethod
def
FromSkeleton
(
cls
,
skeleton
:
,
size_voxel
:
lis
t
)
->
skl_graph_t
:
cls
,
skeleton
:
skl_map_t
,
size_voxel
:
array_
t
)
->
skl_graph_t
:
#
instance
=
cls
()
...
...
@@ -95,7 +95,7 @@ class skl_graph_t(nx_.MultiGraph):
instance
.
add_nodes_from
((
node
.
uid
,
dict
(
as_node_t
=
node
))
for
node
in
e_nodes
)
instance
.
add_nodes_from
((
node
.
uid
,
dict
(
as_node_t
=
node
))
for
node
in
b_nodes
)
for
edge
in
edges
:
edge
.
SetLengths
(
skeleton
.
widths
,
size_voxel
=
size_voxel
)
edge
.
SetLengths
(
widths
=
skeleton
.
widths
,
size_voxel
=
size_voxel
)
instance
.
AddEdge
(
edge
)
instance
.
n_e_nodes
=
e_nodes
.
__len__
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment