Git Product home page Git Product logo

Comments (2)

jbms avatar jbms commented on May 8, 2024

See this example for writing annotations:
https://github.com/google/neuroglancer/blob/master/python/examples/write_annotations.py

The neuroglancer.write_annotations module doesn't yet use the sharded format so it will create a lot of small files but should be fine as long as you don't have too many annotations.

If you want to associate annotations with segment ids, specify a relationship:

relationships: Sequence[str] = (),

And then use the specified relationship identifier as a keyword argument to add_point.

Finally, be sure to associate the relationship with the corresponding segmentation layer when you add the annotation layer to neuroglancer.

from neuroglancer.

liuyx599 avatar liuyx599 commented on May 8, 2024

I won't add annotations layer, instead of adding a skeleton layer, Because I have opened a server locally that is specifically used to store precomputed data, when I use Python to add a layer of neuroglancer, the source parameter is the location of my local precomputed data, rather than real-time paintung and rendering. I added the following skeleton layers under the vol of the segmentation layer above my codes. However, how should I write the skeleton's info file

swc_file= 'sample.swc'
raw_file = open(swc_file ,'r')
swc_text = raw_file.read()

skel = Skeleton.from_swc(swc_text)
skel.id = 1
vol.skeleton.upload(skel)

examples of my demo.swc:
the swc format

1 2 3 4 5 6 7
Sample number Structure Identifier x position y position z position radius parent sample
0 0 290.0 10.0 5.0 1.0 -1
1 0 10.0 290.0 3.0 1.0 -1
2 6 5.0 1110.0 5.0 1.0 -1
3 6 5.0 1110.0 6.0 1.0 -1
4 0 880.0 690.0 112.0 1.0 -1
5 0 867.0 1205.0 112.0 1.0 -1
6 0 668.0 1240.0 112.0 1.0 -1
7 6 10.0 90.0 109.0 1.0 -1
8 0 10.0 70.0 111.0 1.0 -1
9 0 10.0 70.0 113.0 1.0 -1
...

The file structure of the usr/home/demo directory is as follows
-4_4_40
-info
-skeletons
--1
when I tried add skeletons in neuroglancer, it reported usr/home/demo/skeletons/info resulted in HTTP error 404:Not found

from neuroglancer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.