Mentions légales du service

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

solved soma_volume/convex_hull_volume issue

parent d3df13f8
No related branches found
No related tags found
No related merge requests found
...@@ -282,7 +282,7 @@ def ExtractFeaturesInDF(name_file, somas, size_voxel_in_micron: list, bins_lengt ...@@ -282,7 +282,7 @@ def ExtractFeaturesInDF(name_file, somas, size_voxel_in_micron: list, bins_lengt
# Axes of the best fitting ellipsoid # Axes of the best fitting ellipsoid
# a > b > c # a > b > c
_, _, soma.axes_ellipsoid, _, spherical_coor, _, volume_convex_hull = bf_.FindBestFittingEllipsoid3D(soma) _, _, soma.axes_ellipsoid, _, spherical_coor,_, volume_convex_hull = bf_.FindBestFittingEllipsoid3D(soma)
# This ratios give info about the shape of the soma. ex: rather flat, rather patatoide, rather spherical... # This ratios give info about the shape of the soma. ex: rather flat, rather patatoide, rather spherical...
Coef_axes_ellips_b__a = soma.axes_ellipsoid[0] / soma.axes_ellipsoid[2] Coef_axes_ellips_b__a = soma.axes_ellipsoid[0] / soma.axes_ellipsoid[2]
...@@ -292,15 +292,15 @@ def ExtractFeaturesInDF(name_file, somas, size_voxel_in_micron: list, bins_lengt ...@@ -292,15 +292,15 @@ def ExtractFeaturesInDF(name_file, somas, size_voxel_in_micron: list, bins_lengt
spherical_angles_eva = (spherical_coor[0][1], spherical_coor[0][2]) spherical_angles_eva = (spherical_coor[0][1], spherical_coor[0][2])
spherical_angles_evb = (spherical_coor[1][1], spherical_coor[1][2]) spherical_angles_evb = (spherical_coor[1][1], spherical_coor[1][2])
# Volume of the soma # Volume of the in micron**3
soma.volume_soma_micron = in_.ToMicron(len(soma.sites[0]), size_voxel_in_micron, dimension=(0, 1, 2), decimals=3) soma.volume_soma_micron = in_.ToMicron(len(soma.sites[0]), size_voxel_in_micron, dimension=(0, 1, 2), decimals=2)
# Calculates volume of soma's convex hull # Calculates volume of soma's convex hull in voxel volume
volume_convex_hull = in_.ToMicron(volume_convex_hull, size_voxel_in_micron, dimension=(0, 1, 2)) # Take into account anisotropy of the 3D space ( volume = x * y * z with z > x=y)
volume_convex_hull = volume_convex_hull * size_voxel_in_micron[2] / size_voxel_in_micron[0]
# Volume of the soma / Volume of its convex hull gives the info about the convexity of the soma # Volume of the soma / Volume of its convex hull gives the info about the convexity of the soma
# If close to 0, the soma has a lot of invaginations, if close to 1, it is smooth and convex # If close to 0, the soma has a lot of invaginations, if close to 1, it is smooth and convex
Coef_V_soma__V_convex_hull = soma.volume_soma_micron / volume_convex_hull Coef_V_soma__V_convex_hull = len(soma.sites[0]) / round(volume_convex_hull + 0.5)
# TODO Solve issue V_soma > V_convexHull
# -- Extension features # -- Extension features
# Graph features # Graph features
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment