Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to update the mechanism to identified centrelines that connected centrelines nodes. #97

Open
napakalas opened this issue Oct 14, 2024 · 7 comments

Comments

@napakalas
Copy link
Contributor

In most case,

# Now see if unconnected centreline end nodes in the route graph are in fact connected
# by a centreline
new_edge_dicts = {}
for node_0, node_1 in itertools.combinations(route_graph.nodes, 2):
if (not route_graph.has_edge(node_0, node_1)
and (edge_dicts := self.__centreline_graph.get_edge_data(node_0, node_1)) is not None):
if len(edge_dicts) > 1:
log.warning(f'{path.id}: Multiple centrelines between {node_0} and {node_1}')
new_edge_dicts[(node_0, node_1)] = edge_dicts[list(edge_dicts)[0]]
for edge, edge_dict in new_edge_dicts.items():
route_graph.add_edge(*edge, **edge_dict)
path_node_ids.update(node.feature_id for node in edge_dict['network-nodes'])

is effective in identifying and adding needed centrelines. However, in some cases, such as bromo-1, it adds unnecessary centrelines.

As shown in this image, there unnecessary added centrelines are across sympathetic chain.
Screenshot 2024-10-15 at 10 09 12 AM

@dbrnz
Copy link
Collaborator

dbrnz commented Oct 14, 2024

The attached screen shot doesn't indicate the centrelines -- please use the Show centrelines? option of the NERVES control in the viewer to add an image with centrelines.

@napakalas
Copy link
Contributor Author

Here is the screen shot with the centrelines indication. Note that the unnecessary centrelines are those with blue cross.
Screenshot 2024-10-15 at 11 16 57 AM

@dbrnz
Copy link
Collaborator

dbrnz commented Oct 14, 2024

What general role do those centrelines with the blue cross play? Are they needed for some particular neuron paths? What happens if they are removed??

Someone (Naz?) added them, but why only T1-T2-T3-T4-T5-T6 and T12-T13-L1 (this last two don't have associated paths) and not for the intervening segments?

A simple test would be to remove them (all that's needed is to take them out of the networks block of properties.json; there's no need to edit the SVG) and see what happens.

@napakalas
Copy link
Contributor Author

I will check it as suggested and see if any other paths are affected or not if this centreline are removed from properties.json.

@napakalas
Copy link
Contributor Author

I confirm that removing centrelines S46_T1 - S46_T2 - S46_T3 - S46_T4 - S46_T5 - S46_T6 in flatmap source solves this issue.

@dbrnz
Copy link
Collaborator

dbrnz commented Oct 15, 2024

For consistency, shouldn't the T12-T13-L1 ones also be removed?

@napakalas
Copy link
Contributor Author

napakalas commented Oct 15, 2024

I have checked and removed them. I also removed the other similar centrelines up to S2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants