diff --git a/docs/releases/v2.8.0.md b/docs/releases/v2.8.0.md index 624d1c9052eaa3ac69dae0232c9b0a55793ebf79..1fdbdaa601ee068feeb71c4c22ba757b8c865813 100644 --- a/docs/releases/v2.8.0.md +++ b/docs/releases/v2.8.0.md @@ -2,4 +2,4 @@ ## Features -- More detailed filter for connectivity \ No newline at end of file +- More detailed filter for connectivity diff --git a/mkdocs.yml b/mkdocs.yml index 5372b5da4bf778115d93f5ac54c3894ab8141b15..a0e078dcf75975c2a310b01c52b83b97f8c51865 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,6 +33,7 @@ nav: - Fetching datasets: 'advanced/datasets.md' - Display non-atlas volumes: 'advanced/otherVolumes.md' - Release notes: + - v2.8.0: 'releases/v2.8.0.md' - v2.7.5: 'releases/v2.7.5.md' - v2.7.4: 'releases/v2.7.4.md' - v2.7.3: 'releases/v2.7.3.md' diff --git a/package.json b/package.json index 64e82a9d397bf02c29c67f449ffd8467b89b1f2d..c49921ea3549b1d970d085afc9ba77ce14edd1a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interactive-viewer", - "version": "2.7.5", + "version": "2.8.0", "description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular", "scripts": { "lint": "eslint src --ext .ts", @@ -11,7 +11,7 @@ "watch": "ng build --watch --configuration development", "test": "ng test", "test-ci": "ng test --progress false --watch false --browsers=ChromeHeadless", - "sapi-schema": "npx openapi-typescript@5.1.1 http://localhost:5000/v1_0/openapi.json --output ./src/atlasComponents/sapi/schema.ts && eslint ./src/atlasComponents/sapi/schema.ts --no-ignore --fix", + "sapi-schema": "npx openapi-typescript@5.1.1 https://siibra-api-stable.apps.hbp.eu/v2_0/openapi.json --output ./src/atlasComponents/sapi/schema.ts && eslint ./src/atlasComponents/sapi/schema.ts --no-ignore --fix", "api-schema": "node src/plugin/generateTypes.js", "docs:json": "compodoc -p ./tsconfig.json -e json -d .", "storybook": "npm run docs:json && start-storybook -p 6006", diff --git a/spec/test.ts b/spec/test.ts index ee2ab839afae3fb985b4f0f975831fb99d9b2b6d..80d1734967ea74cc1e958106ad307ca4cc939f0f 100644 --- a/spec/test.ts +++ b/spec/test.ts @@ -14,7 +14,7 @@ import { getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: false }}, + { teardown: { destroyAfterEach: true }}, ) declare const require: any diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index ef3dc46e1e4dd37e1b50206f5b070bc562a270e5..8ca9e7af7ccaa63a609ed39e6209435b09235973 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -25,7 +25,7 @@ import { SAPIFeature } from "./features"; import { environment } from "src/environments/environment" export const SIIBRA_API_VERSION_HEADER_KEY='x-siibra-api-version' -export const SIIBRA_API_VERSION = '0.2.2' +export const SIIBRA_API_VERSION = '0.2.3' type RegistryType = SAPIAtlas | SAPISpace | SAPIParcellation diff --git a/src/atlasComponents/sapi/schema.ts b/src/atlasComponents/sapi/schema.ts index a54de84decb2dbb61346f6fc6182706d4542213c..49f3d1b3f257f321dd8704cf10ae93c55ee9e1e5 100644 --- a/src/atlasComponents/sapi/schema.ts +++ b/src/atlasComponents/sapi/schema.ts @@ -13,7 +13,7 @@ export interface paths { get: operations["get_all_regional_features_for_region_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__features_get"] } "/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_id}/features/{feature_id}": { - /** Returns a feature for a region, as defined by by the modality and feature ID */ + /** Returns a feature for a region, as defined by the modality and feature ID */ get: operations["get_single_detailed_regional_feature_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__features__feature_id__get"] } "/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_id}/regional_map/info": { @@ -27,6 +27,9 @@ export interface paths { "/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_id}/volumes": { get: operations["get_regional_volumes_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__volumes_get"] } + "/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_id}/volumes/{volume_id}": { + get: operations["get_regional_volumes_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__volumes__volume_id__get"] + } "/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_id}": { get: operations["get_single_region_detail_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__get"] } @@ -218,7 +221,21 @@ export interface components { /** @Type */ "@type": string /** Name */ - name: string + name?: string + /** Description */ + description?: string + /** Citation */ + citation?: string + /** Authors */ + authors?: string[] + /** Cohort */ + cohort?: string + /** Subject */ + subject?: string + /** Filename */ + filename?: string + /** Dataset Id */ + dataset_id?: string /** Parcellations */ parcellations: { [key: string]: string }[] matrix?: components["schemas"]["NpArrayDataModel"] @@ -1439,7 +1456,7 @@ export interface operations { } } } - /** Returns a feature for a region, as defined by by the modality and feature ID */ + /** Returns a feature for a region, as defined by the modality and feature ID */ get_single_detailed_regional_feature_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__features__feature_id__get: { parameters: { path: { @@ -1556,6 +1573,30 @@ export interface operations { } } } + get_regional_volumes_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__volumes__volume_id__get: { + parameters: { + path: { + atlas_id: string + parcellation_id: string + region_id: string + volume_id: string + } + } + responses: { + /** Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["VolumeModel"] + } + } + /** Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"] + } + } + } + } get_single_region_detail_atlases__atlas_id__parcellations__parcellation_id__regions__region_id__get: { parameters: { path: { @@ -1819,6 +1860,7 @@ export interface operations { } query: { parcellation_id?: string + type?: string region?: string bbox?: string } diff --git a/src/atlasComponents/sapiViews/features/connectivity/connectivityBrowser/connectivityBrowser.component.ts b/src/atlasComponents/sapiViews/features/connectivity/connectivityBrowser/connectivityBrowser.component.ts index 9e1f41b3582da4d177d25398f557c8f856814654..850d763b82a330e69d402ae769b4956c3c1ee57a 100644 --- a/src/atlasComponents/sapiViews/features/connectivity/connectivityBrowser/connectivityBrowser.component.ts +++ b/src/atlasComponents/sapiViews/features/connectivity/connectivityBrowser/connectivityBrowser.component.ts @@ -66,7 +66,7 @@ export class ConnectivityBrowserComponent implements AfterViewInit, OnDestroy { public selectedSubjectIndex: number public selectedSubjectsDatasets: string[] public selectedSubjectDatasetIndex: number - public fetchedItems: ConnectivityFeature[] = [] + public fetchedItems: SapiParcellationFeatureModel[] = [] public cohorts: string[] public selectedView: 'subject' | 'average' | null public averageDisabled: boolean = true @@ -87,7 +87,7 @@ export class ConnectivityBrowserComponent implements AfterViewInit, OnDestroy { public regionName: string public regionHemisphere: string = null - public selectedDataset: ConnectivityFeature + public selectedDataset: SapiParcellationFeatureModel public connectionsString: string public pureConnections: { [key: string]: number } public connectedAreas: BehaviorSubject<ConnectedArea[]> = new BehaviorSubject([]) @@ -397,14 +397,8 @@ export class ConnectivityBrowserComponent implements AfterViewInit, OnDestroy { } -export type ConnectedArea = { +type ConnectedArea = { color: {r: number, g: number, b: number} name: string numberOfConnections: number } - -export type ConnectivityFeature = { - cohort: string - subject?: string - description?: string -} & SapiParcellationFeatureModel