Skip to content
Snippets Groups Projects
Unverified Commit 75962d85 authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #1383 from FZJ-INM1-BDA/fix_dscDoi

feat: desc and doi
parents b1774890 6b99c30a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
......
......@@ -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) {
......
......@@ -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))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment