From f3a1078fe7b62439eb66689e664ceeff04f3ffc5 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Thu, 20 Sep 2018 08:17:08 +0200 Subject: [PATCH] only show precomputed and nifti layers in the layer browser --- src/atlasViewer/atlasViewer.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/atlasViewer/atlasViewer.component.ts b/src/atlasViewer/atlasViewer.component.ts index 6271e58a5..b5800545b 100644 --- a/src/atlasViewer/atlasViewer.component.ts +++ b/src/atlasViewer/atlasViewer.component.ts @@ -401,12 +401,14 @@ export class AtlasViewer implements OnDestroy, OnInit, AfterViewInit { ngLayersChangeHandler(){ - this.ngLayers = (window['viewer'].layerManager.managedLayers as any[]).map(obj => ({ - name : obj.name, - type : obj.initialSpecification.type, - source : obj.sourceUrl, - visible : obj.visible - }) as NgLayerInterface) + this.ngLayers = (window['viewer'].layerManager.managedLayers as any[]) + .filter(obj => obj.sourceUrl && /precomputed|nifti/.test(obj.sourceUrl)) + .map(obj => ({ + name : obj.name, + type : obj.initialSpecification.type, + source : obj.sourceUrl, + visible : obj.visible + }) as NgLayerInterface) } rafId : number | null -- GitLab