AnnotationInfo#

class brainglobe_atlasapi.atlas_generation.atlas_packaging_data.AnnotationInfo(name: str, version: str, use_existing: bool = False, update_existing: bool = False, existing_version: str | None = None, existing_stub: str | None = None, stub: str | None = None, metadata: dict = <factory>, *, root_dir: str = 'annotation-sets', file_name: str = 'annotation.ome.zarr', template: ~brainglobe_atlasapi.atlas_generation.atlas_packaging_data.TemplateInfo, terminology: ~brainglobe_atlasapi.atlas_generation.atlas_packaging_data.TerminologyInfo)[source]#

Bases: ComponentInfo

Container for the annotation component of a BrainGlobe atlas.

This dataclass holds information about an annotation component of a BrainGlobe atlas. It inherits from ComponentInfo and specifies the root directory and file name for annotation components.

Overrides the __post_init__ method to include template and terminology metadata in the annotation metadata.

template#

The TemplateInfo object associated with this annotation component.

Type:

TemplateInfo

terminology#

The TerminologyInfo object associated with this annotation component.

Type:

TerminologyInfo

root_dir#

The root directory for annotation components (default is descriptors.V2_ANNOTATION_ROOTDIR).

Type:

str, optional

file_name#

The name of the annotation component file (default is descriptors.V2_ANNOTATION_NAME).

Type:

str, optional

Methods

generate_metadata_dict()

Generate a dictionary containing metadata for this component.

Attributes

existing_stub

existing_version

file_name

root_dir

stub

update_existing

use_existing

template

terminology

name

version

metadata

generate_metadata_dict() Dict[str, str]#

Generate a dictionary containing metadata for this component.

The metadata dictionary includes the component’s name, version, and location stub.

Returns:

A dictionary containing the component metadata.

Return type:

Dict[str, str]