Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d5f543e7 authored by NADAL Morgane's avatar NADAL Morgane
Browse files

added extensions lengths hist

parent fd7eee67
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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