diff --git a/docs/releases/v2.12.3.md b/docs/releases/v2.12.3.md index fb6c01665023d1ff49eaa3aeedba5f70a56a03ca..75da7002c5e96e121272ae3c172cbe3b20acb089 100644 --- a/docs/releases/v2.12.3.md +++ b/docs/releases/v2.12.3.md @@ -4,3 +4,5 @@ - Visually distinguish regions that are mapped in a space to those that are not - Remove experimental flag to VOI +- siibra-explorer now displays description and doi for more regions correctly (Julich Brain 3.0 in all MRI spaces and Julich Brain detailed maps in Big Brain spaces) +- Do not display connectivity in big brain space diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index 1faa428f1354027d9f758b934e70514a49f8267e..0b8323001c2201d06894f90e3d43e0c7412c0c85 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -22,7 +22,7 @@ export const useViewer = { } as const export const SIIBRA_API_VERSION_HEADER_KEY='x-siibra-api-version' -export const EXPECTED_SIIBRA_API_VERSION = '0.3.10' +export const EXPECTED_SIIBRA_API_VERSION = '0.3.11' let BS_ENDPOINT_CACHED_VALUE: Observable<string> = null diff --git a/src/atlasComponents/sapiViews/core/region/region/rich/region.rich.component.ts b/src/atlasComponents/sapiViews/core/region/region/rich/region.rich.component.ts index c61d33b9d2c25cd406383ed85cc437f6364748ca..d774b1e05f61c2ebe3a4f676d6464417626b4cdd 100644 --- a/src/atlasComponents/sapiViews/core/region/region/rich/region.rich.component.ts +++ b/src/atlasComponents/sapiViews/core/region/region/rich/region.rich.component.ts @@ -6,7 +6,7 @@ import { ARIA_LABELS, CONST } from 'common/constants' import { Feature } from "src/atlasComponents/sapi/sxplrTypes"; import { SAPI } from "src/atlasComponents/sapi/sapi.service"; import { environment } from "src/environments/environment"; -import { map, shareReplay, switchMap } from "rxjs/operators"; +import { catchError, map, shareReplay, switchMap } from "rxjs/operators"; import { PathReturn } from "src/atlasComponents/sapi/typeV3"; @Component({ @@ -41,7 +41,7 @@ export class SapiViewsCoreRegionRegionRich extends SapiViewsCoreRegionRegionBase activePanelTitles$: Observable<string[]> = new Subject() - private regionalStatisticalMaps$ = this.ATPR$.pipe( + private regionalMaps$ = this.ATPR$.pipe( switchMap(({ parcellation, template, region }) => concat( of([] as PathReturn<"/map">["volumes"]), @@ -49,14 +49,26 @@ export class SapiViewsCoreRegionRegionRich extends SapiViewsCoreRegionRegionBase map(v => { const mapIndices = v.indices[region.name] return mapIndices.map(mapIdx => v.volumes[mapIdx.volume]) + }), + catchError((_err, _obs) => { + /** + * if statistical map somehow fails to fetch (e.g. does not exist for this combination + * of parc tmpl), fallback to labelled map + */ + return this.sapi.getMap(parcellation.id, template.id, "LABELLED").pipe( + map(v => { + const mapIndices = v.indices[region.name] + return mapIndices.map(mapIdx => v.volumes[mapIdx.volume]) + }) + ) }) - ) + ), ) ), shareReplay(1) ) - public dois$ = this.regionalStatisticalMaps$.pipe( + public dois$ = this.regionalMaps$.pipe( map(sms => { const returnUrls: string[] = [] for (const sm of sms) { @@ -71,7 +83,7 @@ export class SapiViewsCoreRegionRegionRich extends SapiViewsCoreRegionRegionBase }) ) - public desc$ = this.regionalStatisticalMaps$.pipe( + public desc$ = this.regionalMaps$.pipe( map(sm => { for (const ds of (sm?.[0]?.datasets) || []) { if (ds.description) { diff --git a/src/features/entry/entry.component.ts b/src/features/entry/entry.component.ts index e4cfbe75e126083681838c1fe815bca654737345..581b34e0009b0a27479a86ec302d74319a86513a 100644 --- a/src/features/entry/entry.component.ts +++ b/src/features/entry/entry.component.ts @@ -152,7 +152,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest map(atlas => atlas?.species === SPECIES_ENUM.HOMO_SAPIENS || atlas?.species === SPECIES_ENUM.RATTUS_NORVEGICUS) ), this.TPRBbox$.pipe( - map(({ parcellation }) => parcellation?.id === IDS.PARCELLATION.JBA29 || parcellation?.id === IDS.PARCELLATION.WAXHOLMV4) + map(({ parcellation, template }) => template.id !== IDS.TEMPLATES.BIG_BRAIN && parcellation?.id === IDS.PARCELLATION.JBA29 || parcellation?.id === IDS.PARCELLATION.WAXHOLMV4) ) ]).pipe( map(flags => flags.every(f => f))