diff --git a/docs/releases/v2.5.2.md b/docs/releases/v2.5.2.md new file mode 100644 index 0000000000000000000000000000000000000000..200aab57206daa94f58fa4a931e1081adf72380b --- /dev/null +++ b/docs/releases/v2.5.2.md @@ -0,0 +1,5 @@ +# v2.5.2 + +## Bugfixes + +- fix big brain high resolution maps \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 80ad8c9d6d9c41957994b8138aeb124132e78e2e..b7e247316f838021293df1ef5f887cc486abef56 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -40,6 +40,7 @@ pages: - Fetching datasets: 'advanced/datasets.md' - Display non-atlas volumes: 'advanced/otherVolumes.md' - Release notes: + - v2.5.2: 'releases/v2.5.2.md' - v2.5.1: 'releases/v2.5.1.md' - v2.5.0: 'releases/v2.5.0.md' - v2.4.8: 'releases/v2.4.8.md' diff --git a/src/util/patchPureConstants.ts b/src/util/patchPureConstants.ts index 55ff455615c145c59ac2906fba55625fabdf6d1a..681860add48b6393c202f3377f7afc217acd1682 100644 --- a/src/util/patchPureConstants.ts +++ b/src/util/patchPureConstants.ts @@ -46,25 +46,21 @@ async function getInterpolatedPatchObj(targetName: string, labelIndex: number){ '@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588' }], "payload": { - "volumeSrc": { - 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588': { - "collect": [{ - "@type": "fzj/tmp/volume_type/v0.0.1" as const, - "@id": "fzj/tmp/volume_type/v0.0.1/interpolated", - "name": "Julich Brain v2.5 interpolated map", - "volume_type": "neuroglancer/precomputed" as const, - "url": "https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas", - "detail": { - "neuroglancer/precomputed": { - "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' - }] - } - } + _dataset_specs: [{ + "@type": "fzj/tmp/volume_type/v0.0.1" as const, + "@id": "fzj/tmp/volume_type/v0.0.1/interpolated", + "name": "Julich Brain v2.5 interpolated map", + "volume_type": "neuroglancer/precomputed" as const, + "url": "https://neuroglancer.humanbrainproject.org/precomputed/BigBrainRelease.2015/2019_05_22_interpolated_areas", + "detail": { + "neuroglancer/precomputed": { + "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' + }], } } const hex = await getShaDigest(JSON.stringify(returnObj)) @@ -78,9 +74,9 @@ async function getIndividualMap(parentName: string, regionName: string, url: str const volumeId = await getShaDigest(url) const returnObj: TPatchRegion = { '@id': '', - "@type": 'julich/siibra/append-region/v0.0.1', - "parent": { - "name": parentName + "@type": 'julich/siibra/patch-region/v0.0.1', + "target": { + "name": regionName }, "targetParcellation": [{ "@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 '@id': 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588' }], "payload": { - "name": regionName, - "volumeSrc": { - 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588': { - "collect": [{ - "@type": "fzj/tmp/volume_type/v0.0.1" as const, - "@id": `fzj/tmp/volume_type/v0.0.1/${volumeId}`, - "name": "Julich Brain v2.5 detailed map", - "volume_type": "neuroglancer/precomputed" as const, - "url": url, - "detail": { - "neuroglancer/precomputed": { - "labelIndex": labelIndex, - "transform": transform - } - }, - space_id: 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588', - map_type: 'labelled' - }] - } - } + '_dataset_specs': [{ + "@type": "fzj/tmp/volume_type/v0.0.1" as const, + "@id": `fzj/tmp/volume_type/v0.0.1/${volumeId}`, + "name": "Julich Brain v2.5 detailed map", + "volume_type": "neuroglancer/precomputed" as const, + "url": url, + "detail": { + "neuroglancer/precomputed": { + "labelIndex": labelIndex, + "transform": transform + } + }, + space_id: 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588', + map_type: 'labelled' + }], } } const hex = await getShaDigest(JSON.stringify(returnObj)) diff --git a/src/util/pureConstant.service.ts b/src/util/pureConstant.service.ts index 09b2e1898137bcedd28fd9a0f3181d17b6d32778..74a1280e039ff583e2d75cd94334916bb5a94ad9 100644 --- a/src/util/pureConstant.service.ts +++ b/src/util/pureConstant.service.ts @@ -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 * in the case of interpolated, it sucks that the ngLayerObj will be set multiple times */ - if ( - tmpl.id in (region.volumeSrc || {}) - && 'collect' in region.volumeSrc[tmpl.id] - ) { - const dedicatedMap = region.volumeSrc[tmpl.id]['collect'].filter(v => v.volume_type === 'neuroglancer/precomputed') - if (dedicatedMap.length === 1) { - const ngId = getNgId(atlas['@id'], tmpl.id, parc.id, dedicatedMap[0]['@id']) - region['ngId'] = ngId - region['labelIndex'] = dedicatedMap[0].detail['neuroglancer/precomputed'].labelIndex - ngLayerObj[tmpl.id][ngId] = { - source: `precomputed://${dedicatedMap[0].url}`, - type: "segmentation", - transform: dedicatedMap[0].detail['neuroglancer/precomputed'].transform - } + + const dedicatedMap = region._dataset_specs.filter(spec => spec.space_id === tmpl.id && spec['volume_type'] === 'neuroglancer/precomputed') + if (dedicatedMap.length === 1) { + const ngId = getNgId(atlas['@id'], tmpl.id, parc.id, dedicatedMap[0]['@id']) + region['ngId'] = ngId + region['labelIndex'] = dedicatedMap[0].detail['neuroglancer/precomputed'].labelIndex + ngLayerObj[tmpl.id][ngId] = { + 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}" && hemisphereKey === 'whole brain' ) { region.children = [] - return } - const hemispheredNgId = getNgId(atlas['@id'], tmpl.id, parc.id, hemisphereKey) - region['ngId'] = hemispheredNgId + if (!region['ngId']) { + const hemispheredNgId = getNgId(atlas['@id'], tmpl.id, parc.id, hemisphereKey) + region['ngId'] = hemispheredNgId + } } } ) diff --git a/src/util/siibraApiConstants/types.ts b/src/util/siibraApiConstants/types.ts index 62fc6057d749a4123da76bcce3bf2d6b2fd738be..7f3170ad6f7f665ba13202a833b7342f86d36037 100644 --- a/src/util/siibraApiConstants/types.ts +++ b/src/util/siibraApiConstants/types.ts @@ -180,11 +180,6 @@ export type TRegionDetail = { export type TRegion = { name: string children: TRegion[] - volumeSrc: { - [key: string]: { - [key: string]: TVolumeSrc<keyof IVolumeTypeDetail>[] - } - } labelIndex?: number rgb?: number[] @@ -192,6 +187,8 @@ export type TRegion = { kg: TKgIdentifier } + _dataset_specs: TVolumeSrc<keyof IVolumeTypeDetail>[] + /** * missing */