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

bugfix: big brain high res map

parent d0b28ef2
No related branches found
No related tags found
No related merge requests found
# v2.5.2
## Bugfixes
- fix big brain high resolution maps
\ No newline at end of file
...@@ -40,6 +40,7 @@ pages: ...@@ -40,6 +40,7 @@ pages:
- Fetching datasets: 'advanced/datasets.md' - Fetching datasets: 'advanced/datasets.md'
- Display non-atlas volumes: 'advanced/otherVolumes.md' - Display non-atlas volumes: 'advanced/otherVolumes.md'
- Release notes: - Release notes:
- v2.5.2: 'releases/v2.5.2.md'
- v2.5.1: 'releases/v2.5.1.md' - v2.5.1: 'releases/v2.5.1.md'
- v2.5.0: 'releases/v2.5.0.md' - v2.5.0: 'releases/v2.5.0.md'
- v2.4.8: 'releases/v2.4.8.md' - v2.4.8: 'releases/v2.4.8.md'
......
...@@ -46,25 +46,21 @@ async function getInterpolatedPatchObj(targetName: string, labelIndex: number){ ...@@ -46,25 +46,21 @@ async function getInterpolatedPatchObj(targetName: string, labelIndex: number){
'@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588' '@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588'
}], }],
"payload": { "payload": {
"volumeSrc": { _dataset_specs: [{
'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588': { "@type": "fzj/tmp/volume_type/v0.0.1" as const,
"collect": [{ "@id": "fzj/tmp/volume_type/v0.0.1/interpolated",
"@type": "fzj/tmp/volume_type/v0.0.1" as const, "name": "Julich Brain v2.5 interpolated map",
"@id": "fzj/tmp/volume_type/v0.0.1/interpolated", "volume_type": "neuroglancer/precomputed" as const,
"name": "Julich Brain v2.5 interpolated map", "url": "https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas",
"volume_type": "neuroglancer/precomputed" as const, "detail": {
"url": "https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas", "neuroglancer/precomputed": {
"detail": { "labelIndex": labelIndex,
"neuroglancer/precomputed": { "transform": [[1,0,0,-70677184],[0,1,0,-51990000],[0,0,1,-58788284],[0,0,0,1]]
"labelIndex": labelIndex, }
"transform": [[1,0,0,-70677184],[0,1,0,-51990000],[0,0,1,-58788284],[0,0,0,1]] },
} "space_id": "minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588",
}, map_type: 'labelled'
"space_id": "minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588", }],
map_type: 'labelled'
}]
}
}
} }
} }
const hex = await getShaDigest(JSON.stringify(returnObj)) const hex = await getShaDigest(JSON.stringify(returnObj))
...@@ -78,9 +74,9 @@ async function getIndividualMap(parentName: string, regionName: string, url: str ...@@ -78,9 +74,9 @@ async function getIndividualMap(parentName: string, regionName: string, url: str
const volumeId = await getShaDigest(url) const volumeId = await getShaDigest(url)
const returnObj: TPatchRegion = { const returnObj: TPatchRegion = {
'@id': '', '@id': '',
"@type": 'julich/siibra/append-region/v0.0.1', "@type": 'julich/siibra/patch-region/v0.0.1',
"parent": { "target": {
"name": parentName "name": regionName
}, },
"targetParcellation": [{ "targetParcellation": [{
"@id": 'minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-290' "@id": 'minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-290'
...@@ -89,26 +85,21 @@ async function getIndividualMap(parentName: string, regionName: string, url: str ...@@ -89,26 +85,21 @@ async function getIndividualMap(parentName: string, regionName: string, url: str
'@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588' '@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588'
}], }],
"payload": { "payload": {
"name": regionName, '_dataset_specs': [{
"volumeSrc": { "@type": "fzj/tmp/volume_type/v0.0.1" as const,
'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588': { "@id": `fzj/tmp/volume_type/v0.0.1/${volumeId}`,
"collect": [{ "name": "Julich Brain v2.5 detailed map",
"@type": "fzj/tmp/volume_type/v0.0.1" as const, "volume_type": "neuroglancer/precomputed" as const,
"@id": `fzj/tmp/volume_type/v0.0.1/${volumeId}`, "url": url,
"name": "Julich Brain v2.5 detailed map", "detail": {
"volume_type": "neuroglancer/precomputed" as const, "neuroglancer/precomputed": {
"url": url, "labelIndex": labelIndex,
"detail": { "transform": transform
"neuroglancer/precomputed": { }
"labelIndex": labelIndex, },
"transform": transform space_id: 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588',
} map_type: 'labelled'
}, }],
space_id: 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588',
map_type: 'labelled'
}]
}
}
} }
} }
const hex = await getShaDigest(JSON.stringify(returnObj)) const hex = await getShaDigest(JSON.stringify(returnObj))
......
...@@ -532,20 +532,16 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}" ...@@ -532,20 +532,16 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
* this should work for both fully mapped and interpolated * this should work for both fully mapped and interpolated
* in the case of interpolated, it sucks that the ngLayerObj will be set multiple times * in the case of interpolated, it sucks that the ngLayerObj will be set multiple times
*/ */
if (
tmpl.id in (region.volumeSrc || {}) const dedicatedMap = region._dataset_specs.filter(spec => spec.space_id === tmpl.id && spec['volume_type'] === 'neuroglancer/precomputed')
&& 'collect' in region.volumeSrc[tmpl.id] if (dedicatedMap.length === 1) {
) { const ngId = getNgId(atlas['@id'], tmpl.id, parc.id, dedicatedMap[0]['@id'])
const dedicatedMap = region.volumeSrc[tmpl.id]['collect'].filter(v => v.volume_type === 'neuroglancer/precomputed') region['ngId'] = ngId
if (dedicatedMap.length === 1) { region['labelIndex'] = dedicatedMap[0].detail['neuroglancer/precomputed'].labelIndex
const ngId = getNgId(atlas['@id'], tmpl.id, parc.id, dedicatedMap[0]['@id']) ngLayerObj[tmpl.id][ngId] = {
region['ngId'] = ngId source: `precomputed://${dedicatedMap[0].url}`,
region['labelIndex'] = dedicatedMap[0].detail['neuroglancer/precomputed'].labelIndex type: "segmentation",
ngLayerObj[tmpl.id][ngId] = { transform: dedicatedMap[0].detail['neuroglancer/precomputed'].transform
source: `precomputed://${dedicatedMap[0].url}`,
type: "segmentation",
transform: dedicatedMap[0].detail['neuroglancer/precomputed'].transform
}
} }
} }
...@@ -579,10 +575,11 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}" ...@@ -579,10 +575,11 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
&& hemisphereKey === 'whole brain' && hemisphereKey === 'whole brain'
) { ) {
region.children = [] region.children = []
return
} }
const hemispheredNgId = getNgId(atlas['@id'], tmpl.id, parc.id, hemisphereKey) if (!region['ngId']) {
region['ngId'] = hemispheredNgId const hemispheredNgId = getNgId(atlas['@id'], tmpl.id, parc.id, hemisphereKey)
region['ngId'] = hemispheredNgId
}
} }
} }
) )
......
...@@ -180,11 +180,6 @@ export type TRegionDetail = { ...@@ -180,11 +180,6 @@ export type TRegionDetail = {
export type TRegion = { export type TRegion = {
name: string name: string
children: TRegion[] children: TRegion[]
volumeSrc: {
[key: string]: {
[key: string]: TVolumeSrc<keyof IVolumeTypeDetail>[]
}
}
labelIndex?: number labelIndex?: number
rgb?: number[] rgb?: number[]
...@@ -192,6 +187,8 @@ export type TRegion = { ...@@ -192,6 +187,8 @@ export type TRegion = {
kg: TKgIdentifier kg: TKgIdentifier
} }
_dataset_specs: TVolumeSrc<keyof IVolumeTypeDetail>[]
/** /**
* missing * missing
*/ */
......
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