You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will give you a dataframe where each row is an annotation, and columns show layer name, points locations, annotation type, annotation id, linked segmentations, tags, etc. If you are using tags, the `expand_tags=True` argument will create a column for every tag and assign a boolean value to the row based on whether the tag is present in the annotation.
51
51
Another option that is sometimes useful is `split_points=True`, which will create a separate column for each x, y, or z coordinate in the annotation.
52
+
Note that polyline annotations will come back with all points in the "point" field.
Copy file name to clipboardExpand all lines: docs/usage/statebuilder.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -374,7 +374,7 @@ Once you have a shader you want to use, you can set it with the `add_shader` met
374
374
375
375
### Annotation Layers
376
376
377
-
Annotation layers let a user define various types of annotations like points, lines, bounding boxes, and ellipses.
377
+
Annotation layers let a user define various types of annotations like points, lines, bounding boxes, ellipses, and polylines (a series of points, each connected to the next by lines).
378
378
Annotations can also be associated with segmentations, allowing you to filter annotations by the data that's being selected.
379
379
380
380
Annotation layers come in two types, **local** annotation layers that store their annotations directly in the Neuroglancer state and **cloud** annotation layers that get their annotations from a cloud-hosted source.
The simplest way to add annotations is through the `add_points`, `add_lines`, `add_boxes`, and `add_ellipses` methods.
394
+
The simplest way to add annotations is through the `add_points`, `add_lines`, `add_boxes`, `add_ellipses`, and `add_polylines` methods.
395
395
These methods work similarly, taking a dataframe where each row represents an annotation and the columns are specified by parameters.
396
396
397
397
For example, to add points to the annotation layer, you can do:
@@ -559,7 +559,7 @@ viewer_state.map(
559
559
This will replace the DataMap keys with the actual data and produce a Neuroglancer link with the specified sources.
560
560
Applying this across a list of data sources can easily generate a large collection of neuroglancer states.
561
561
562
-
The other principle use of DataMaps is to support annotation creation by replacing the `data` argument in the `add_points`, `add_lines`, `add_boxes`, and `add_ellipses` methods.
562
+
The other principle use of DataMaps is to support annotation creation by replacing the `data` argument in the `add_points`, `add_lines`, `add_boxes`, `add_ellipses`, and `add_polylines` methods.
563
563
For example, you can create a DataMap for the annotation data and then use it to add points to the annotation layer with the following pattern:
0 commit comments