diff --git a/deploy/datasets/query.js b/deploy/datasets/query.js index 13653b44e2242773e4fdb45f54fc82912a660354..51b03194c0b55a0cf4863d389ee01fbbee224264 100644 --- a/deploy/datasets/query.js +++ b/deploy/datasets/query.js @@ -2,6 +2,7 @@ const fs = require('fs') const request = require('request') const path = require('path') const { getPreviewFile, hasPreview } = require('./supplements/previewFile') +const { manualFilter: manualFilterDWM, manualMap: manualMapDWM } = require('./supplements/util/mapDwm') const kgQueryUtil = require('./../auth/util') @@ -137,18 +138,19 @@ const filter = (datasets = [], {templateName, parcellationName}) => datasets return ds.referenceSpaces.some(rs => rs.name === templateName) } if (parcellationName) { + if (parcellationName === 'Fibre Bundle Atlas - Long Bundle'){ + return manualFilterDWM(ds) + } return ds.parcellationRegion.length > 0 ? filterByPRs( ds.parcellationRegion, parcellationName === 'JuBrain Cytoarchitectonic Atlas' && juBrain ? juBrain - : parcellationName === 'Fibre Bundle Atlas - Long Bundle' && longBundle - ? longBundle - : parcellationName === 'Fibre Bundle Atlas - Short Bundle' && shortBundle - ? shortBundle - : parcellationName === 'Waxholm Space rat brain atlas v.2.0' - ? waxholm - : null + : parcellationName === 'Fibre Bundle Atlas - Short Bundle' && shortBundle + ? shortBundle + : parcellationName === 'Waxholm Space rat brain atlas v.2.0' + ? waxholm + : null ) : manualFilter({ parcellationName, dataset: ds }) } @@ -156,6 +158,9 @@ const filter = (datasets = [], {templateName, parcellationName}) => datasets return false }) .map(ds => { + if (parcellationName && parcellationName === 'Fibre Bundle Atlas - Long Bundle') { + return manualMapDWM(ds) + } return { ...ds, ...parcellationName && ds.parcellationRegion.length === 0 diff --git a/deploy/datasets/supplements/data/pmapDWMPreview.json b/deploy/datasets/supplements/data/pmapDWMPreview.json new file mode 100644 index 0000000000000000000000000000000000000000..447b0ac57c1350d9e61702196febc20b592186d0 --- /dev/null +++ b/deploy/datasets/supplements/data/pmapDWMPreview.json @@ -0,0 +1 @@ +[["Probabilistic map of the anterior segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate_Anterior - Left","name":"Probabilistic Map for Arcuate_Anterior - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate_Anterior - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Arcuate_Anterior_Left.nii"}]],["Probabilistic map of the direct segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate - Left","name":"Probabilistic Map for Arcuate - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Arcuate_Left.nii"}]],["Probabilistic map of the posterior segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate_Posterior - Left","name":"Probabilistic Map for Arcuate_Posterior - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate_Posterior - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Arcuate_Posterior_Left.nii"}]],["Probabilistic map of the left long cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Long - Left","name":"Probabilistic Map for Cingulum_Long - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Long - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Cingulum_Long_Left.nii"}]],["Probabilistic map of the left short cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Short - Left","name":"Probabilistic Map for Cingulum_Short - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Short - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Cingulum_Short_Left.nii"}]],["Probabilistic map of the left temporal cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Temporal - Left","name":"Probabilistic Map for Cingulum_Temporal - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Temporal - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Cingulum_Temporal_Left.nii"}]],["Probabilistic map of the left corticospinal tract (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for CorticoSpinalTract - Left","name":"Probabilistic Map for CorticoSpinalTract - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"CorticoSpinalTract - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/CorticoSpinalTract_Left.nii"}]],["Probabilistic map of the left fornix (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Fornix - Left","name":"Probabilistic Map for Fornix - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Fornix - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Fornix_Left.nii"}]],["Probabilistic map of the left inferior fronto-occipital fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for InferiorFrontoOccipital - Left","name":"Probabilistic Map for InferiorFrontoOccipital - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"InferiorFrontoOccipital - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/InferiorFrontoOccipital_Left.nii"}]],["Probabilistic map of the left inferior longitudinal fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for InferiorLongitudinal - Left","name":"Probabilistic Map for InferiorLongitudinal - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"InferiorLongitudinal - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/InferiorLongitudinal_Left.nii"}]],["Probabilistic map of the left uncinate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Uncinate - Left","name":"Probabilistic Map for Uncinate - Left","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Uncinate - Left","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/left-hemisphere/Probability_Maps/Uncinate_Left.nii"}]],["Probabilistic map of the anterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate_Anterior - Right","name":"Probabilistic Map for Arcuate_Anterior - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate_Anterior - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Arcuate_Anterior_Right.nii"}]],["Probabilistic map of the posterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate_Posterior - Right","name":"Probabilistic Map for Arcuate_Posterior - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate_Posterior - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Arcuate_Posterior_Right.nii"}]],["Probabilistic map of the posterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Arcuate - Right","name":"Probabilistic Map for Arcuate - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Arcuate - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Arcuate_Right.nii"}]],["Probabilistic map of the right long cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Long - Right","name":"Probabilistic Map for Cingulum_Long - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Long - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Cingulum_Long_Right.nii"}]],["Probabilistic map of the right short cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Short - Right","name":"Probabilistic Map for Cingulum_Short - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Short - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Cingulum_Short_Right.nii"}]],["Probabilistic map of the right temporal cingulate fibres (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Cingulum_Temporal - Right","name":"Probabilistic Map for Cingulum_Temporal - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Cingulum_Temporal - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Cingulum_Temporal_Right.nii"}]],["Probabilistic map of the right corticospinal tract (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for CorticoSpinalTract - Right","name":"Probabilistic Map for CorticoSpinalTract - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"CorticoSpinalTract - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/CorticoSpinalTract_Right.nii"}]],["Probabilistic map of the right fornix (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Fornix - Right","name":"Probabilistic Map for Fornix - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Fornix - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Fornix_Right.nii"}]],["Probabilistic map of the right inferior fronto-occipital fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for InferiorFrontoOccipital - Right","name":"Probabilistic Map for InferiorFrontoOccipital - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"InferiorFrontoOccipital - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/InferiorFrontoOccipital_Right.nii"}]],["Probabilistic map of the right inferior longitudinal fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for InferiorLongitudinal - Right","name":"Probabilistic Map for InferiorLongitudinal - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"InferiorLongitudinal - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/InferiorLongitudinal_Right.nii"}]],["Probabilistic map of the right uncinate fasciculus (atlas of deep white matter fibre bundles, version 2018)",[{"filename":"Probabilistic Map for Uncinate - Right","name":"Probabilistic Map for Uncinate - Right","mimetype":"application/nifti","properties":{"name":null,"description":"","publications":[{"doi":"https://10.1016/j.neuroimage.2012.02.071","citation":"Guevara, P., Duclap, D., Poupon, C., Marrakchi-Kacem, L., Fillard, P., Le Bihan, D., Leboyer, M., Houenou, J., Mangin, J.- F (2012). Automatic fiber bundle segmentation in massive tractography datasets using a multi-subject bundle atlas. NeuroImage, 61(4),1083-99."}],"associatedRegion":"Uncinate - Right","associatedParcellation":"Fibre Bundle Atlas - Long Bundle","datasetInfo":"MNIColin27_PMap.json"},"url":"https://neuroglancer.humanbrainproject.org/precomputed/Fiber_Bundle/DWM_atlas/right-hemisphere/Probability_Maps/Uncinate_Right.nii"}]]] \ No newline at end of file diff --git a/deploy/datasets/supplements/previewFile.js b/deploy/datasets/supplements/previewFile.js index a8c7bd90c42342bf56f2cbc83ec6c52e4493750f..133f7842cd0f3b704b70ea9bf9f6acd9c6256159 100644 --- a/deploy/datasets/supplements/previewFile.js +++ b/deploy/datasets/supplements/previewFile.js @@ -3,14 +3,17 @@ const path = require('path') const DISABLE_RECEPTOR_PREVIEW = process.env.DISABLE_RECEPTOR_PREVIEW const DISABLE_JUBRAIN_PMAP = process.env.DISABLE_JUBRAIN_PMAP +const DISABLE_DWM_PMAP = process.env.DISABLE_DWM_PMAP let previewMap = new Map(), previewMapKeySet = new Set() const readFile = (filename) => new Promise((resolve) => { fs.readFile(path.join(__dirname, 'data', filename), 'utf-8', (err, data) => { - if (err) - throw err + if (err){ + console.log('read file error', err) + return resolve([]) + } resolve(JSON.parse(data)) }) }) @@ -18,6 +21,7 @@ const readFile = (filename) => new Promise((resolve) => { Promise.all([ DISABLE_RECEPTOR_PREVIEW ? Promise.resolve([]) : readFile('receptorPreview.json'), DISABLE_JUBRAIN_PMAP ? Promise.resolve([]) : readFile('pmapJubrainPreview.json'), + DISABLE_DWM_PMAP ? Promise.resolve([]) : readFile('pmapDWMPreview.json') ]) .then(arrOfA => arrOfA.reduce((acc, item) => acc.concat(item), [])) .then(iterable => { diff --git a/deploy/datasets/supplements/util/mapDwm.js b/deploy/datasets/supplements/util/mapDwm.js new file mode 100644 index 0000000000000000000000000000000000000000..b9cda2f1143970a66397c5572c7fbf991ddb96bd --- /dev/null +++ b/deploy/datasets/supplements/util/mapDwm.js @@ -0,0 +1,69 @@ +exports.manualFilter = (dataset) => dataset + && dataset.project + && dataset.project instanceof Array + && dataset.project.some(p => p === 'Atlas of deep white matter fibre bundles, version 2018') + +const dict = [ [ 'Probabilistic map of the anterior segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate_Anterior - Left' ], +[ 'Probabilistic map of the direct segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate - Left' ], +[ 'Probabilistic map of the posterior segment of the left arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate_Posterior - Left' ], +[ 'Probabilistic map of the left long cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Long - Left' ], +[ 'Probabilistic map of the left short cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Short - Left' ], +[ 'Probabilistic map of the left temporal cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Temporal - Left' ], +[ 'Probabilistic map of the left corticospinal tract (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/CorticoSpinalTract - Left' ], +[ 'Probabilistic map of the left fornix (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Fornix - Left' ], +[ 'Probabilistic map of the left inferior fronto-occipital fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/InferiorFrontoOccipital - Left' ], +[ 'Probabilistic map of the left inferior longitudinal fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/InferiorLongitudinal - Left' ], +[ 'Probabilistic map of the left uncinate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Uncinate - Left' ], +[ 'Probabilistic map of the anterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate_Anterior - Right' ], +[ 'Probabilistic map of the posterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate_Posterior - Right' ], +[ 'Probabilistic map of the posterior segment of the right arcuate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Arcuate - Right' ], +[ 'Probabilistic map of the right long cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Long - Right' ], +[ 'Probabilistic map of the right short cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Short - Right' ], +[ 'Probabilistic map of the right temporal cingulate fibres (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Cingulum_Temporal - Right' ], +[ 'Probabilistic map of the right corticospinal tract (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/CorticoSpinalTract - Right' ], +[ 'Probabilistic map of the right fornix (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Fornix - Right' ], +[ 'Probabilistic map of the right inferior fronto-occipital fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/InferiorFrontoOccipital - Right' ], +[ 'Probabilistic map of the right inferior longitudinal fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/InferiorLongitudinal - Right' ], +[ 'Probabilistic map of the right uncinate fasciculus (atlas of deep white matter fibre bundles, version 2018)', +'Fibre Bundle Atlas - Long Bundle/Uncinate - Right' ] ] + +const dsNameToIdMap = new Map(dict) +const getIdFromDataset = (dataset) => { + const id = dsNameToIdMap.get(dataset.name) + if (id) return id + return null +} + +exports.manualMap = (dataset) => { + return { + preview: !process.env.DISABLE_DWM_PMAP, + ...dataset, + parcellationRegion: dataset.parcellationRegion.map(r => { + return { + ...r, + id: getIdFromDataset(dataset) + } + }) + } +} \ No newline at end of file diff --git a/src/services/state/dataStore.store.ts b/src/services/state/dataStore.store.ts index 1534b0232f4cc91b11420c8661cc920f334df22d..d5064be7807bc280dd3f9c879d57b37a62503f28 100644 --- a/src/services/state/dataStore.store.ts +++ b/src/services/state/dataStore.store.ts @@ -65,6 +65,7 @@ export interface DataEntry{ } export interface ParcellationRegion { + id?: string name: string } diff --git a/src/ui/databrowserModule/databrowser/databrowser.component.ts b/src/ui/databrowserModule/databrowser/databrowser.component.ts index 603340f20805e3fc0772890280ee38fa49e5e229..fc5db32aa7dde4cbaa505054cfdeb04ab697bb7e 100644 --- a/src/ui/databrowserModule/databrowser/databrowser.component.ts +++ b/src/ui/databrowserModule/databrowser/databrowser.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core"; +import { Component, OnDestroy, OnInit, ViewChild, Input } from "@angular/core"; import { DataEntry } from "src/services/stateStore.service"; import { Subscription, merge } from "rxjs"; import { DatabrowserService, CountedDataModality } from "../databrowser.service"; @@ -14,8 +14,13 @@ import { ModalityPicker } from "../modalityPicker/modalityPicker.component"; export class DataBrowser implements OnDestroy,OnInit{ + @Input() public regions: any[] = [] + + @Input() public template: any + + @Input() public parcellation: any public dataentries: DataEntry[] = [] @@ -55,6 +60,15 @@ export class DataBrowser implements OnDestroy,OnInit{ ngOnInit(){ + this.regions = this.regions.map(r => { + /** + * TODO to be replaced with properly region UUIDs from KG + */ + return { + id: `${this.parcellation.name}/${r.name}`, + ...r + } + }) const { regions, parcellation, template } = this this.fetchingFlag = true this.dbService.getDataByRegion({ regions, parcellation, template }) diff --git a/src/ui/databrowserModule/util/filterDataEntriesByRegion.pipe.ts b/src/ui/databrowserModule/util/filterDataEntriesByRegion.pipe.ts index 9c6208dcf613643f7618dcb3379a12a49de85c1c..795259fc91966841206768cf2d4f7e676a2b841e 100644 --- a/src/ui/databrowserModule/util/filterDataEntriesByRegion.pipe.ts +++ b/src/ui/databrowserModule/util/filterDataEntriesByRegion.pipe.ts @@ -10,6 +10,9 @@ export class FilterDataEntriesByRegion implements PipeTransform{ return dataentries && selectedRegions && selectedRegions.length > 0 ? dataentries.filter(de => de.parcellationRegion.some(pr => { + if (pr.id && selectedRegions.some(r => r.id === pr.id)) { + return true + } /** * TODO: temporary hack, some dataset region name is not exactly the same as region