Open liorgolgher opened 4 years ago
Hi Lior, my code has been only tested with NetworkX==2.2 My guess is that all errors are generated due to the wrong versions used! Try to downgrade to the 2.2 version on the other two servers without changing the code, and update me with the output. Best, Rafat
Thank you for your prompt, helpful reply!
With networkx set to 2.2, pos keys are now ['id', 'x', 'y', 'shape', 'pos', 'r']
, resolving issue 2 for my macOS. VascularGraph now works on my mac, both with the demo dataset and with my own datasets (two datasets tested as yet).
On our university's Power cluster I still get the same error in line 62 of GenerateGraph, as pasted in my previous message. I have tried to resolve it by generating a new conda environment and by cloning an existing conda environment, both with networkx=2.2, to no avail.
On another server I've been experiencing a libGL rendering error, but it likely has to do with their old video card and has nothing to do with VascularGraph itself.
I'll open a separate issue or email about the key challenge we're facing: How to apply the same 3D skeletonization on 4D datasets (3D+time) where the volume of each vascular segment varies over time.
Thanks a lot! Lior
Oh! I noticed 'z' key missing, did you try to skeletonize a 2D binary image?
Nope, I've fed it with a 3D binary array.
Here's the input dataset: https://drive.google.com/file/d/1_cXvGihvoWZue9JEWJYgaE6MoDAyjG11/view?usp=sharing
and here's a snapshot of its successful skeletonization on my mac: https://drive.google.com/file/d/1x8SF1dw6P_dFtlQOccJZZFwQW7sWj0G_/view?usp=sharing
Can you print the keys for node 0 of the final graph: print(g.node[0])
Regrettably I've missed the following messages:
No radii assigned to graph nodes!
No types assigned to graph nodes!
No branch labels assigned to graph nodes!
>>> objc[64859]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa7d013d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x1a340f0f50). One of the two will be used. Which one is undefined.
libpng warning: iCCP: known incorrect sRGB profile
Accordingly, when I asked it to print the keys for node 0 I got the following response:
>>> print(g.node[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'g' is not defined
Sorry! I meant to print it for your final graph generated after refinement, in the demo.py: print(gr.node[0])
>>> print(gr.node[0])
{'pos': array([ 3.08453024, 185.08351638, 19.99315261]), 'r': 1.7320508075688772}
It seems that everything is ok! 'pos' key has three elements for x, y and z coordinates.
Is the problem resolved on your university's Power cluster, or you still get an error in line 62 in GenerateGraph
?
The line62 error persists on our Power cluster. I can use my mac in the meantime thanks to your help.
hi, @Damseh ,
This is a nice work.
Can this framework extract the graph from a 2D binary array?
Hi @ZDstandup,
Yes it can! The trick is to augment your 2D mask into a 3D mask with 3 or more slices (each slice would be a copy of your 2D mask).
Hi Rafat,
I hope this issue finds you well (:
The demo you provided works smoothly on one of our servers, both with the default dataset and with one of our datasets. When trying to run the very same code on two other servers, I've got some odd errors:
AttributeError: 'Graph' object has no attribute 'node'
. Seemingly node is deprecated in networkx 2.4 and should be replaced withnodes
.node
instances withnodes
in GenerateGraph, BaseGraph, RefineGraph, ContractGraph and ReadPajek has left me with the following key error on one server:Printing the keys of pos just before this error yielded
['id', 'x', 'y', 'shape']
.Can you please suggest how should I resolve this issue? Unfortunately the server that runs VascularGraph properly is slow and unstable ):
Thanks a lot! Lior