allensdk.api.queries.grid_data_api module¶
-
class
allensdk.api.queries.grid_data_api.
GridDataApi
(resolution=None, base_uri=None)[source]¶ Bases:
allensdk.api.queries.rma_api.RmaApi
HTTP Client for the Allen 3-D Expression Grid Data Service.
See: Downloading 3-D Expression Grid Data
-
DATA_MASK
= 'data_mask'¶
-
DENSITY
= 'density'¶
-
ENERGY
= 'energy'¶
-
INJECTION_DENSITY
= 'injection_density'¶
-
INJECTION_ENERGY
= 'injection_energy'¶
-
INJECTION_FRACTION
= 'injection_fraction'¶
-
INTENSITY
= 'intensity'¶
-
PROJECTION_DENSITY
= 'projection_density'¶
-
PROJECTION_ENERGY
= 'projection_energy'¶
-
download_alignment3d
(self, section_data_set_id, num_rows='all', count=False, **kwargs)[source]¶ Download the parameters of the 3D affine tranformation mapping this section data set’s image-space stack to CCF-space (or vice-versa).
Parameters: - section_data_set_id : int
download the parameters for this data set.
Returns: - dict :
parameters of this section data set’s alignment3d
-
download_deformation_field
(self, section_data_set_id, header_path=None, voxel_path=None, voxel_type='DeformationFieldVoxels', header_type='DeformationFieldHeader')[source]¶ Download the local alignment parameters for this dataset. This a 3D vector image (3 components) describing a deformable local mapping from CCF voxels to this section data set’s affine-aligned image stack.
Parameters: - section_data_set_id : int
Download the deformation field for this data set
- header_path : str, optional
If supplied, the deformation field header will be downloaded to this path.
- voxel_path : str, optiona
If supplied, the deformation field voxels will be downloaded to this path.
- voxel_type : str
WellKnownFileType of this dataset’s data file
- header_type : str
WellKnownFileType of this dataset’s header file
-
download_expression_grid_data
(self, section_data_set_id, include=None, path=None)[source]¶ Download in zipped metaimage format.
Parameters: - section_data_set_id : integer
What to download.
- include : list of strings, optional
Image volumes. ‘energy’ (default), ‘density’, ‘intensity’.
- path : string, optional
File name to save as.
Returns: - file : 3-D expression grid data packaged into a compressed archive file (.zip).
-
download_gene_expression_grid_data
(self, section_data_set_id, volume_type, path)[source]¶ Download a metaimage file containing registered gene expression grid data
Parameters: - section_data_set_id : int
Download data from this experiment
- volume_type : str
Download this type of data (options are GridDataApi.ENERGY, GridDataApi.DENSITY, GridDataApi.INTENSITY)
- path : str
Download to this path
-
download_projection_grid_data
(self, section_data_set_id, image=None, resolution=None, save_file_path=None)[source]¶ Download in NRRD format.
Parameters: - section_data_set_id : integer
What to download.
- image : list of strings, optional
Image volume. ‘projection_density’, ‘projection_energy’, ‘injection_fraction’, ‘injection_density’, ‘injection_energy’, ‘data_mask’.
- resolution : integer, optional
in microns. 10, 25, 50, or 100 (default).
- save_file_path : string, optional
File name to save as.
Notes
See Downloading 3-D Projection Grid Data for additional documentation.
-