medkit.core.attribute_container
medkit.core.attribute_container#
Classes:
|
Manage a list of attributes attached to an annotation. |
- class AttributeContainer(ann_id)[source]#
Manage a list of attributes attached to an annotation.
This behaves more or less like a list: calling len() and iterating are supported. Additional filtering is available through the get() method.
The attributes will be stored in a
Store, which can rely on a simple dict or something more complicated like a database.This global store may be initialized using :class:~medkit.core.GlobalStore. Otherwise, a default one (i.e. dict store) is used.
Methods:
add(attr)Attach an attribute to the annotation.
get(*[, label])Return a list of the attributes of the annotation, optionally filtering by label.