siibra.core.assignment

Qualification between two BrainStructures

Attributes

T

Classes

AnatomicalAssignment

Represents a qualified assignment between anatomical structures.

Qualification

Create a collection of name/value pairs.

Module Contents

class siibra.core.assignment.AnatomicalAssignment
Inheritance diagram of siibra.core.assignment.AnatomicalAssignment

Represents a qualified assignment between anatomical structures.

__lt__(other: AnatomicalAssignment)
__str__()
invert()
assigned_structure: siibra.core.structure.BrainStructure
explanation: str = ''
property is_exact
qualification: Qualification
query_structure: siibra.core.structure.BrainStructure
class siibra.core.assignment.Qualification(*args, **kwds)
Inheritance diagram of siibra.core.assignment.Qualification

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

__lt__(other: Qualification)

This is used to sort feature query results. Since it is very difficult to determine a well-ordering principle and it is difficult to sort without one, the enum values are used for sorting. This means not all comparisons have logical basis but they are well-defined, making it reproducible but also clearly distinguishes important comparisons.

__repr__()
__str__()
invert()

Return qualification with the inverse meaning

static parse_relation_assessment(spec: Dict)
APPROXIMATE = 2
CONTAINED = 4
CONTAINS = 5
EXACT = 1
HOMOLOGOUS = 7
OTHER_VERSION = 3
OVERLAPS = 6
property verb

a string that can be used as a verb in a sentence for producing human-readable messages.

siibra.core.assignment.T