diff --git a/deploy/csp/index.js b/deploy/csp/index.js index 23deb8495200643408dcd388732f22c0144947f9..ae946653be0b818399215f0c2fc06cb2e0073aa7 100644 --- a/deploy/csp/index.js +++ b/deploy/csp/index.js @@ -120,7 +120,7 @@ module.exports = (app) => { 'unpkg.com/react@16/umd/', // plugin load external lib -> react 'unpkg.com/kg-dataset-previewer@1.2.0/', // preview component 'cdnjs.cloudflare.com/ajax/libs/mathjax/', // math jax - 'https://unpkg.com/three-surfer@0.0.5/dist/bundle.js', // for threeSurfer (freesurfer support in browser) + 'https://unpkg.com/three-surfer@0.0.7/dist/bundle.js', // for threeSurfer (freesurfer support in browser) (req, res) => res.locals.nonce ? `'nonce-${res.locals.nonce}'` : null, ...SCRIPT_SRC, ...WHITE_LIST_SRC, diff --git a/src/index.html b/src/index.html index a1df7bb2632c13eb82c0b1537111cd2c935fff8c..aa495bad570c20f81d16066c51296279a1f58dbb 100644 --- a/src/index.html +++ b/src/index.html @@ -14,7 +14,7 @@ <script src="https://unpkg.com/kg-dataset-previewer@1.2.0/dist/kg-dataset-previewer/kg-dataset-previewer.js" defer> </script> - <script src="https://unpkg.com/three-surfer@0.0.5/dist/bundle.js" defer></script> + <script src="https://unpkg.com/three-surfer@0.0.7/dist/bundle.js" defer></script> <title>Interactive Atlas Viewer</title> <script type="application/ld+json"> diff --git a/src/res/ext/freesurfer.json b/src/res/ext/freesurfer.json index 375f315742168745de2669c6b039c5965ece4aae..a9bae8dd38ff2fc2da411699d2110df2dc4049ad 100644 --- a/src/res/ext/freesurfer.json +++ b/src/res/ext/freesurfer.json @@ -15,9 +15,60 @@ "label_bv_hcp32k_lh": "https://neuroglancer.humanbrainproject.eu/precomputed/freesurfer/20210305/julichbrain_labels/lh.JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_83fb39b2811305777db0eb80a0fc8b53.allSub_RF_ANTs_MNI152_orig_to_hcp32k.gii", "label_bv_hcp32k_rh": "https://neuroglancer.humanbrainproject.eu/precomputed/freesurfer/20210305/julichbrain_labels/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.allSub_RF_ANTs_MNI152_orig_to_hcp32k.gii", "label_ants_hcp32k_lh": "https://neuroglancer.humanbrainproject.eu/precomputed/freesurfer/20210305/julichbrain_labels/lh.JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_83fb39b2811305777db0eb80a0fc8b53.BV_MNI152_orig_to_hcp32k.gii", - "label_ants_hcp32k_rh": "https://neuroglancer.humanbrainproject.eu/precomputed/freesurfer/20210305/julichbrain_labels/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.BV_MNI152_orig_to_hcp32k.gii" + "label_ants_hcp32k_rh": "https://neuroglancer.humanbrainproject.eu/precomputed/freesurfer/20210305/julichbrain_labels/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.BV_MNI152_orig_to_hcp32k.gii", + "label_fsaverage6_cleaned_lh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/lh.JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_83fb39b2811305777db0eb80a0fc8b53.BV_MNI152_orig_to_fsaverage6_cleaned.gii", + "label_fsaverage_cleaned_lh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/lh.JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_83fb39b2811305777db0eb80a0fc8b53.BV_MNI152_orig_to_fsaverage_cleaned.gii", + "label_hcp32k_cleaned_lh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/lh.JulichBrain_MPMAtlas_l_N10_nlin2Stdicbm152asym2009c_publicDOI_83fb39b2811305777db0eb80a0fc8b53.BV_MNI152_orig_to_hcp32k_cleaned.gii", + "label_fsaverage6_cleaned_rh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.BV_MNI152_orig_to_fsaverage6_cleaned.gii", + "label_fsaverage_cleaned_rh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.BV_MNI152_orig_to_fsaverage_cleaned.gii", + "label_hcp32k_cleaned_rh":"https://neuroglancer-dev.humanbrainproject.eu/precomputed/data-repo/20210415-new-freesurfer/rh.JulichBrain_MPMAtlas_r_N10_nlin2Stdicbm152asym2009c_publicDOI_172e93a5bec140c111ac862268f0d046.BV_MNI152_orig_to_hcp32k_cleaned.gii" }, "modes": [ + { + "name": "cleaned/fsaverage6/pial", + "meshes": [ + { + "mesh": "rootUrl:fsa_fsa6:/lh.pial.gii", + "colormap": "label_fsaverage6_cleaned_lh:", + "hemisphere": "left" + }, + { + "mesh": "rootUrl:fsa_fsa6:/rh.pial.gii", + "colormap": "label_fsaverage6_cleaned_rh:", + "hemisphere": "right" + } + ] + }, + { + "name": "cleaned/fsaverage/pial", + "meshes": [ + { + "mesh": "rootUrl:fsa_fsa:/lh.pial.gii", + "colormap": "label_fsaverage_cleaned_lh:", + "hemisphere": "left" + }, + { + "mesh": "rootUrl:fsa_fsa:/rh.pial.gii", + "colormap": "label_fsaverage_cleaned_rh:", + "hemisphere": "right" + } + ] + }, + { + "name": "cleaned/hcp32k/pial", + "meshes": [ + { + "mesh": "rootUrl:fsa_fsa:/lh.pial.gii", + "colormap": "label_hcp32k_cleaned_lh:", + "hemisphere": "left" + }, + { + "mesh": "rootUrl:fsa_fsa:/rh.pial.gii", + "colormap": "label_hcp32k_cleaned_rh:", + "hemisphere": "right" + } + ] + }, { "name": "fsaverage/fsaverage/pial", "meshes": [ diff --git a/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.component.ts b/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.component.ts index a77b837ca751aabe9f642c7ec330cab6ff5f3ecc..b68770f6675d0f7bec017b2ed0e22663427fb44b 100644 --- a/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.component.ts +++ b/src/viewerModule/threeSurfer/threeSurferGlue/threeSurfer.component.ts @@ -68,7 +68,11 @@ export class ThreeSurferGlueCmp implements IViewer, OnChanges, AfterViewInit, On const tsC = await this.tsRef.loadColormap( parseContext(colormap, [this.config['@context']]) ) - const colorIdx = tsC[0].getData() + + let colorIdx = tsC[0].getData() + if (tsC[0].attributes.DataType === 'NIFTI_TYPE_INT16') { + colorIdx = (window as any).ThreeSurfer.GiftiBase.castF32UInt16(colorIdx) + } this.loadedMeshes.push({ threeSurfer: tsM,