Skip to content

Commit

Permalink
Merge pull request #868 from HumanBrainProject/staging
Browse files Browse the repository at this point in the history
v2.3.5
  • Loading branch information
xgui3783 authored Feb 9, 2021
2 parents 85a4eb2 + ec2ae62 commit e621665
Show file tree
Hide file tree
Showing 7 changed files with 2,315 additions and 290 deletions.
6 changes: 6 additions & 0 deletions docs/releases/v2.3.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# v2.3.5

## Under the hood stuff

- Temporarily disable Colin 27 template.
- Update to JulichBrain v2.5
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pages:
- Fetching datasets: 'advanced/datasets.md'
- Display non-atlas volumes: 'advanced/otherVolumes.md'
- Release notes:
- v2.3.5: 'releases/v2.3.5.md'
- v2.3.4: 'releases/v2.3.4.md'
- v2.3.3: 'releases/v2.3.3.md'
- v2.3.2: 'releases/v2.3.2.md'
Expand Down
2,542 changes: 2,287 additions & 255 deletions src/res/ext/MNI152.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/res/ext/MNI152NehubaConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"MNI152_V25_RIGHT_NG_SPLIT_HEMISPHERE": {
"type": "segmentation",
"visible": true,
"source": "precomputed://https://neuroglancer.humanbrainproject.eu/precomputed/data-repo/20201204_JulichBrainV3_0_hemisphereSplit/precomputed/JuBrain_Map_icbm_v30_r",
"source": "precomputed://https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo-ng-bot/JulichBrainV2_5_3/precomputed/JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_453c4c95827e38dcce5372b200065cba",
"transform": [
[
1,
Expand Down Expand Up @@ -251,7 +251,7 @@
"MNI152_V25_LEFT_NG_SPLIT_HEMISPHERE": {
"type": "segmentation",
"visible": true,
"source": "precomputed://https://neuroglancer.humanbrainproject.eu/precomputed/data-repo/20201204_JulichBrainV3_0_hemisphereSplit/precomputed/JuBrain_Map_icbm_v30_l",
"source": "precomputed://https://neuroglancer-dev.humanbrainproject.eu//precomputed/data-repo-ng-bot/JulichBrainV2_5_3/precomputed/JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_3f5ec6016bc2242769c41befdbc1b2e0",
"transform": [
[
1,
Expand Down
30 changes: 1 addition & 29 deletions src/res/ext/atlas/atlas_multiLevelHuman.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,6 @@
}
]
},
{
"@id": "minds/core/referencespace/v1.0.0/7f39f7be-445b-47c0-9791-e971c0b6d992",
"name": "MNI Colin 27",
"availableIn": [
{
"@id": "minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-25",
"name": "Cytoarchitectonic maps - v2.5"
},
{
"@id": "juelich/iav/atlas/v1.0.0/8",
"name": "Cytoarchitectonic Maps - v1.18"
}
]
},
{
"@id": "minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588",
"name": "Big Brain (Histology)",
Expand Down Expand Up @@ -102,13 +88,6 @@
"originalDatasetFormats": [{
"name": "probability map"
}]
},
{
"@id": "minds/core/referencespace/v1.0.0/7f39f7be-445b-47c0-9791-e971c0b6d992",
"name": "MNI Colin 27",
"originalDatasetFormats": [{
"name": "probability map"
}]
}
]
},
Expand Down Expand Up @@ -136,7 +115,7 @@
"@version": {
"@next": null,
"@this": "minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-25",
"name": "v2.5",
"name": "v2.6",
"@previous": "juelich/iav/atlas/v1.0.0/8"
},
"availableIn": [
Expand All @@ -146,13 +125,6 @@
"originalDatasetFormats": [{
"name": "probability map"
}]
},
{
"@id": "minds/core/referencespace/v1.0.0/7f39f7be-445b-47c0-9791-e971c0b6d992",
"name": "MNI Colin 27",
"originalDatasetFormats": [{
"name": "probability map"
}]
}
]
},
Expand Down
10 changes: 8 additions & 2 deletions src/ui/parcellationRegion/region.base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,22 @@ const getRegionInOtherTemplateSelectorBundle = (version: EnumParcRegVersion) =>
describe('> region.base.ts', () => {
describe('> regionInOtherTemplateSelector', () => {

// TODO
it('> only selects region in the template specified by selected atlas')

for (const enumKey of Object.keys(EnumParcRegVersion)) {
describe(`> selector version for ${enumKey}`, () => {

const { mockFetchedTemplates, mr0, mt2, mt0, mp0, mt1, mp1h, mr0lh, mt3, mr0rh } = getRegionInOtherTemplateSelectorBundle(enumKey as EnumParcRegVersion)

let selectedAtlas = {
templateSpaces: mockFetchedTemplates
}
describe('> no hemisphere selected, simulates big brain cyto map', () => {

let result: any[]
beforeAll(() => {
result = regionInOtherTemplateSelector.projector(mockFetchedTemplates, mt0, { region: mr0 })
result = regionInOtherTemplateSelector.projector(selectedAtlas, mockFetchedTemplates, mt0, { region: mr0 })
})

it('> length checks out', () => {
Expand Down Expand Up @@ -409,7 +415,7 @@ describe('> region.base.ts', () => {
describe('> hemisphere data selected (left hemisphere), simulates julich-brain in mni152', () => {
let result
beforeAll(() => {
result = regionInOtherTemplateSelector.projector(mockFetchedTemplates, mt2, { region: mr0lh })
result = regionInOtherTemplateSelector.projector(selectedAtlas, mockFetchedTemplates, mt2, { region: mr0lh })
})

it('> length checks out', () => {
Expand Down
12 changes: 10 additions & 2 deletions src/ui/parcellationRegion/region.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ export class RenderViewOriginDatasetLabelPipe implements PipeTransform{
}

export const regionInOtherTemplateSelector = createSelector(
viewerStateGetSelectedAtlas,
viewerStateFetchedTemplatesSelector,
viewerStateSelectedTemplateSelector,
(fetchedTemplates, templateSelected, prop) => {
(atlas, fetchedTemplates, templateSelected, prop) => {
const atlasTemplateSpacesIds = atlas.templateSpaces.map(({ ['@id']: id, fullId }) => id || fullId)
const { region: regionOfInterest } = prop
const returnArr = []

Expand All @@ -268,7 +270,13 @@ export const regionInOtherTemplateSelector = createSelector(
const regionOfInterestId = getIdFromFullId(regionOfInterest.fullId)
if (!templateSelected) return []
const selectedTemplateId = getIdFromFullId(templateSelected.fullId)
const otherTemplates = fetchedTemplates.filter(({ fullId }) => getIdFromFullId(fullId) !== selectedTemplateId)

// need to ensure that the templates are defined in atlas definition
// atlas is the single source of truth

const otherTemplates = fetchedTemplates
.filter(({ fullId }) => getIdFromFullId(fullId) !== selectedTemplateId)
.filter(({ ['@id']: id, fullId }) => atlasTemplateSpacesIds.includes(id || fullId))
for (const template of otherTemplates) {
for (const parcellation of template.parcellations) {
const flattenedRegions = flattenRegions(parcellation.regions)
Expand Down

0 comments on commit e621665

Please sign in to comment.