crowsetta.register_format#
- crowsetta.register_format(format_class: Type) Type[source]#
Decorator to register annotation formats.
Adds class to
crowsetta.formats. The decorator maps the class variablename, a string, to the class itself, so that callingcrowsetta.formats.by_name()with that string will return the class.- Parameters:
format_class (class) – A class that has the required class variables and adheres to one of the interfaces defined in
crowsetta.interface, eitherSeqLikeorBBoxLike.- Returns:
format_class – The same class, unchanged. This decorator only adds the class to
crowsetta.formats.FORMATS.- Return type:
class