@@ -30,17 +30,22 @@ const NeuroJsonGraph: React.FC<{
3030
3131 // Define the datatype to color mapping
3232 const DATA_TYPE_COLORS : Record < string , [ number , number , number ] > = {
33- mri : [ 79 , 51 , 130 ] ,
34- fmri : [ 10 , 81 , 20 ] ,
35- pet : [ 0 , 105 , 192 ] ,
36- meg : [ 156 , 57 , 0 ] ,
37- eeg : [ 134 , 31 , 55 ] ,
38- ieeg : [ 18 , 109 , 62 ] ,
39- beh : [ 12 , 93 , 210 ] ,
40- fmap : [ 255 , 255 , 59 ] ,
41- dwi : [ 200 , 9 , 12 ] ,
42- fnirs : [ 255 , 193 , 7 ] ,
43- phenotype : [ 255 , 87 , 34 ] ,
33+ // mri: [79, 51, 130], // deep purple
34+ mri : [ 160 , 138 , 233 ] , // soft laender
35+ anat : [ 160 , 138 , 233 ] ,
36+ // fmri: [10, 81, 20], // dark green
37+ fmri : [ 152 , 202 , 32 ] , // bright lime green
38+ func : [ 152 , 202 , 32 ] ,
39+
40+ pet : [ 0 , 105 , 192 ] , // deep blue
41+ meg : [ 156 , 57 , 0 ] , // dark reddish-brown
42+ eeg : [ 134 , 31 , 55 ] , // dark red-pink
43+ ieeg : [ 18 , 109 , 62 ] , // forest green
44+ beh : [ 12 , 93 , 210 ] , // bright blue
45+ fmap : [ 255 , 255 , 59 ] , // vivid yellow
46+ dwi : [ 200 , 9 , 12 ] , // deep red
47+ fnirs : [ 255 , 193 , 7 ] , // golden yellow
48+ phenotype : [ 255 , 87 , 34 ] , // vibrant orange-red
4449 } ;
4550
4651 // Function to blend colors based on datatypes
@@ -64,9 +69,9 @@ const NeuroJsonGraph: React.FC<{
6469
6570 if ( count === 0 ) count = 1 ; // Prevent division by zero
6671
67- const avgR = Math . floor ( totalR / count ) ;
68- const avgG = Math . floor ( totalG / count ) ;
69- const avgB = Math . floor ( totalB / count ) ;
72+ let avgR = Math . floor ( totalR / count ) ;
73+ let avgG = Math . floor ( totalG / count ) ;
74+ let avgB = Math . floor ( totalB / count ) ;
7075
7176 return `rgb(${ avgR } , ${ avgG } , ${ avgB } )` ;
7277 } ;
@@ -117,7 +122,7 @@ const NeuroJsonGraph: React.FC<{
117122 nodes : registry . map ( ( db ) => {
118123 const color = blendColors ( db . datatype ) ;
119124 let size =
120- db . datasets > 100 ? Math . log ( db . datasets ) * 2.5 : db . datasets / 6 ;
125+ db . datasets > 100 ? Math . log ( db . datasets ) * 2.5 : db . datasets / 7 ;
121126 size = Math . max ( size , 4 ) ;
122127
123128 return {
@@ -172,9 +177,9 @@ const NeuroJsonGraph: React.FC<{
172177 // Initialize 3D Force Graph
173178 const Graph = new ForceGraph3D ( graphRef . current )
174179 . graphData ( graphData )
175- . nodeRelSize ( 2 )
180+ . nodeRelSize ( 1 )
176181 . nodeColor ( ( node ) => ( node as NodeObject ) . color )
177- . linkWidth ( 1 )
182+ . linkWidth ( 2 )
178183 . backgroundColor ( "rgba(0,0,0,0)" )
179184 . nodeLabel ( "name" )
180185 . onNodeHover ( ( node ) => {
0 commit comments