api.common.data_handlers
compounds
download
download_all(space_id, parcellation_id, region_id=None, feature_id=None)
Create a download bundle (zip) for the provided specification
Parameters:
Name | Type | Description | Default |
---|---|---|---|
space_id |
str
|
lookup id of the space requested |
required |
parcellation_id |
str
|
lookup_id of the parcellation requested |
required |
region_id |
str
|
lookup_id of the region requested |
None
|
Returns:
Type | Description |
---|---|
str
|
Path to the zip file |
Source code in api/common/data_handlers/compounds/download.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
core
atlas
all_atlases()
Get all atlases
Returns:
Type | Description |
---|---|
List[Dict]
|
List of all serialized atlases. |
Source code in api/common/data_handlers/core/atlas.py
single_atlas(atlas_id)
Get a single atlas
Parameters:
Name | Type | Description | Default |
---|---|---|---|
atlas_id |
str
|
id of the atlas |
required |
Returns:
Type | Description |
---|---|
Dict
|
The atlas specified by the provided id, serialized into dict |
Source code in api/common/data_handlers/core/atlas.py
parcellation
all_parcellations()
Get all parcellations
Returns:
Type | Description |
---|---|
List of all serialized parcellations |
Source code in api/common/data_handlers/core/parcellation.py
single_parcellation(parc_id)
Get a single parcellation
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parc_id |
str
|
id of the parcellation |
required |
Returns:
Type | Description |
---|---|
The parcellation specified by the provided id, serialized into dict |
Source code in api/common/data_handlers/core/parcellation.py
region
all_regions(parcellation_id, find=None)
Get all regions, categorised under the parcellation specified by parcellation_id
, optionally filtered by find.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
id of the parcellation, under which regions will be fetched |
required |
find |
str
|
string to search for |
None
|
Returns:
Type | Description |
---|---|
List
|
List of all serialized regions |
Source code in api/common/data_handlers/core/region.py
single_region(parcellation_id, region_id, space_id=None)
Get a single region, categorised under parcellation specified by parcellation_id
, defined by region_id
.
If space_id optional parameter is supplied, additional information about the region in the space will also be returned.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
id of the parcellation, under which the regions will be fetched |
required |
region_id |
str
|
lookup id of the region |
required |
space_id |
str
|
additional information about the region in the provided space |
None
|
Returns:
Type | Description |
---|---|
The region, specified by the criteria, serialized. |
Source code in api/common/data_handlers/core/region.py
space
all_spaces()
Get all spaces
Returns:
Type | Description |
---|---|
List
|
List of all serialized spaces. |
Source code in api/common/data_handlers/core/space.py
single_space(space_id)
Get a single space
Parameters:
Name | Type | Description | Default |
---|---|---|---|
space_id |
str
|
lookup id of the space |
required |
Returns:
Type | Description |
---|---|
Dict
|
The space specified by the provided id, serialized into Dict |
Source code in api/common/data_handlers/core/space.py
volumes
parcellationmap
cache_region_statistic_map(parcellation_id, region_id, space_id)
Retrieve and save regional statistical map (if necessary), and then return the path of the map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
region_id |
str
|
lookup id of the region of the map |
required |
space_id |
str
|
lookup id of the space of the map |
required |
Returns:
Type | Description |
---|---|
Tuple[str, bool]
|
path to statistical map, if a cached file is returned |
Source code in api/common/data_handlers/volumes/parcellationmap.py
get_map(parcellation_id, space_id, maptype)
Get a map instance, based on specification
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
space_id |
str
|
lookup id of the space of the map |
required |
maptype |
Union[MapType, str]
|
maptype, either LABELLED or STATISTICAL |
required |
Returns:
Type | Description |
---|---|
Dict
|
Requested map instance, serialized into dict |
Raises:
Type | Description |
---|---|
AssertionError
|
if the supplied maptype is invalid type |
NotFound
|
Map with the specification not found |
Source code in api/common/data_handlers/volumes/parcellationmap.py
get_parcellation_labelled_map(parcellation_id, space_id, region_id=None)
Retrieve and save labelled map / regional mask (if necessary), and then return the path of the map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
region_id |
str
|
lookup id of the region of the map |
None
|
space_id |
str
|
lookup id of the space of the map |
required |
Returns:
Type | Description |
---|---|
path to labelled map/regional mask, if a cached file is returned |
Source code in api/common/data_handlers/volumes/parcellationmap.py
get_region_statistic_map(parcellation_id, region_id, space_id)
Retrieve and save regional statistical map (if necessary), and then return the path of the map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
region_id |
str
|
lookup id of the region of the map |
required |
space_id |
str
|
lookup id of the space of the map |
required |
Returns:
Type | Description |
---|---|
path to statistical map, if a cached file is returned |
Source code in api/common/data_handlers/volumes/parcellationmap.py
get_region_statistic_map_info(parcellation_id, region_id, space_id)
Retrieve and save regional statistical map (if necessary), and then return the path of the map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
region_id |
str
|
lookup id of the region of the map |
required |
space_id |
str
|
lookup id of the space of the map |
required |
Returns:
Type | Description |
---|---|
dict of min an max of the statistical map |
Source code in api/common/data_handlers/volumes/parcellationmap.py
get_resampled_map(parcellation_id, space_id)
Retrieve and save a labelled map, resampled in space (if necessary), and then return the path of the map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parcellation_id |
str
|
lookup id of the parcellation of the map |
required |
space_id |
str
|
lookup id of the target space of the sampled map |
required |
Returns:
Type | Description |
---|---|
path to statistical map, if a cached file is returned |