diff --git a/api/server/volumes/parcellationmap.py b/api/server/volumes/parcellationmap.py index 4b284a9..78bb8ba 100644 --- a/api/server/volumes/parcellationmap.py +++ b/api/server/volumes/parcellationmap.py @@ -84,7 +84,7 @@ def get_parcellation_labelled_map(parcellation_id: str, space_id: str, region_id """) @version(*FASTAPI_VERSION) @router_decorator(ROLE, func=statistical_map_nii_gz) -def get_region_statistical_map(parcellation_id: str, space_id: str, region_id: str, extra_spec: str="", *, func): +def get_region_statistical_map(parcellation_id: str, region_id: str, space_id: str, extra_spec: str="", *, func): """Get statistical map according to specification""" if func is None: raise HTTPException(500, f"func: None passsed") @@ -94,7 +94,7 @@ def get_region_statistical_map(parcellation_id: str, space_id: str, region_id: s "content-disposition": f'attachment; filename="statistical_map.nii.gz"' } - full_filename, cache_flag = func(parcellation_id, region_id, space_id, extra_spec) + full_filename, cache_flag = func(parcellation_id=parcellation_id, region_id=region_id, space_id=space_id, extra_spec=extra_spec) if cache_flag: headers[cache_header] = "hit" assert os.path.isfile(full_filename), f"file saved incorrectly" @@ -107,12 +107,12 @@ class StatisticModelInfo(BaseModel): @router.get("/statistical_map.info.json", response_model=StatisticModelInfo, tags=TAGS) @version(*FASTAPI_VERSION) @router_decorator(ROLE, func=statistical_map_info_json) -def get_region_statistical_map_metadata(parcellation_id: str, space_id: str, region_id: str, extra_spec: str="", *, func): +def get_region_statistical_map_metadata(parcellation_id: str, region_id: str, space_id: str, extra_spec: str="", *, func): """Get metadata of statistical map according to specification""" if func is None: raise HTTPException(500, f"func: None passsed") - data = func(parcellation_id, region_id, space_id, extra_spec) + data = func(parcellation_id=parcellation_id, region_id=region_id, space_id=space_id, extra_spec=extra_spec) return StatisticModelInfo(**data) @router.get("/assign", response_model=DataFrameModel, tags=TAGS) diff --git a/new_api/v3/data_handlers/map/__init__.py b/new_api/v3/data_handlers/map/__init__.py index daa4c33..d8687a5 100644 --- a/new_api/v3/data_handlers/map/__init__.py +++ b/new_api/v3/data_handlers/map/__init__.py @@ -56,12 +56,12 @@ def get_map(parcellation_id: str, space_id: str, maptype: Union[MapType, str], e return instance_to_model(returned_maps[0], detail=True).dict() @data_decorator(ROLE) -def statistical_map_nii_gz(parcellation_id: str, space_id: str, region_id: str, extra_spec: str="", *, no_cache: bool=False): +def statistical_map_nii_gz(parcellation_id: str, region_id: str, space_id: str, extra_spec: str="", *, no_cache: bool=False): filename, return_cached, warningtext = cache_region_statistic_map(parcellation_id, region_id, space_id, extra_spec, no_cache=no_cache) return filename, return_cached @data_decorator(ROLE) -def statistical_map_info_json(parcellation_id: str, space_id: str, region_id: str, extra_spec: str="", *, no_cache: bool=False): +def statistical_map_info_json(parcellation_id: str, region_id: str, space_id: str, extra_spec: str="", *, no_cache: bool=False): filename, return_cached, warningtext = cache_region_statistic_map(parcellation_id, region_id, space_id, extra_spec, no_cache=no_cache) import nibabel as nib