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
d5f543e7
Commit
d5f543e7
authored
4 years ago
by
NADAL Morgane
Browse files
Options
Downloads
Patches
Plain Diff
added extensions lengths hist
parent
fd7eee67
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nutrimorph.py
+21
-3
21 additions, 3 deletions
nutrimorph.py
with
21 additions
and
3 deletions
nutrimorph.py
+
21
−
3
View file @
d5f543e7
...
...
@@ -119,7 +119,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
[:,
800
:,
800
:]
# 512 # 562 # Just for development
image
=
image
[:,
512
:,
512
:]
# 512 # 562 # Just for development
img_shape
=
image
.
shape
#
...
...
@@ -454,6 +454,12 @@ for soma in somas:
f
"
Min/Mean/Median/Max Length =
{
min_length
}
/
{
mean_length
}
/
{
median_length
}
/
{
max_length
}
\n
"
f
"
Standard Deviation =
{
std_length
}
/ Entropy =
{
entropy_length
}
"
)
pl_
.
hist
(
ext_lengths
)
pl_
.
title
(
"
Histogram of all the extensions lengths
"
)
pl_
.
xlabel
(
"
Lengths
"
)
pl_
.
ylabel
(
'
Number of extensions
'
)
pl_
.
show
(
block
=
True
)
# PRIMARY extensions
ext_lengths_P
=
soma
.
skl_graph
.
primary_edge_lengths
(
soma
)
total_ext_length_P
=
sum
(
ext_lengths_P
)
...
...
@@ -471,8 +477,14 @@ for soma in somas:
f
"
Min/Mean/Median/Max Length =
{
min_length_P
}
/
{
mean_length_P
}
/
{
median_length_P
}
/
{
max_length_P
}
\n
"
f
"
Standard Deviation =
{
std_length_P
}
/ Entropy =
{
entropy_length_P
}
"
)
pl_
.
hist
(
ext_lengths_P
)
pl_
.
title
(
"
Histogram of Primary extensions lengths
"
)
pl_
.
xlabel
(
"
Lengths
"
)
pl_
.
ylabel
(
'
Number of Primary extensions
'
)
pl_
.
show
(
block
=
True
)
# SECONDARY extensions
ext_lengths_S
=
soma
.
skl_graph
.
secondary_edge_lengths
(
soma
)
# TODO secondary fct doesnt work = takes all the ext
ext_lengths_S
=
soma
.
skl_graph
.
secondary_edge_lengths
(
soma
)
total_ext_length_S
=
sum
(
ext_lengths_S
)
# min, mean, median, max and standard deviation of the PRIMARY extensions
if
total_ext_length_S
>
0
:
...
...
@@ -488,7 +500,13 @@ for soma in somas:
f
"
Min/Mean/Median/Max Length =
{
min_length_S
}
/
{
mean_length_S
}
/
{
median_length_S
}
/
{
max_length_S
}
\n
"
f
"
Standard Deviation =
{
std_length_S
}
/ Entropy =
{
entropy_length_S
}
"
)
# TODO HISTOGRAMS, FRANGI:WIDTH OF EXTENSIONS, CURVATURE EXTENSIONS
pl_
.
hist
(
ext_lengths_S
)
pl_
.
title
(
"
Histogram of Secondary extensions lengths
"
)
pl_
.
xlabel
(
"
Lengths
"
)
pl_
.
ylabel
(
'
Number of Secondary extensions
'
)
pl_
.
show
(
block
=
True
)
# TODO FRANGI:WIDTH OF EXTENSIONS, CURVATURE EXTENSIONS
# TODO = Add all the info in a csv or pandas df
...
...
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