Comments (2)
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:
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.
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)
- How to use the segment_split_merge_tool
- Expose `bind_port` in python server arguments HOT 1
- Zstandard support? HOT 1
- Support for datasets in authenticated S3-compatible private buckets HOT 6
- N5 now supports Zstandard HOT 2
- "StarredSegments" object has no attribute "_visible" on release 2.37
- Consider using SolidJS HOT 1
- Use FinalizationRegistry to manage inter-worker object mappings without reference counting
- undock layer side panel HOT 1
- Set matrix transform for ImageLayer via Python HOT 2
- Hiding yellow border for images? HOT 3
- neuroglancer default framebuffer size artificially limits resolution HOT 7
- MAX_DRAW_BUFFERS limit error with shader in Safari
- Spatial dimensions, xy, is rendering in the 'zy' plane instead of the 'xy' plane when using the zarr format HOT 3
- Annotation coloring by random seed
- Loading of precomputed data stalls HOT 2
- Import annotation from csv feature, is it still available? HOT 5
- precomputed annotation format related ID lookup HOT 2
- WebXR support
- feature request: change default shader for multi-channel images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neuroglancer.