Graph disconnecting at 4-edge vertices

16 views
Skip to first unread message

AR

unread,
Jan 29, 2023, 9:56:50 AM1/29/23
to networkx-discuss
Hi all, 

When I convert a tiff skeletonization to a networkx graph, the graph disconnects nodes that have 4 edges coming out of them. I don't want it to do this. Does anybody know why this happens and how to fix it? Attached is a pdf for visualization of the issue. 

Thank you for any input you may have.
Example.pdf

Nicolas Cadieux

unread,
Jan 29, 2023, 6:05:07 PM1/29/23
to networkx...@googlegroups.com
Hi,
I’am not sure what software you are using to vectorize your tiff but these are two very different types of data.  One way could be to apply a filter to the tiff.  Perhaps a smoothing filter found in a software like Gimp could help?  Your best bet is to use a software to find bugs in the output vector lines.  I created a QGIS model to find those problems.  This vidéo should help you figure this out. QGIS also has raster to vector conversions that may be better.

https://youtu.be/v61PafSByvM


Le 29 janv. 2023 à 09:56, AR <radja...@gmail.com> a écrit :

Hi all, 

When I convert a tiff skeletonization to a networkx graph, the graph disconnects nodes that have 4 edges coming out of them. I don't want it to do this. Does anybody know why this happens and how to fix it? Attached is a pdf for visualization of the issue. 

Thank you for any input you may have.

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/networkx-discuss/53c215cf-8a3f-4c76-8b41-30c78e6c3df2n%40googlegroups.com.
<Example.pdf>

AR

unread,
Jan 31, 2023, 1:55:05 PM1/31/23
to networkx-discuss
I spent a bit more time with the issue, and found that the problem was actually what you say - with the conversion to tif, not with the networkx creation of graphs. Our package was defining junctions inconsistently, however, we've found that using FIJI does not product the same issue. Thank you for the reply and the recommendation to use gimp. I will look into it. 
Reply all
Reply to author
Forward
0 new messages