コード例 #1
0
ファイル: stack.py プロジェクト: msayr/CATMAID
def stack_info(request: HttpRequest,
               project_id=None,
               stack_id=None) -> JsonResponse:
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """

    logger.debug(
        'janelia_render.stack.stack_info entry, project_id=%s, stack_id=%s, path=%s, queryParameters=%s'
        % (project_id, stack_id, request.path, request.GET))

    ps = JaneliaRenderProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i: 1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors,
                                     broken_slices)
    return JsonResponse(result,
                        safe=False,
                        json_dumps_params={
                            'sort_keys': True,
                            'indent': 4
                        })
コード例 #2
0
ファイル: stack.py プロジェクト: davidhildebrand/CATMAID
def stack_info(request, project_id=None, stack_id=None):
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """
    ps = FlyTEMProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i:1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors, broken_slices)
    return HttpResponse(json.dumps(result, sort_keys=True, indent=4), content_type="application/json")
コード例 #3
0
def stack_info(request, project_id=None, stack_id=None):
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """
    ps = DVIDProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i: 1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors,
                                     broken_slices)
    return HttpResponse(json.dumps(result, sort_keys=True, indent=4),
                        content_type="application/json")
コード例 #4
0
ファイル: stack.py プロジェクト: catmaid/CATMAID
def stack_info(request, project_id=None, stack_id=None):
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """
    ps = DVIDProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i:1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors, broken_slices)
    return JsonResponse(result, safe=False, json_dumps_params={
        'sort_keys': True,
        'indent': 4
    })
コード例 #5
0
ファイル: stack.py プロジェクト: yaokeepmoving/CATMAID
def stack_info(request, project_id=None, stack_id=None):
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """
    ps = DVIDProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i: 1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors,
                                     broken_slices)
    return JsonResponse(result,
                        safe=False,
                        json_dumps_params={
                            'sort_keys': True,
                            'indent': 4
                        })
コード例 #6
0
ファイル: stack.py プロジェクト: tomka/CATMAID
def stack_info(request, project_id=None, stack_id=None):
    """ Returns a dictionary with relevant information for stacks.
    Depending on the tile_source_type, get information from database
    or from tile server directly
    """

    logger.debug('janelia_render.stack.stack_info entry, project_id=%s, stack_id=%s, path=%s, queryParameters=%s' %
                 (project_id, stack_id, request.path, request.GET))

    ps = JaneliaRenderProjectStacks()
    stack = ps.get_stack(project_id, stack_id)
    project = ps.get_project(project_id)

    broken_slices = {i:1 for i in stack.broken_slices}

    result = get_stack_info_response(project, stack, ps, stack.mirrors, broken_slices)
    return JsonResponse(result, safe=False, json_dumps_params={
        'sort_keys': True,
        'indent': 4
    })