-
Notifications
You must be signed in to change notification settings - Fork 47
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
Skeleton.from_swc breaks with KeyError parent value 0 #575
Comments
Hi m! Sorry, I was on vacation for a few weeks. I'll take a look into this soon. |
Hi m, I was trying to follow this specification.
In the file you provided, does 0 refer to an origin? Unless this is a common thing to do, I would think these files are corrupt. What software generated them? As for point 2, I might be outdated, but I'm not familiar with a Can you help me understand how it is used and where it comes from? |
Hi Will, Welcome back and I hope you had a good vacation!!
I believe 0 does refer to an origin. Unfortunately, it seems to be the originating files are in a different format (.eswc) and could have been from scripts generating this format. I suppose I could handle these 0 values to -1 while converting the format into .swc to circumvent the errors.
Hmm.... I thought I was using remnants from other versions but seems to be an error after taking out
|
Hi m! Thank you! I think if you can adjust the conversion script that would be best, but then again, I've never heard of I'm not totally sure, but I think that error means you have the Will |
https://www.nature.com/articles/sdata2017207#MOESM122
Interesting, that reminds me the way how I created a skeleton's info file. I restructure attributes from the main directory's info schema since CloudVolume requires info to be passed in. I'd have to think that the main directory's info template has changed since the older version I used. This works.
|
Interesting. It looks like the 0 corresponds to the eswc format, but now to swc. The SWC format is defined in this paper: https://www.sciencedirect.com/science/article/pii/S0165027098000910 It looks like eswc is used in this field. If there's more demand for its support, I'll consider it, but I'd like to keep things to a tighter scope if possible. As for the example above, I'm surprised that you need to add and delete the scales attribute. The simple assignment operator for the info shouldn't be triggering any additional behavior. |
Might be related to this topic. CloudVolume offers a feature to save skeletons. However, if the target datasource url only contains precomputed skeletons with an Is there a way to get around these errors asking for valid
|
Oh yea, the entire system is designed around the images. You need to have a valid image info in the directory above the skeletons. We can maybe change that, but for now you just need to make a fake info. |
Do you know if the vertex_type will get lost during the conversion from a swc to a precomputed format? This part of the information seems to be empty when I try to download a skeleton.
|
Hi m, Can you provide some sample data? I tried |
Hi Will, I can provide info files I'm using for precomputed dataset. My doubts are in the construction of info files for both the skeleton and the fake one for the image. Not sure why I get the error on the vertex_type. Converted file displayed ok on the Neuroglancer viewer. The code I tried to run is what I modified from the Neuroglancer's tool package which I specifically modified for saving skeletons. Usage:
[skeleton info] [fake image info]
And the stack trace of the error:
|
This is the code I use to convert swc to precomputed format.
|
Hi m, At a glance, the problem seems to be that vertex_types is not included in the vertex_attributes list.
|
Hi Will, Thank you for pointing out the missing fragment. I also noticed by commenting out this section of the code during format conversion and updated the generated precomputed file (.gz), the code seems to work ok. Not sure why I had this fragment but this part seems to have caused the issue.
Thank you for your help! |
That fragment is there b/c Neuroglancer won't display skeletons with a
floating point attribute so I strip them out for neuroglancer facing jobs.
…On Wed, Apr 19, 2023 at 2:25 PM manoaman ***@***.***> wrote:
Hi Will,
Thank you for pointing out the missing fragment. I also noticed by
commenting out this section of the code during format conversion and
updated the generated precomputed file (.gz), the code seems to work ok.
Not sure why I had this fragment but this part seems to have caused the
issue.
# remove
# skel.extra_attributes = [
# attr for attr in skel.extra_attributes
# if attr['data_type'] in ('float32', 'float64')
# ]
Thank you for your help!
—
Reply to this email directly, view it on GitHub
<#575 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATGQSPFOASOS6DG74JJ2O3XCAU2BANCNFSM6AAAAAAUQ4V2YU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It looks like |
yes
…On Wed, Apr 19, 2023, 3:13 PM manoaman ***@***.***> wrote:
It looks like {'id': 'vertex_types', 'data_type': 'uint8',
'num_components': 1} get removed from skel.extra_attributes. Should I
allow uint8?
—
Reply to this email directly, view it on GitHub
<#575 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATGQSJ2AZIF3WWIULA3G3DXCA2PJANCNFSM6AAAAAAUQ4V2YU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Will, So by setting and keeping uint8 vertex_types attribute in the
However, on the Neuroglancer side, this attribute prevents from viewing. Is there another way to configure this vertex_types? |
Hi m,
Unfortunately, not at this time. We'll need to fix Neuroglancer. You can
make two copies of the data to preserve the attribute and also make it
Neuroglancer viewable.
I did do some experiments with Neuroglancer a while back but didn't test
them. You can try this old branch:
https://github.com/william-silversmith/neuroglancer/tree/wms_int_skel
Will
…On Mon, Apr 24, 2023 at 6:02 PM manoaman ***@***.***> wrote:
Hi Will,
So by setting and keeping uint8 vertex_types attribute in the
skel.extra_attributes, I was able to save a skeleton with CloudVolume.
[{'id': 'radius', 'data_type': 'float32', 'num_components': 1}, {'id': 'vertex_types', 'data_type': 'uint8', 'num_components': 1}]
However, on the Neuroglancer side, this attribute prevents from viewing.
Is there another way to configure this vertex_types?
[image: Screenshot 2023-04-24 at 2 54 13 PM]
<https://user-images.githubusercontent.com/47464840/234125194-4bc91928-b583-463a-93ad-84bb576170e3.png>
—
Reply to this email directly, view it on GitHub
<#575 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATGQSKYMLSVFZF3ZHAKCXLXC32AZANCNFSM6AAAAAAUQ4V2YU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi,
I've recently updated CloudVolume (8.18.1) and realized a couple of things broke while converting to precomputed format.
Changed this line to avoid the the error.
Sample data:
In other cases, parent value takes -1 and they convert ok. Would it be possible to allow 0 parent value in swc files?
Has the "scales" definition changed lately? It seems I need to change the value in an array of dict type now. Do you have an latest example of the placeholder I can use for skeleton?
Thank you,
-m
The text was updated successfully, but these errors were encountered: