-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds 3 schemas for bound spatial points: boolean tag; boolean tag with valid reference id; string tag with valid reference id. Related to Vortex myelin annotations
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import marshmallow as mm | ||
from emannotationschemas.schemas.base import AnnotationSchema, BoundSpatialPoint, NumericField | ||
from emannotationschemas.schemas.bound_text_tag import BoundTagAnnotation | ||
|
||
class BoundBoolAnnotation(AnnotationSchema): | ||
pt = mm.fields.Nested( | ||
BoundSpatialPoint, | ||
required=True, | ||
description="Location associated with the tag" | ||
) | ||
tag = mm.fields.Bool(required=True, description="Boolean at location") | ||
|
||
class BoundBoolWithValid(BoundBoolAnnotation): | ||
valid_id = NumericField( | ||
required=True, | ||
description="Root id of the object when location was assessed. If the pt_root_id has changed, the associated segment has undergone proofreading.", | ||
) | ||
|
||
class BoundTagWithValid(BoundTagAnnotation): | ||
valid_id = NumericField( | ||
required=True, | ||
description="Root id of the object when location was assessed. If the pt_root_id has changed, the associated segment has undergone proofreading.", | ||
) |