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

chore update to big brain fetching logic

parent 70702f3f
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,7 @@ const populateSet = (flattenedRegions, set = new Set()) => { ...@@ -73,6 +73,7 @@ const populateSet = (flattenedRegions, set = new Set()) => {
const initPrArray = [] const initPrArray = []
let juBrainSet = new Set(), let juBrainSet = new Set(),
bigbrainCytoSet = new Set()
shortBundleSet = new Set(), shortBundleSet = new Set(),
longBundleSet = new Set(), longBundleSet = new Set(),
waxholm1Set = new Set(), waxholm1Set = new Set(),
...@@ -81,6 +82,16 @@ let juBrainSet = new Set(), ...@@ -81,6 +82,16 @@ let juBrainSet = new Set(),
allen2015Set = new Set(), allen2015Set = new Set(),
allen2017Set = new Set() allen2017Set = new Set()
initPrArray.push(
readConfigFile('bigbrain.json')
.then(data => JSON.parse(data))
.then(json => {
const bigbrainCyto = flattenArray(json.parcellations.find(({ name }) => name === 'Cytoarchitectonic Maps').regions)
bigbrainCytoSet = populateSet(bigbrainCyto)
})
.catch(console.error)
)
initPrArray.push( initPrArray.push(
readConfigFile('MNI152.json') readConfigFile('MNI152.json')
.then(data => JSON.parse(data)) .then(data => JSON.parse(data))
...@@ -200,6 +211,9 @@ const filterDataset = async (dataset = null, { templateName, parcellationName }) ...@@ -200,6 +211,9 @@ const filterDataset = async (dataset = null, { templateName, parcellationName })
let overwriteParcellationName let overwriteParcellationName
switch (parcellationName) { switch (parcellationName) {
case 'Cytoarchitectonic Maps': case 'Cytoarchitectonic Maps':
useSet = bigbrainCytoSet
overwriteParcellationName = 'Jülich Cytoarchitechtonic Brain Atlas (human)'
break;
case 'JuBrain Cytoarchitectonic Atlas': case 'JuBrain Cytoarchitectonic Atlas':
useSet = juBrainSet useSet = juBrainSet
overwriteParcellationName = 'Jülich Cytoarchitechtonic Brain Atlas (human)' overwriteParcellationName = 'Jülich Cytoarchitechtonic Brain Atlas (human)'
......
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