siibra.features.feature

Handles multimodal data features and related queries.

Module Contents

Classes

CompoundFeature

A compound aggregating mutliple features of the same type, forming its

Compoundable

Base class for structures which allow compounding.

Feature

Base class for anatomically anchored data features.

Attributes

TypeDataset

exception siibra.features.feature.EncodeLiveQueryIdException
Inheritance diagram of siibra.features.feature.EncodeLiveQueryIdException

Common base class for all non-exit exceptions.

exception siibra.features.feature.NotFoundException
Inheritance diagram of siibra.features.feature.NotFoundException

Common base class for all non-exit exceptions.

exception siibra.features.feature.ParseCompoundFeatureIdException
Inheritance diagram of siibra.features.feature.ParseCompoundFeatureIdException

Common base class for all non-exit exceptions.

exception siibra.features.feature.ParseLiveQueryIdException
Inheritance diagram of siibra.features.feature.ParseLiveQueryIdException

Common base class for all non-exit exceptions.

class siibra.features.feature.CompoundFeature(elements: List[Feature], queryconcept: siibra.core.region.Region | siibra.core.parcellation.Parcellation | siibra.core.space.Space)
Inheritance diagram of siibra.features.feature.CompoundFeature

A compound aggregating mutliple features of the same type, forming its elements. The anatomical anchors and data of the features is merged. Features need to subclass “Compoundable” to allow aggregation into a compound feature.

property elements

Features that make up the compound feature.

property feature_type: Type

Feature type of the elements forming the CompoundFeature.

property id: str
property indexing_attributes: Tuple[str]

The attributes determining the index of this CompoundFeature’s elements.

property indices

Unique indices to features making up the CompoundFeature.

property name: str

Returns a short human-readable name of this feature.

__dir__()

Default dir() implementation.

__getattr__(attr: str) Any

Expose compounding attributes explicitly.

__getitem__(index: Any)

Get the nth element in the compound.

__iter__() Iterator[Feature]

Iterate over subfeatures

__len__()

Number of subfeatures making the CompoundFeature

get_element(index: Any)

Get the element with its unique index in the compound.

abstract plot(*args, **kwargs)

Feature subclasses override this with their customized plot methods.

class siibra.features.feature.Compoundable
Inheritance diagram of siibra.features.feature.Compoundable

Base class for structures which allow compounding. Determines the necessary grouping and compounding attributes.

property filter_attributes: Dict[str, Any]

Attributes that help distinguish or combine features of the same type among others.

classmethod __init_subclass__(**kwargs)
class siibra.features.feature.Feature(modality: str, description: str, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: List[TypeDataset] = [])

Base class for anatomically anchored data features.

property LICENSE: str
property anchor
property authors
property description

Allows subclasses to overwrite the description with a function call.

property id
property last_match_description

The description of the last anchor comparison to a BrainStructure.

property last_match_result

The result of the last anchor comparison to a BrainStructure.

property modality
property name

Returns a short human-readable name of this feature.

property urls: List[str]

The list of URLs (including DOIs) associated with this feature.

category: str
classmethod __init_subclass__(configuration_folder=None, category=None, do_not_index=False, **kwargs)
matches(concept: siibra.core.structure.BrainStructure, restrict_space: bool = False) bool

Match the features anatomical anchor agains the given query concept. Record the most recently matched concept for inspection by the caller.

abstract plot(*args, **kwargs)

Feature subclasses override this with their customized plot methods.

to_zip(filelike: str | BinaryIO)

Export as a zip archive.

Parameters:

filelike (str or path) – Filelike to write the zip file. User is responsible to ensure the correct extension (.zip) is set.

siibra.features.feature.TypeDataset