How to use the neuroglancer.AnnotationLayer function in neuroglancer

To help you get started, we’ve selected a few neuroglancer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / neuroglancer / python / neuroglancer / tool / agglomeration_split_tool.py View on Github external
def _set_viewer_seeds(s, seeds):
    for inclusive in [False, True]:
        layer_name = 'inclusive-seeds' if inclusive else 'exclusive-seeds'
        s.layers[layer_name] = neuroglancer.AnnotationLayer(
            annotation_color='green' if inclusive else 'red',
            annotations=[
                dict(
                    type='point',
                    id=x['id'],
                    point=x['position'],
                    description=str(x['supervoxel_id']),
                ) for x in seeds[inclusive]
            ],