diff --git a/src/res/ext/bigbrain.json b/src/res/ext/bigbrain.json index 4e355c841652c2efa6a5bd2886c06699522641b5..4b3407a12eec940599fa0813fbf51bca06e60c7f 100644 --- a/src/res/ext/bigbrain.json +++ b/src/res/ext/bigbrain.json @@ -1,246 +1 @@ -{ - "name": "Big Brain (Histology)", - "type": "template", - "species": "Human", - "useTheme": "light", - "nehubaId": " grey value: ", - "nehubaConfigURL": "nehubaConfig/bigbrainNehubaConfig", - "parcellations": [ - { - "name": "Grey/White matter", - "type": "parcellation", - "ngData": null, - "ngId": " tissue type: ", - "regions": [ - { - "name": "Grey matter", - "labelIndex": 100, - "rgb": [ - 200, - 200, - 200 - ], - "children": [] - }, - { - "name": "White matter", - "labelIndex": 200, - "rgb": [ - 255, - 255, - 255 - ], - "children": [] - } - ] - }, - { - "name": "Area V1", - "type": "parcellation", - "visible": false, - "ngData": true, - "ngId": "v1", - "regions": [ - { - "name": "V1 - Root", - "labelIndex": null, - "children": [ - { - "name": "V1 - Area", - "rgb": [ - 255, - 255, - 0 - ], - "labelIndex": 1, - "children": [], - "position": [ - 73858340, - 19562848, - 73433440 - ] - } - ] - } - ] - }, - { - "name": "Area V2", - "type": "parcellation", - "visible": false, - "ngData": true, - "ngId": "v2", - "regions": [ - { - "name": "V2 - Root", - "labelIndex": null, - "children": [ - { - "name": "V2 - Area", - "rgb": [ - 0, - 0, - 255 - ], - "labelIndex": 1, - "children": [], - "position": [ - 70941950, - 15307920, - 74208344 - ] - } - ] - } - ] - }, - { - "name": "interpolated", - "type": "parcellation", - "visible": false, - "ngData": true, - "ngId": "interpolated", - "regions": [ - { - "name": "Area 6d1 (PreG)", - "labelIndex": 1, - "children": [] - }, - { - "name": "Area 6d2 (PreG)", - "labelIndex": 2, - "children": [] - }, - { - "name": "Area 6d3 (SFS)", - "labelIndex": 3, - "children": [] - }, - { - "name": "Area TE 1.0 (HESCHL)", - "labelIndex": 4, - "children": [] - }, - { - "name": "Area TE 1.1 (HESCHL)", - "labelIndex": 5, - "children": [] - }, - { - "name": "Area TE 1.2 (HESCHL)", - "labelIndex": 6, - "children": [] - }, - { - "name": "Area TE 3 (STG)", - "labelIndex": 7, - "children": [] - }, - { - "name": "Entorhinal Cortex", - "labelIndex": 8, - "children": [] - }, - { - "name": "Area ifj1 (IFS/PreS)", - "labelIndex": 9, - "children": [] - }, - { - "name": "Area ifj2 (IFS/PreS)", - "labelIndex": 10, - "children": [] - }, - { - "name": "Area ifs1 (IFS)", - "labelIndex": 11, - "children": [] - }, - { - "name": "Area ifs2 (IFS)", - "labelIndex": 12, - "children": [] - }, - { - "name": "Area ifs3 (IFS)", - "labelIndex": 13, - "children": [] - }, - { - "name": "Area ifs4 (IFS)", - "labelIndex": 14, - "children": [] - }, - { - "name": "Area hIP4 (IPS)", - "labelIndex": 15, - "children": [] - }, - { - "name": "Area hIP5 (IPS)", - "labelIndex": 16, - "children": [] - }, - { - "name": "Area hIP6 (IPS)", - "labelIndex": 17, - "children": [] - }, - { - "name": "Area hIP7 (IPS)", - "labelIndex": 18, - "children": [] - }, - { - "name": "Area hIP8 (IPS)", - "labelIndex": 19, - "children": [] - }, - { - "name": "Area hOc6 (POS)", - "labelIndex": 20, - "children": [] - }, - { - "name": "Area hPO1 (POS)", - "labelIndex": 21, - "children": [] - }, - { - "name": "Area 6ma (preSMA, mesial SFG)", - "labelIndex": 22, - "children": [] - }, - { - "name": "Area 6mp (SMA, mesial SFG)", - "labelIndex": 23, - "children": [] - }, - { - "name": "Area STS1 (STS)", - "labelIndex": 24, - "children": [] - }, - { - "name": "Area STS2 (STS)", - "labelIndex": 25, - "children": [] - } - ] - } - ], - "properties": { - "name": "Big Brain (Histology)", - "description": "An ultrahigh resolution 3D model of a complete human brain (20 micron isotropic resolution), developed in a collaborative effort between the teams of Dr. Katrin Amunts and Dr. Karl Zilles (Forschungszentrum Jülich) and Dr. Alan Evans (Montreal Neurological Institute). Based on 7404 digitized histological brain sections, this so far unique reconstruction provides unprecedented neuroanatomical insight. The dataset contains a complete gray and white matter classification with corresponding surface reconstructions", - "publications": [ - { - "doi": "https://doi.org/10.1126/science.1235381", - "citation": "K. Amunts, A. Evans et al.: BigBrain: An Ultrahigh-Resolution 3D Human Brain Model. Science 2013" - }, - { - "doi": "http://bigbrain.loris.ca", - "citation": "http://bigbrain.loris.ca" - } - ] - } -} \ No newline at end of file +{"name":"Big Brain (Histology)","type":"template","species":"Human","useTheme":"light","nehubaId":" grey value: ","nehubaConfigURL":"nehubaConfig/bigbrainNehubaConfig","parcellations":[{"name":"Grey/White matter","type":"parcellation","ngData":null,"ngId":" tissue type: ","regions":[{"name":"Grey matter","labelIndex":100,"rgb":[200,200,200],"children":[]},{"name":"White matter","labelIndex":200,"rgb":[255,255,255],"children":[]}]},{"name":"Cytoarchitectonic Maps","properties":{"description":"This dataset contains cytoarchitectonic maps of brain regions in the BigBrain space [Amunts et al. 2013]. The mappings were created using the semi-automatic method presented in Schleicher et al. 1999, based on coronal histological sections on 1 micron resolution. Mappings are available on approximately every 100th section for each region. They were then transformed to the sections of the 3D reconstructed BigBrain space using the transformations used in Amunts et al. 2013, which were provided by Claude Lepage (McGill). Only a few cytoarchitectonic maps in the Big Brain are currently **fully mapped**, based on a workflow that automatically fills in missing sections based on expert annotations. Other 3D maps are available in a preliminary version, in which the expert annotations in the Big Brain space were simply **interpolated**."},"regions":[{"name":"telencephalon","children":[{"name":"cerebral cortex","children":[{"name":"temporal lobe","children":[{"name":"Heschl's gyrus","children":[{"name":"Area TE 1.0 (HESCHL)","ngId":"interpolated","status":"interpolated","labelIndex":4,"rgb":[0,146,63],"children":[]},{"name":"Area TE 1.1 (HESCHL)","ngId":"interpolated","status":"interpolated","labelIndex":5,"rgb":[132,194,37],"children":[]},{"name":"Area TE 1.2 (HESCHL)","ngId":"interpolated","status":"interpolated","labelIndex":6,"rgb":[117,197,240],"children":[]}]},{"name":"superior temporal gyrus","children":[{"name":"Area TE 3 (STG)","ngId":"interpolated","status":"interpolated","labelIndex":7,"rgb":[231,120,23],"children":[]}]},{"name":"superior temporal sulcus","children":[{"name":"Area STS1 (STS)","ngId":"interpolated","status":"interpolated","labelIndex":24,"children":[]},{"name":"Area STS2 (STS)","ngId":"interpolated","status":"interpolated","labelIndex":25,"children":[]}]}]},{"name":"frontal lobe","children":[{"name":"precentral gyrus","children":[{"name":"Area 6d1 (PreCG)","ngId":"interpolated","status":"interpolated","labelIndex":1,"children":[]},{"name":"Area 6d2 (PreCG)","ngId":"interpolated","status":"interpolated","labelIndex":2,"children":[]},{"name":"Area 6ma (preSMA, mesial SFG)","ngId":"interpolated","status":"interpolated","labelIndex":22,"children":[]},{"name":"Area 6mp (SMA, mesial SFG)","ngId":"interpolated","status":"interpolated","labelIndex":23,"children":[]}]},{"name":"superior frontal sulcus","children":[{"name":"Area 6d3 (SFS)","ngId":"interpolated","status":"interpolated","labelIndex":3,"children":[]}]},{"name":"inferior frontal sulcus","children":[{"name":"Area ifj1 (IFS/PreCS)","ngId":"interpolated","status":"interpolated","labelIndex":9,"children":[]},{"name":"Area ifj2 (IFS/PreCS)","ngId":"interpolated","status":"interpolated","labelIndex":10,"children":[]},{"name":"Area ifs1 (IFS)","ngId":"interpolated","status":"interpolated","labelIndex":11,"children":[]},{"name":"Area ifs2 (IFS)","ngId":"interpolated","status":"interpolated","labelIndex":12,"children":[]},{"name":"Area ifs3 (IFS)","ngId":"interpolated","status":"interpolated","labelIndex":13,"children":[]},{"name":"Area ifs4 (IFS)","ngId":"interpolated","status":"interpolated","labelIndex":14,"children":[]}]}]},{"name":"limbic lobe","children":[{"name":"hippocampal formation","children":[{"name":"Entorhinal Cortex","ngId":"interpolated","status":"interpolated","labelIndex":8,"rgb":[153,153,255],"children":[]}]}]},{"name":"parietal lobe","children":[{"name":"intraparietal sulcus","children":[{"name":"Area hIP4 (IPS)","ngId":"interpolated","status":"interpolated","labelIndex":15,"children":[]},{"name":"Area hIP5 (IPS)","ngId":"interpolated","status":"interpolated","labelIndex":16,"children":[]},{"name":"Area hIP6 (IPS)","ngId":"interpolated","status":"interpolated","labelIndex":17,"children":[]},{"name":"Area hIP7 (IPS)","ngId":"interpolated","status":"interpolated","labelIndex":18,"children":[]}]},{"name":"parieto-occipital sulcus","children":[{"name":"Area hPO1 (POS)","ngId":"interpolated","status":"interpolated","labelIndex":21,"children":[]}]}]},{"name":"occipital lobe","children":[{"name":"occipital cortex","children":[{"name":"Area hOc1 (V1, 17, CalcS)","ngId":"v1","status":"fully mapped","labelIndex":1,"rgb":[250,30,250],"children":[]},{"name":"Area hOc2 (V2, 18)","ngId":"v2","status":"fully mapped","labelIndex":1,"rgb":[155,100,250],"children":[]},{"name":"dorsal occipital cortex","children":[{"name":"Area hOc6 (POS)","ngId":"interpolated","status":"interpolated","labelIndex":20,"children":[]}]}]}]}]}]}]},{"name":"BigBrain Cortical Layers Segmentation","ngId":"cortical layers","properties":{"description":"The cerebral isocortex has six cytoarchitectonic layers that vary depending on cortical area and local morphology. This datasets provides a 3D segmentation of all cortical and laminar surfaces in the BigBrain, a high-resolution, 3D histological model of the human brain. The segmentation has been computed automatically based on histological intensities along 3D cortical profiles which were sampled between the pial and white matter throughout the dataset. These cortical profiles were segmented into layers using a convolutional neural network. Training profiles were generated from examples of manually segmented layers on cortical regions from 2D histological sections of the BigBrain. From the segmented intensity profiles, surface meshes and voxel masks of all six cortical layers in the space of the Big Brain have been computed.","publications":[{"doi":"https://doi.org/10.1101/580597","citation":"Konrad Wagstyl, Stéphanie Larocque, Guillem Cucurull, Claude Lepage, Joseph Paul Cohen, Sebastian Bludau, Nicola Palomero-Gallagher, Thomas Funck, Hannah Spitzer, Timo Dicksheid, Paul C Fletcher, Adriana Romero, Karl Zilles, Katrin Amunts, Yoshua Bengio, Alan C. Evans (2019) Automated segmentation of cortical layers in BigBrain reveals divergent cortical and laminar thickness gradients in sensory and motor cortices. bioRxiv 580597; doi: https://doi.org/10.1101/580597"}]},"regions":[{"name":"telencephalon","children":[{"name":"cortical layer 1","labelIndex":1,"rgb":[128,128,0],"children":[]},{"name":"cortical layer 2","labelIndex":2,"rgb":[250,190,190],"children":[]},{"name":"cortical layer 3","labelIndex":3,"rgb":[255,215,180],"children":[]},{"name":"cortical layer 4","labelIndex":4,"rgb":[255,250,200],"children":[]},{"name":"cortical layer 5","labelIndex":5,"rgb":[0,128,128],"children":[]},{"name":"cortical layer 6","labelIndex":6,"rgb":[230,190,255],"children":[]},{"name":"non-cortical structures","labelIndex":7,"rgb":[255,255,255],"children":[]}]}]}],"properties":{"name":"Big Brain (Histology)","description":"An ultrahigh resolution 3D model of a complete human brain (20 micron isotropic resolution), developed in a collaborative effort between the teams of Dr. Katrin Amunts and Dr. Karl Zilles (Forschungszentrum Jülich) and Dr. Alan Evans (Montreal Neurological Institute). Based on 7404 digitized histological brain sections, this so far unique reconstruction provides unprecedented neuroanatomical insight. The dataset contains a complete gray and white matter classification with corresponding surface reconstructions","publications":[{"doi":"https://doi.org/10.1126/science.1235381","citation":"K. Amunts, A. Evans et al.: BigBrain: An Ultrahigh-Resolution 3D Human Brain Model. Science 2013"},{"doi":"http://bigbrain.loris.ca","citation":"http://bigbrain.loris.ca"}]}} \ No newline at end of file diff --git a/src/res/ext/bigbrainNehubaConfig.json b/src/res/ext/bigbrainNehubaConfig.json index 8a5e639eed9925c906f0caffed6fb2a14f2efc45..185ac5077ab33ef3004edf4e326602aefa446020 100644 --- a/src/res/ext/bigbrainNehubaConfig.json +++ b/src/res/ext/bigbrainNehubaConfig.json @@ -1,302 +1 @@ -{ - "configName": "", - "globals": { - "hideNullImageValues": true, - "useNehubaLayout": { - "keepDefaultLayouts": false - }, - "useNehubaMeshLayer": true, - "rightClickWithCtrlGlobal": false, - "zoomWithoutCtrlGlobal": false, - "useCustomSegmentColors": true - }, - "zoomWithoutCtrl": true, - "hideNeuroglancerUI": true, - "rightClickWithCtrl": true, - "rotateAtViewCentre": true, - "enableMeshLoadingControl": true, - "zoomAtViewCentre": true, - "restrictUserNavigation": true, - "disableSegmentSelection": false, - "dataset": { - "imageBackground": [ - 1, - 1, - 1, - 1 - ], - "initialNgState": { - "showDefaultAnnotations": false, - "layers": { - " grey value: ": { - "type": "image", - "source": "precomputed://https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/8bit", - "transform": [ - [ - 1, - 0, - 0, - -70677184 - ], - [ - 0, - 1, - 0, - -70010000 - ], - [ - 0, - 0, - 1, - -58788284 - ], - [ - 0, - 0, - 0, - 1 - ] - ] - }, - " tissue type: ": { - "type": "segmentation", - "source": "precomputed://https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/classif", - "segments": [ - "0" - ], - "selectedAlpha": 0, - "notSelectedAlpha": 0, - "transform": [ - [ - 1, - 0, - 0, - -70666600 - ], - [ - 0, - 1, - 0, - -72910000 - ], - [ - 0, - 0, - 1, - -58777700 - ], - [ - 0, - 0, - 0, - 1 - ] - ] - }, - "v1": { - "type": "segmentation", - "source": "precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_01_v1", - "segments": [ - "0" - ], - "selectedAlpha": 0.45, - "notSelectedAlpha": 0, - "transform": [ - [ - 1, - 0, - 0, - -70677184 - ], - [ - 0, - 1, - 0, - -69390000 - ], - [ - 0, - 0, - 1, - -58788284 - ], - [ - 0, - 0, - 0, - 1 - ] - ] - }, - "v2": { - "type": "segmentation", - "source": "precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_01_v2", - "segments": [ - "0" - ], - "selectedAlpha": 0.45, - "notSelectedAlpha": 0, - "transform": [ - [ - 1, - 0, - 0, - -70677184 - ], - [ - 0, - 1, - 0, - -69870000 - ], - [ - 0, - 0, - 1, - -58788284 - ], - [ - 0, - 0, - 0, - 1 - ] - ] - }, - "interpolated": { - "type": "segmentation", - "source": "precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas", - "segments": [ - "0" - ], - "selectedAlpha": 0.45, - "notSelectedAlpha": 0, - "transform": [ - [ - 1, - 0, - 0, - -70677184 - ], - [ - 0, - 1, - 0, - -51990000 - ], - [ - 0, - 0, - 1, - -58788284 - ], - [ - 0, - 0, - 0, - 1 - ] - ] - } - }, - "navigation": { - "pose": { - "position": { - "voxelSize": [ - 21166.666015625, - 20000, - 21166.666015625 - ], - "voxelCoordinates": [ - -21.8844051361084, - 16.288618087768555, - 28.418994903564453 - ] - } - }, - "zoomFactor": 350000 - }, - "perspectiveOrientation": [ - 0.3140767216682434, - -0.7418519854545593, - 0.4988985061645508, - -0.3195493221282959 - ], - "perspectiveZoom": 1922235.5293810747 - } - }, - "layout": { - "views": "hbp-neuro", - "planarSlicesBackground": [ - 1, - 1, - 1, - 1 - ], - "useNehubaPerspective": { - "enableShiftDrag": false, - "doNotRestrictUserNavigation": false, - "perspectiveSlicesBackground": [ - 1, - 1, - 1, - 1 - ], - "removePerspectiveSlicesBackground": { - "color": [ - 1, - 1, - 1, - 1 - ], - "mode": "==" - }, - "perspectiveBackground": [ - 1, - 1, - 1, - 1 - ], - "fixedZoomPerspectiveSlices": { - "sliceViewportWidth": 300, - "sliceViewportHeight": 300, - "sliceZoom": 563818.3562426177, - "sliceViewportSizeMultiplier": 2 - }, - "mesh": { - "backFaceColor": [ - 1, - 1, - 1, - 1 - ], - "removeBasedOnNavigation": true, - "flipRemovedOctant": true - }, - "centerToOrigin": true, - "drawSubstrates": { - "color": [ - 0, - 0, - 0.5, - 0.15 - ] - }, - "drawZoomLevels": { - "cutOff": 200000, - "color": [ - 0.5, - 0, - 0, - 0.15 - ] - }, - "hideImages": false, - "waitForMesh": true, - "restrictZoomLevel": { - "minZoom": 1200000, - "maxZoom": 3500000 - } - } - } -} \ No newline at end of file +{"configName":"","globals":{"hideNullImageValues":true,"useNehubaLayout":{"keepDefaultLayouts":false},"useNehubaMeshLayer":true,"rightClickWithCtrlGlobal":false,"zoomWithoutCtrlGlobal":false,"useCustomSegmentColors":true},"zoomWithoutCtrl":true,"hideNeuroglancerUI":true,"rightClickWithCtrl":true,"rotateAtViewCentre":true,"enableMeshLoadingControl":true,"zoomAtViewCentre":true,"restrictUserNavigation":true,"disableSegmentSelection":false,"dataset":{"imageBackground":[1,1,1,1],"initialNgState":{"showDefaultAnnotations":false,"layers":{" grey value: ":{"type":"image","source":"precomputed://https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/8bit","transform":[[1,0,0,-70677184],[0,1,0,-70010000],[0,0,1,-58788284],[0,0,0,1]]}," tissue type: ":{"type":"segmentation","source":"precomputed://https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/classif","segments":["0"],"selectedAlpha":0,"notSelectedAlpha":0,"transform":[[1,0,0,-70666600],[0,1,0,-72910000],[0,0,1,-58777700],[0,0,0,1]]},"v1":{"type":"segmentation","source":"precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_01_v1","segments":["0"],"selectedAlpha":0.45,"notSelectedAlpha":0,"transform":[[1,0,0,-70677184],[0,1,0,-69390000],[0,0,1,-58788284],[0,0,0,1]]},"v2":{"type":"segmentation","source":"precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_01_v2","segments":["0"],"selectedAlpha":0.45,"notSelectedAlpha":0,"transform":[[1,0,0,-70677184],[0,1,0,-69870000],[0,0,1,-58788284],[0,0,0,1]]},"interpolated":{"type":"segmentation","source":"precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas","segments":["0"],"selectedAlpha":0.45,"notSelectedAlpha":0,"transform":[[1,0,0,-70677184],[0,1,0,-51990000],[0,0,1,-58788284],[0,0,0,1]]},"cortical layers":{"type":"segmentation","source":"precomputed://https://neuroglancer-dev.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_27_cortical_layers","selectedAlpha":0.5,"notSelectedAlpha":0,"transform":[[1,0,0,-70677184],[0,1,0,-70010000],[0,0,1,-58788284],[0,0,0,1]]}},"navigation":{"pose":{"position":{"voxelSize":[21166.666015625,20000,21166.666015625],"voxelCoordinates":[-21.8844051361084,16.288618087768555,28.418994903564453]}},"zoomFactor":350000},"perspectiveOrientation":[0.3140767216682434,-0.7418519854545593,0.4988985061645508,-0.3195493221282959],"perspectiveZoom":1922235.5293810747}},"layout":{"views":"hbp-neuro","planarSlicesBackground":[1,1,1,1],"useNehubaPerspective":{"enableShiftDrag":false,"doNotRestrictUserNavigation":false,"perspectiveSlicesBackground":[1,1,1,1],"removePerspectiveSlicesBackground":{"color":[1,1,1,1],"mode":"=="},"perspectiveBackground":[1,1,1,1],"fixedZoomPerspectiveSlices":{"sliceViewportWidth":300,"sliceViewportHeight":300,"sliceZoom":563818.3562426177,"sliceViewportSizeMultiplier":2},"mesh":{"backFaceColor":[1,1,1,1],"removeBasedOnNavigation":true,"flipRemovedOctant":true},"centerToOrigin":true,"drawSubstrates":{"color":[0,0,0.5,0.15]},"drawZoomLevels":{"cutOff":200000,"color":[0.5,0,0,0.15]},"hideImages":false,"waitForMesh":true,"restrictZoomLevel":{"minZoom":1200000,"maxZoom":3500000}}}} \ No newline at end of file diff --git a/src/ui/regionHierachy/regionHierarchy.component.ts b/src/ui/regionHierachy/regionHierarchy.component.ts index d5992b28c0ed7503d144de66f96fc0de9c211277..c4b4a4951d83d5414602696297800046045cd5a9 100644 --- a/src/ui/regionHierachy/regionHierarchy.component.ts +++ b/src/ui/regionHierachy/regionHierarchy.component.ts @@ -11,17 +11,17 @@ const insertHighlight :(name:string, searchTerm:string) => string = (name:string name.replace(regex, (s) => `<span class = "highlight">${s}</span>`) } -const getDisplayTreeNode : (searchTerm:string, selectedRegions:any[]) => (item:any) => string = (searchTerm:string = '', selectedRegions:any[] = []) => ({ ngId, name, labelIndex }) => { +const getDisplayTreeNode : (searchTerm:string, selectedRegions:any[]) => (item:any) => string = (searchTerm:string = '', selectedRegions:any[] = []) => ({ ngId, name, status, labelIndex }) => { return !!labelIndex && !!ngId && selectedRegions.findIndex(re => generateLabelIndexId({ labelIndex: re.labelIndex, ngId: re.ngId }) === generateLabelIndexId({ ngId, labelIndex }) ) >= 0 - ? `<span class="regionSelected">${insertHighlight(name, searchTerm)}</span>` - : `<span class="regionNotSelected">${insertHighlight(name, searchTerm)}</span>` + ? `<span class="regionSelected">${insertHighlight(name, searchTerm)}</span>` + (status ? ` <span class="text-muted">(${insertHighlight(status, searchTerm)})</span>` : ``) + : `<span class="regionNotSelected">${insertHighlight(name, searchTerm)}</span>` + (status ? ` <span class="text-muted">(${insertHighlight(status, searchTerm)})</span>` : ``) } -const getFilterTreeBySearch = (pipe:FilterNameBySearch, searchTerm:string) => (node:any) => pipe.transform([node.name], searchTerm) +const getFilterTreeBySearch = (pipe:FilterNameBySearch, searchTerm:string) => (node:any) => pipe.transform([node.name, node.status], searchTerm) @Component({ selector: 'region-hierarchy', diff --git a/src/ui/signinBanner/signinBanner.components.ts b/src/ui/signinBanner/signinBanner.components.ts index 798b5f1f157af82ca00c17f265ae55379bf7ede7..75656e0fab1a4b698bcca07bc45eda09ba5ced30 100644 --- a/src/ui/signinBanner/signinBanner.components.ts +++ b/src/ui/signinBanner/signinBanner.components.ts @@ -9,6 +9,8 @@ import { map, filter, distinctUntilChanged } from "rxjs/operators"; import { regionFlattener } from "src/util/regionFlattener"; import { ToastService } from "src/services/toastService.service"; +const compareParcellation = (o, n) => o.name === n.name + @Component({ selector: 'signin-banner', templateUrl: './signinBanner.template.html', @@ -21,6 +23,8 @@ import { ToastService } from "src/services/toastService.service"; export class SigninBanner implements OnInit, OnDestroy{ + public compareParcellation = compareParcellation + private subscriptions: Subscription[] = [] public loadedTemplates$: Observable<any[]> public selectedTemplate$: Observable<any> diff --git a/src/ui/signinBanner/signinBanner.template.html b/src/ui/signinBanner/signinBanner.template.html index 56856ec3daebcd4f3dd2d01c9267b24e86d823e4..51ae875d91ab9e9858a88eb801986edf6b9b7294 100644 --- a/src/ui/signinBanner/signinBanner.template.html +++ b/src/ui/signinBanner/signinBanner.template.html @@ -16,6 +16,7 @@ <dropdown-component *ngIf="selectedParcellation$ | async as selectedParcellation" (itemSelected)="changeParcellation($event)" + [checkSelected]="compareParcellation" [activeDisplay]="displayActiveParcellation" [selectedItem]="selectedParcellation" [inputArray]="selectedTemplate.parcellations"