Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from os import chdir
import pandas as pd
from rich.progress import track
from allensdk.api.queries.svg_api import SvgApi
from allensdk.api.queries.image_download_api import ImageDownloadApi
from allensdk.api.queries.annotated_section_data_sets_api import (
AnnotatedSectionDataSetsApi,
)
from allensdk.api.queries.ontologies_api import OntologiesApi
from brainrender.Utils.webqueries import send_query
from brainrender.Utils.decorators import fail_on_no_connection
class ImageDownload(SvgApi, ImageDownloadApi):
"""
Handles query to the Allen ImageDownloadApi and saves the data
"""
mouse_coronal = "Mouse, P56, Coronal"
mouse_sagittal = "Mouse, P56, Sagittal"
mouse3d = "Mouse, Adult, 3D Coronal"
# useful tutorial: https://allensdk.readthedocs.io/en/latest/_static/examples/nb/image_download.html
@fail_on_no_connection
def __init__(self):
SvgApi.__init__(
self
) # https://github.com/AllenInstitute/AllenSDK/blob/master/allensdk/api/queries/svg_api.py
ImageDownloadApi.__init__(
self