Newer
Older
<!-- feature tmpls -->
<ng-template #sapiBaseFeatureTmpl
let-backCb="backCb"
<sxplr-feature-view class="sxplr-z-2 mat-elevation-z2"
[feature]="feature">
<div header>
<!-- back btn -->
<button mat-button
*ngIf="backCb"
(click)="backCb()"
[attr.aria-label]="ARIA_LABELS.CLOSE"
class="sxplr-mb-2"
>
<i class="fas fa-chevron-left"></i>
<span class="ml-1">
Back
</span>
</button>
</div>
</ng-template>
<!-- general feature tmpl -->
<ng-template let-feature="feature" #selectedFeatureTmpl>
<!-- TODO differentiate between features (spatial, regional etc) -->
<!-- spatial feature tmpl -->
<ng-container *ngTemplateOutlet="sapiBaseFeatureTmpl; context: {
backCb: clearSelectedFeature.bind(this),
<ng-layer-ctl *ngFor="let vol of feature.volumes"
class="d-block"
[ng-layer-ctl-name]="vol.metadata.fullName"
[ng-layer-ctl-src]="vol.data.url"
[ng-layer-ctl-transform]="vol.data | getProperty : 'detail' | getProperty: 'neuroglancer/precomputed' | getProperty : 'transform'">
</ng-layer-ctl>
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
<!-- general point tmpl -->
<ng-template let-view="view" #selectedPointTmpl>
<sxplr-side-panel>
<div class="sxplr-custom-cmp lighttheme" header>
<!-- back btn -->
<button mat-button
(click)="clearPoint()"
[attr.aria-label]="ARIA_LABELS.CLOSE"
class="sxplr-mb-2"
>
<i class="fas fa-chevron-left"></i>
<span class="ml-1">
Back
</span>
</button>
</div>
<div title>
{{ view.spatialObjectTitle }}
</div>
<div subtitle>
{{ view.spatialObjectSubtitle }}
</div>
</sxplr-side-panel>
<sxplr-point-assignment
[point]="view.selectedPoint"
[template]="view.selectedTemplate"
[parcellation]="view.selectedParcellation">
</sxplr-point-assignment>
<!-- spatial search tmpls -->
<ng-template #spatialFeatureListTmpl let-view="view">
<mat-card class="sxplr-pe-all"
[ngClass]="{
'sxplr-d-none': !(voiSwitch.switchState$ | async) || (voiFeatureEntryCmp.totals$ | async) === 0
<div *ngIf="view.selectedTemplate">
{{ view.selectedTemplate.name }}
</div>
<ng-template [ngIf]="bbox.bbox$ | async | getProperty : 'bbox'" let-bbox>
<div>
from {{ bbox[0] | numbers | addUnitAndJoin : '' }}
</div>
<div>
to {{ bbox[1] | numbers | addUnitAndJoin : '' }}
</div>
<mat-slide-toggle [formControl]="showVOIWireframeSlideToggle">
<span>
Show VOI Wireframe
</span>
<spinner-cmp class="sxplr-d-inline-block" *ngIf="loadingVoiWireFrame$ | async"></spinner-cmp>
</mat-slide-toggle>
[ngClass]="(voiSwitch.switchState$ | async) ? 'sxplr-d-block' : 'sxplr-d-none'"
class="sxplr-pe-all mat-elevation-z8"
[bbox]="bbox.bbox$ | async | getProperty : 'bbox'"
#voiFeatureEntryCmp="featureEntryCmp">
</sxplr-feature-entry>
<mat-card [ngClass]="{
'sxplr-d-none': (voiFeatureEntryCmp.totals$ | async) > 0
}">
No spatial features found.
</mat-card>
<button mat-raised-button
[ngClass]="{
'sxplr-d-none': (voiFeatureEntryCmp.totals$ | async) === 0
}"
class="sxplr-pe-all sxplr-w-100"
iav-switch
[iav-switch-state]="false"
#voiSwitch="iavSwitch"
(click)="voiSwitch.toggle()">
<ng-template [ngIf]="voiSwitch.switchState$ | async" [ngIfElse]="chevronCollapseTmpl">
<i class="fas fa-chevron-up"></i>
<span>
Collapse
</span>
</ng-template>
<i class="fas fa-chevron-down"></i>
<span>
Explore {{ voiFeatureEntryCmp.totals$ | async }} spatial features
</span>
</ng-template>
</button>
<!-- TODO voiBbox directive is used to draw outlines for VOI
this has been temporarily disabled, since datasource is paginated
and how bounding boxes are drawn needs to be reconsidered -->
<div
*ngIf="showVOIWireframeSlideToggle.valueChanges | async"
voiBbox
[features]="voiFeatureEntryCmp.features$ | async">
</ng-template>
<div
sxplr-sapiviews-core-space-boundingbox
[sxplr-sapiviews-core-space-boundingbox-atlas]="selectedAtlas$ | async"
[sxplr-sapiviews-core-space-boundingbox-space]="templateSelected$ | async"
[sxplr-sapiviews-core-space-boundingbox-spec]="viewerCtx$ | async | nehubaVCtxToBbox"
#bbox="sxplrSapiViewsCoreSpaceBoundingBox">
</div>