api.models
This module is a collection of pydantic models, which siibra instances will serialize into.
This is a deliberate design decision, since this could provide the type hinting with the least amount of dependency.
Processes import from this module must not require siibra installed.
_commons
ConfigBaseModel
ConfigBaseModel
Source code in api/models/_commons.py
__init_subclass__(type=None)
On init subclass, configure _type accordingly.
The type should always following the following pattern:
Similar to MIME types This can allow clients to decide on which level of specificity to stop on parsing the data.
Additionally, fastapi response model type infer is not perfect.
e.g.
Fastapi will reduce the above will be reduced to B
.
To circumvent the problem, all super classes must start with _
.
Since we cannot directly control openminds, we ignore openminds types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type |
str
|
type of the new class |
None
|
Raises:
Type | Description |
---|---|
AssertionError
|
if a super class does not start with |
AssertionError
|
if a super class does not subclass ABC |
Source code in api/models/_commons.py
DataFrameModel
DataFrameModel
Source code in api/models/_commons.py
MapIndexModel
SeriesModel
_retrieval
datasets
EbrainsDatasetModel
EbrainsDatasetModel
Source code in api/models/_retrieval/datasets.py
EbrainsDsPerson
core
_concept
atlas
SiibraAtlasModel
parcellation
SiibraParcellationModel
SiibraParcellationModel
Source code in api/models/core/parcellation.py
SiibraParcellationVersionModel
SiibraParcellationVersionModel
Source code in api/models/core/parcellation.py
region
ParcellationEntityVersionModel
Qualification
Qualification
Exactly match to Qualification in siibra.core.relation_quantification.Quantification
Source code in api/models/core/region.py
space
CommonCoordinateSpaceModel
CommonCoordinateSpaceModel. Whilst the concept of a coordinate space does not necessitate the existence of an image, in practice, every coordinate space is associated with an image (either volumetric or , in the case of fsaverage, surface-based). The origin of the coordinate space is determined by the original data (e.g. affine header in NifTI). All spaces are in RAS neuroanatomical convention.
Source code in api/models/core/space.py
features
_basetypes
cortical_profiles
SiibraCorticalProfileModel
feature
FeatureModel
_FeatureModel
AbstractBaseModel
see api.models._commons.ConfigBaseModel
Source code in api/models/features/_basetypes/feature.py
regional_connectivity
SiibraRegionalConnectivityModel
SiibraRegionalConnectivityModel
Source code in api/models/features/_basetypes/regional_connectivity.py
tabular
SiibraTabularModel
_SiibraTabularModel
anchor
SiibraAnatomicalAssignmentModel
SiibraAnatomicalAssignmentModel
Source code in api/models/features/anchor.py
SiibraAnchorModel
SiibraAnchorModel
Source code in api/models/features/anchor.py
locations
boundingbox
BoundingBoxModel
BoundingBoxModel. Describes an axis aligned boundingbox. As a result, only the most left-posterior-inferior and most right-anterior-superior points are needed to define all eight vertices of the bounding box.
Source code in api/models/locations/boundingbox.py
location
LocationModel
_LocationModel
Location, as specified by space.[@id]. Unit of measurement is mm, unless specified otherwise.
Source code in api/models/locations/location.py
util
numpyarray
NpArrayDataModel
deprecated
NpArrayDataModel
Source code in api/models/util/numpyarray.py
volumes
parcellationmap
volume
MapType
VolumeModel
VolumeModel