Mentions légales du service

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

Find roots - some corrections

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