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
space
CommonCoordinateSpaceModel
CommonCoordinateSpaceModel
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
Source code in api/models/locations/boundingbox.py
location
util
numpyarray
NpArrayDataModel
deprecated
NpArrayDataModel
Source code in api/models/util/numpyarray.py
volumes
parcellationmap
volume
MapType
VolumeModel
VolumeModel