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
Admin message
GitLab upgrade completed. Current version is 17.11.6.
Show more breadcrumbs
DEBREUVE Eric
NutriMorph
Commits
522209af
Commit
522209af
authored
5 years ago
by
NADAL Morgane
Browse files
Options
Downloads
Patches
Plain Diff
solved soma_volume/convex_hull_volume issue
parent
d3df13f8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
brick/processing/graph_feat_extraction.py
+7
-7
7 additions, 7 deletions
brick/processing/graph_feat_extraction.py
with
7 additions
and
7 deletions
brick/processing/graph_feat_extraction.py
+
7
−
7
View file @
522209af
...
@@ -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
...
...
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