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

feat: jba29 in colin full mesh view

parent a5d4bcfa
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
- Allow point assignment result to be sorted
- Allow point assignment result to be downloaded as csv
- Informs user when atlas download should be occurring, and check popup blocker
- Restores Julich Brain 2.9 in Colin 27 space full mesh view
## Bugfixes
......
......@@ -46,8 +46,9 @@ export class NehubaLayerControlService implements OnDestroy{
combineLatest([
this.completeNgIdLabelRegionMap$,
this.customLayers$,
this.selectedRegion$,
]).pipe(
map(([record, layers]) => {
map(([record, layers, selectedRegions]) => {
const returnVal: IColorMap = {}
const cmCustomLayers = layers.filter(l => l.clType === "customlayer/colormap") as atlasAppearance.const.ColorMapCustomLayer[]
......@@ -72,11 +73,15 @@ export class NehubaLayerControlService implements OnDestroy{
get: (r: SxplrRegion) => r.color
}
})()
const selectedRegionNameSet = new Set(selectedRegions.map(v => v.name))
for (const [ngId, labelRecord] of Object.entries(record)) {
for (const [label, region] of Object.entries(labelRecord)) {
if (!region.color) continue
const [ red, green, blue ] = useCm.get(region) || [200, 200, 200]
const [ red, green, blue ] = selectedRegionNameSet.size === 0 || selectedRegionNameSet.has(region.name)
? useCm.get(region) || [200, 200, 200]
: [255, 255, 255]
if (!returnVal[ngId]) {
returnVal[ngId] = {}
}
......
......@@ -7,6 +7,7 @@ import { selectorAuxMeshes } from "../store";
import { LayerCtrlEffects } from "../layerCtrl.service/layerCtrl.effects";
import { atlasSelection } from "src/state";
import { BaseService } from "../base.service/base.service";
import { IDS } from "src/atlasComponents/sapi"
/**
* control mesh loading etc
......@@ -126,8 +127,21 @@ export class NehubaMeshService implements OnDestroy {
this.#allSegmentMeshes$,
this.#selectedSegmentMeshes$,
this.#auxMesh$,
this.store$.pipe(
select(atlasSelection.selectors.selectedTemplate)
),
this.store$.pipe(
select(atlasSelection.selectors.selectedParcellation)
)
]).pipe(
switchMap(([ allSegMesh, selectedSegMesh, auxmesh ]) => {
switchMap(([ allSegMesh, selectedSegMesh, auxmesh, selectedTemplate, selectedParcellation ]) => {
/**
* TODO monkey patching jba29 in colin to show all meshes
*
*/
if (selectedParcellation.id === IDS.PARCELLATION.JBA29 && selectedTemplate.id === IDS.TEMPLATES.COLIN27) {
return of(...allSegMesh)
}
const hasSegSelected = selectedSegMesh.some(v => v.labelIndicies.length !== 0)
const hasAuxMesh = auxmesh.length > 0
const meshesToLoad: IMeshesToLoad[] = []
......
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