Skip to content
Snippets Groups Projects
Unverified Commit 8710ec7d authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #865 from HumanBrainProject/hotfix_disableColin

hotfix: temporarily disable colin 27
parents 5cd97c37 b8099e69
No related branches found
No related tags found
No related merge requests found
# v2.3.5
## Under the hood stuff
- Temporarily disable Colin 27 template.
\ No newline at end of file
......@@ -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'
......
......@@ -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)",
......@@ -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"
}]
}
]
},
......@@ -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"
}]
}
]
},
......
......@@ -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', () => {
......@@ -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', () => {
......
......@@ -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 = []
......@@ -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)
......
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