From 27ac4f4e97835ff1f754aa1291810fa1d29bb69b Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Wed, 9 Mar 2022 14:48:14 +0100
Subject: [PATCH] fix name & desc of voi

---
 src/main.module.ts                            | 22 ++++++++++++++-----
 .../layerbrowser.component.ts                 |  3 ++-
 .../layerbrowser.template.html                |  8 ++++++-
 .../layerCtrl.service/layerCtrl.service.ts    |  2 +-
 .../viewerCmp/viewerCmp.component.ts          | 14 ++++++++----
 5 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/src/main.module.ts b/src/main.module.ts
index dccad299c..93dd5e3db 100644
--- a/src/main.module.ts
+++ b/src/main.module.ts
@@ -258,21 +258,31 @@ export function debug(reducer: ActionReducer<any>): ActionReducer<any> {
           if (flag) {
             store.dispatch(
               ngViewerActionAddNgLayer({
-                layer: {
-                  name: `1um`,
+                layer: [{
+                  name: `VOI_1 (area V1)`,
                   source: `precomputed://https://1um.brainatlas.eu/cyto_reconstructions/ebrains_release/BB_1um/VOI_1/precomputed`,
                   shader: `void main(){ emitGrayscale(toNormalized(getDataValue()));}`,
                   transform: [[1.002276062965393,0.1810370832681656,0.15283183753490448,-10704839],[-0.14879435300827026,-0.0360119566321373,1.018455982208252,-60994436],[0.18436983227729797,-1.0132216215133667,-0.008890812285244465,-2825862.75],[0,0,0,1]],
+                  visible: true,
                   opacity: 1,
-                }
+                },{
+                  name: `VOI_2 (area V2)`,
+                  source: `precomputed://https://1um.brainatlas.eu/cyto_reconstructions/ebrains_release/BB_1um/VOI_2/precomputed`,
+                  shader: `void main(){ emitGrayscale(toNormalized(getDataValue()));}`,
+                  // transform: [[1.002276062965393,0.1810370832681656,0.15283183753490448,-10704839],[-0.14879435300827026,-0.0360119566321373,1.018455982208252,-60994436],[0.18436983227729797,-1.0132216215133667,-0.008890812285244465,-2825862.75],[0,0,0,1]],
+                  visible: true,
+                  opacity: 1,
+                }]
               })
             )
           } else {
             store.dispatch(
               ngViewerActionRemoveNgLayer({
-                layer: {
-                  name: `1um`
-                }
+                layer: [{
+                  name: `VOI_1 (area V1)`
+                }, {
+                  name: `VOI_2 (area V2)`
+                }]
               })
             )
           }
diff --git a/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.component.ts b/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.component.ts
index bc866e255..14d933124 100644
--- a/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.component.ts
+++ b/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.component.ts
@@ -21,7 +21,8 @@ const SHOW_LAYER_NAMES = [
   'PLI Transmittance',
   'T2w MRI',
   'MRI Labels',
-  '1um'
+  'VOI_1 (area V1)',
+  'VOI_2 (area V2)'
 ]
 
 @Component({
diff --git a/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.template.html b/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.template.html
index f34b2ea8b..977a88bea 100644
--- a/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.template.html
+++ b/src/ui/layerbrowser/layerBrowserComponent/layerbrowser.template.html
@@ -14,6 +14,12 @@
       #expansionPanel>
       <mat-expansion-panel-header>
         <div class="align-items-center d-flex flex-nowrap pr-4 w-100">
+
+          <button mat-icon-button
+            [matTooltip]="ngLayer.name | getFilenamePipe">
+            <i class="fas fa-info"></i>
+          </button>
+
           <!-- toggle opacity -->
           <div matTooltip="opacity">
 
@@ -69,7 +75,7 @@
           <!-- layer description -->
           <mat-label
             [matTooltipPosition]="matTooltipPosition"
-            [matTooltip]="ngLayer.name | getFilenamePipe "
+            [matTooltip]="ngLayer.name | getFilenamePipe"
             [class]="((darktheme$ | async) ? 'text-light' : 'text-dark') + ' text-truncate flex-grow-1 flex-shrink-1'">
             {{ ngLayer.name | getFilenamePipe }}
           </mat-label>
diff --git a/src/viewerModule/nehuba/layerCtrl.service/layerCtrl.service.ts b/src/viewerModule/nehuba/layerCtrl.service/layerCtrl.service.ts
index 35732fd52..3c0bbbeb5 100644
--- a/src/viewerModule/nehuba/layerCtrl.service/layerCtrl.service.ts
+++ b/src/viewerModule/nehuba/layerCtrl.service/layerCtrl.service.ts
@@ -333,7 +333,7 @@ export class NehubaLayerControlService implements OnDestroy{
     this.routerSvc.customRoute$.pipe(
       startWith({}),
       map(val => val['x-voi'] === "d71d369a-c401-4d7e-b97a-3fb78eed06c5"
-        ? ["1um"]
+        ? ["VOI_1 (area V1)", "VOI_2 (area V2)"]
         : []),
     )
   ]).pipe(
diff --git a/src/viewerModule/viewerCmp/viewerCmp.component.ts b/src/viewerModule/viewerCmp/viewerCmp.component.ts
index bef5dc230..0ca78f4af 100644
--- a/src/viewerModule/viewerCmp/viewerCmp.component.ts
+++ b/src/viewerModule/viewerCmp/viewerCmp.component.ts
@@ -125,9 +125,9 @@ export class ViewerCmp implements OnDestroy {
   public _pliDesc = "The collected datasets provide real multimodal, multiscale structural connectivity insights into the human hippocampus. One post mortem hippocampus was scanned with Anatomical and Diffusion MRI (dMRI) [1], 3D Polarized Light Imaging (3D-PLI) [2], and Two-Photon Fluorescence Microscopy (TPFM) [3] using protocols specifically developed during SGA1 and SGA2, rendering joint tissue imaging possible. MRI scanning was performed with a 11.7 T Preclinical MRI system (gradients: 760 mT/m, slew rate: 9500 T/m/s) yielding T1-w and T2-w maps at 200 µm and dMRI-based maps at 300 µm resolution. During tissue sectioning (60 µm thickness) blockface (en-face) images were acquired from the surface of the frozen brain block, serving as reference for data integration/co-alignment. 530 brain sections were scanned with 3D-PLI. HPC-based image analysis provided transmittance, retardation, and fiber orientation maps at 1.3 µm in-plane resolution. TPFM was finally applied to selected brain sections utilizing autofluorescence properties of the fibrous tissue which appears after PBS washing (MAGIC protocol). The TPFM measurements provide a resolution of 0.44 µm x 0.44 µm x 1 µm."
   public _pliLink = "https://doi.org/10.25493/JQ30-E08"
   
-  public _1umTitle = `Cellular level 3D reconstructed volumes at 1µm resolution within the human occipital cortex (v1.0)`
-  public _1umDesc = ``
-  public _1umLink = `https://search.kg.ebrains.eu/instances/d71d369a-c401-4d7e-b97a-3fb78eed06c5`
+  public _1umTitle = `Cellular level 3D reconstructed volumes at 1µm resolution within the BigBrain occipital cortex`
+  public _1umDesc = `This dataset contains two 6x6x6 mm3 volumes sampled from the occipital cortex of a human postmortem brain. The volumes were acquired by rescanning the original histological sections of the BigBrain model at an isotropic resolution of 1µm. The sections were linearly 3D reconstructed by aligning matched pairs of bisected cells. Subsequently, both reconstructed stacks were anchored into the 20µm 3D BigBrain space using a 3D similarity transformation.`
+  public _1umLink = null // `https://search.kg.ebrains.eu/instances/d71d369a-c401-4d7e-b97a-3fb78eed06c5`
 
   public CONST = CONST
   public ARIA_LABELS = ARIA_LABELS
@@ -208,7 +208,13 @@ export class ViewerCmp implements OnDestroy {
     ) || NEVER,
     this._1umVoi$.pipe(
       map(flag => flag
-        ? ({ title: this._1umTitle, description: this._1umDesc, url: [{ doi: this._1umLink }] })
+        ? ({
+            title: this._1umTitle,
+            description: this._1umDesc,
+            url: this._1umLink
+              ? [{ doi: this._1umLink }]
+              : []
+          })
         : null
       )
     )
-- 
GitLab