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
72bdbce1
Commit
72bdbce1
authored
4 years ago
by
NADAL Morgane
Browse files
Options
Downloads
Patches
Plain Diff
Find roots - some corrections
parent
29d45155
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
brick/processing/graph_extraction.py
+6
-3
6 additions, 3 deletions
brick/processing/graph_extraction.py
brick/processing/plot.py
+1
-1
1 addition, 1 deletion
brick/processing/plot.py
nutrimorph.py
+0
-1
0 additions, 1 deletion
nutrimorph.py
with
7 additions
and
5 deletions
brick/processing/graph_extraction.py
+
6
−
3
View file @
72bdbce1
...
...
@@ -117,8 +117,9 @@ def FindGraphsRootWithEdges(somas: Tuple[soma_t,...], ext_skl_graph: skl_graph_t
# Search for the sites in the image of the soma extension
# edge_sites = set(zip(*edge_nfo.sites))
# for extension in soma.extensions: # In this case, intersections is never empty : we must take the
# contour sites of the soma, extended to the neighbor voxels
## In this case, intersections is never empty : we must take the
## contour sites of the soma, extended to the neighbor voxels
# for extension in soma.extensions:
# if extension.uid == ext_uid:
# soma_sites = set(zip(*extension.sites))
...
...
@@ -139,9 +140,11 @@ def FindGraphsRootWithEdges(somas: Tuple[soma_t,...], ext_skl_graph: skl_graph_t
# if the graph root sites are included in the soma extensions sites
if
len
(
intersections
)
>
0
:
# Keep the info of the root node
root_nodes
[
'
Ext.
'
+
str
(
ext_uid
[
0
])]
=
root_node
# By construction, only one root node possible for an ext
root_nodes
[
'
Ext.
'
+
str
(
ext_uid
[
0
])]
=
root_node
# By construction, only one root node possible for an ext
dict_root_nodes
[
"
Soma
"
+
str
(
soma
.
uid
)]
=
root_nodes
list_root_nodes
.
append
(
dict_root_nodes
)
print
(
dict_root_nodes
)
return
list_root_nodes
...
...
This diff is collapsed.
Click to expand it.
brick/processing/plot.py
+
1
−
1
View file @
72bdbce1
...
...
@@ -47,7 +47,7 @@ def MaximumIntensityProjectionZ(img: array_t, cmap: str ='tab20', axis: int = 0,
#
xy
=
np_
.
amax
(
img
,
axis
=
axis
)
pl_
.
imshow
(
xy
,
cmap
=
cmap
)
pl_
.
show
()
pl_
.
show
(
block
=
True
)
if
output_image_file_name
is
not
None
:
pl_
.
imsave
(
output_image_file_name
,
xy
,
cmap
=
cmap
)
print
(
'
Image saved in
'
,
output_image_file_name
)
...
...
This diff is collapsed.
Click to expand it.
nutrimorph.py
+
0
−
1
View file @
72bdbce1
...
...
@@ -386,7 +386,6 @@ print("\n--- Finding {ext+conn} graphs' root")
# ext_skl_graph = ge_.FindGraphsRootWithNodes(somas, ext_skl_graph)
list_root_nodes
=
ge_
.
FindGraphsRootWithEdges
(
somas
,
ext_skl_graph
,
ext_nfo
)
print
(
list_root_nodes
)
elapsed_time
=
tm_
.
gmtime
(
tm_
.
time
()
-
start_time
)
...
...
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