Skip to content
Snippets Groups Projects
Commit a8b1e05a authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: legacy url - allen/waxholm

parent 6589ca1a
No related branches found
No related tags found
No related merge requests found
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
## Bugfixes ## Bugfixes
- Fix unnamed point landmark naming - Fix unnamed point landmark naming
- Fix multiregion legacy links (#1022)
...@@ -26,6 +26,10 @@ export class HasConnectivity implements OnInit, OnDestroy { ...@@ -26,6 +26,10 @@ export class HasConnectivity implements OnInit, OnDestroy {
} }
checkConnectivity(region) { checkConnectivity(region) {
if (!region.context) {
this.hasConnectivity = false
return
}
const {atlas, parcellation, template} = region.context const {atlas, parcellation, template} = region.context
if (region.name) { if (region.name) {
const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(region.name)}/features/ConnectivityProfile` const connectivityUrl = `${this.siibraApiUrl}/atlases/${encodeURIComponent(atlas['@id'])}/parcellations/${encodeURIComponent(parcellation['@id'])}/regions/${encodeURIComponent(region.name)}/features/ConnectivityProfile`
......
...@@ -33,6 +33,7 @@ export class RegionBase { ...@@ -33,6 +33,7 @@ export class RegionBase {
set region(val) { set region(val) {
this._region = val this._region = val
this.region$.next(this._region) this.region$.next(this._region)
this.hasContext$.next(!!this._region.context)
this.position = null this.position = null
// bug the centroid returned is currently nonsense // bug the centroid returned is currently nonsense
...@@ -61,6 +62,7 @@ export class RegionBase { ...@@ -61,6 +62,7 @@ export class RegionBase {
return this._region return this._region
} }
public hasContext$: BehaviorSubject<boolean> = new BehaviorSubject(false)
public region$: BehaviorSubject<any> = new BehaviorSubject(null) public region$: BehaviorSubject<any> = new BehaviorSubject(null)
@Input() @Input()
...@@ -89,7 +91,7 @@ export class RegionBase { ...@@ -89,7 +91,7 @@ export class RegionBase {
this.regionInOtherTemplates$ = this.region$.pipe( this.regionInOtherTemplates$ = this.region$.pipe(
distinctUntilChanged(), distinctUntilChanged(),
filter(v => !!v), filter(v => !!v && !!v.context),
switchMap(region => this.store$.pipe( switchMap(region => this.store$.pipe(
select( select(
regionInOtherTemplateSelector, regionInOtherTemplateSelector,
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
content: kgRegionalFeatureList, content: kgRegionalFeatureList,
desc: '', desc: '',
iconTooltip: 'Regional Features', iconTooltip: 'Regional Features',
iavNgIf: true iavNgIf: hasContext$ | async
}"> }">
</ng-container> </ng-container>
......
...@@ -246,6 +246,47 @@ const BACKCOMAP_KEY_DICT = { ...@@ -246,6 +246,47 @@ const BACKCOMAP_KEY_DICT = {
// fsaverage // fsaverage
"minds/core/referencespace/v1.0.0/tmp-fsaverage": fsAverageKeyVal, "minds/core/referencespace/v1.0.0/tmp-fsaverage": fsAverageKeyVal,
},
// allen mouse
'juelich/iav/atlas/v1.0.0/2': {
// ccf v3
"minds/core/referencespace/v1.0.0/265d32a0-3d84-40a5-926f-bf89f68212b9": {
// ccf v3 2017
"minds/core/parcellationatlas/v1.0.0/05655b58-3b6f-49db-b285-64b5a0276f83": {
"whole brain": "v3_2017",
"left hemisphere": "v3_2017",
"right hemisphere": "v3_2017"
},
// ccf v3 2015,
"minds/core/parcellationatlas/v1.0.0/39a1384b-8413-4d27-af8d-22432225401f": {
"whole brain": "atlas",
"left hemisphere": "atlas",
"right hemisphere": "atlas"
}
}
},
// waxholm
"minds/core/parcellationatlas/v1.0.0/522b368e-49a3-49fa-88d3-0870a307974a": {
"minds/core/referencespace/v1.0.0/d5717c4a-0fa1-46e6-918c-b8003069ade8": {
// v1.01
"minds/core/parcellationatlas/v1.0.0/11017b35-7056-4593-baad-3934d211daba": {
"whole brain": "v1_01",
"left hemisphere": "v1_01",
"right hemisphere": "v1_01"
},
// v2
"minds/core/parcellationatlas/v1.0.0/2449a7f0-6dd0-4b5a-8f1e-aec0db03679d": {
"whole brain": "v2",
"left hemisphere": "v2",
"right hemisphere": "v2"
},
// v3
"minds/core/parcellationatlas/v1.0.0/ebb923ba-b4d5-4b82-8088-fa9215c2e1fe": {
"whole brain": "v3",
"left hemisphere": "v3",
"right hemisphere": "v3"
}
}
} }
} }
......
...@@ -593,21 +593,21 @@ ...@@ -593,21 +593,21 @@
<!-- Multi regions include --> <!-- Multi regions include -->
<ng-template #multiRegionInclTmpl> <ng-template #multiRegionInclTmpl>
<mat-chip-list>
<mat-chip *ngFor="let r of regions" <mat-chip *ngFor="let r of regions"
iav-region iav-region
[region]="r" [region]="r"
[ngClass]="{ class="m-1"
'darktheme':regionDirective.rgbDarkmode === true, [ngClass]="{
'lighttheme': regionDirective.rgbDarkmode === false 'darktheme':regionDirective.rgbDarkmode === true,
}" 'lighttheme': regionDirective.rgbDarkmode === false
[style.backgroundColor]="regionDirective.rgbString" }"
#regionDirective="iavRegion"> [style.backgroundColor]="regionDirective.rgbString"
<span class="iv-custom-comp text text-truncate d-inline pl-4"> #regionDirective="iavRegion">
{{ r.name }} <span class="iv-custom-comp text text-truncate d-inline">
</span> {{ r.name }}
</mat-chip> </span>
</mat-chip-list> </mat-chip>
</ng-template> </ng-template>
<ng-container *ngTemplateOutlet="ngMatAccordionTmpl; context: { <ng-container *ngTemplateOutlet="ngMatAccordionTmpl; context: {
......
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