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

Uploading skeletons fails with neuroglancer main or spelunker branch but works with seung-lab/neuromancer #643

Open
jboulanger91 opened this issue Nov 18, 2024 · 2 comments
Labels
question What is going on??? :thinking emoji:

Comments

@jboulanger91
Copy link

Hello,

I tried to upload skeletons to neuroglancer using the following function:
vol.skeleton.upload_raw(777, skel.vertices, skel.edges)
after creating a skeletons layer:

info_seg = CloudVolume.create_new_info(
	num_channels = 1, #this is critical 
	layer_type = 'segmentation', # 'image' or 'segmentation'
	data_type = 'uint32', # can pick any popular uint
	encoding = 'raw', # see: https://github.com/seung-lab/cloud-volume/wiki/Compression-Choices
	resolution = [ 8, 8, 30], # X,Y,Z values in nanometers
    skeletons = "skeletons",
	voxel_offset = [ 4096, 4096, 0 ], # values X,Y,Z values in voxels
	chunk_size = [ 64, 64, 64 ], # rechunk of image X,Y,Z in voxels
	volume_size = [ 40960-4096, 61440-4096, 4010], # X,Y,Z size in voxels
)

vol = CloudVolume('gs:///layers/skel_clem_test', info=info_seg)
vol.provenance.description = "test_upload_skel"
vol.provenance.owners = ['[email protected]'] # list of contact email addresses
vol.chunk_size
vol.commit_info() # generates gs://bucket/dataset/layer/info json file
vol.commit_provenance() # generates gs://bucket/dataset/layer/provenance json file
vol.skeleton.upload_raw(777, skel.vertices, skel.edges) 

Trying to load this layer into skelunker or the main neuroglancer branch results in an error 404.
Unless I'm wrong somewhere, it would be nice to be able to make it work with the newer branches.

Thanks a lot,
Jon

@jboulanger91
Copy link
Author

As a remark: uploding meshes works fine

@william-silversmith
Copy link
Contributor

Hi! Sorry for taking so long to get back to you. The problem is that Neuroglancer is looking for a skeleton info file.

You can fix that by doing this:

vol.skeleton.meta.info["vertex_attributes"].pop()
vol.skeleton.meta.commit_info()

The pop command on the first line is to remove a uint8 attribute that neuroglancer can't handle currently.

@william-silversmith william-silversmith added the question What is going on??? :thinking emoji: label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question What is going on??? :thinking emoji:
Projects
None yet
Development

No branches or pull requests

2 participants