[#9202] Modularity

Please log in

State: more information
Open
Date:
2018-09-14 14:48
Priority: more information
3
Submitted By:
Simon Davis (legree17)
Assigned To: more information
Nobody (None)
Product: 
Software A
Operating System: 
MacOS X
Component: 
None
Summary: more information
Modularity

Detailed description

Any future plans for support of modularity coloring of specifiic nodes, and/or intra-module connections?

Response

Message

Date: 2018-09-14 18:15
Sender: Chris Rorden

You can use the 'color' column of the BrainNet viewer node format to set the color of the nodes. You can use the value of each edge in the edge format to set the color of the edges. The scripts below show you how to set the colors for just the edges, or a combination of edge and nodes. One script is in Pascal (which is inbuilt in Surfice but unfamiliar to many users) and the other is in Python (which requires you to have Python installed). The two languages are very similar to each other, so it is easy to translate between the two, just remember Pascal expects booleans to be true/false while Python expects 1/0:

begin
resetdefaults();
meshload('BrainMesh_ICBM152Left.mz3');
edgeload('simple.edge');
shaderxray(0.5,1);
nodesize(6, true);
edgesize(3,true);
nodehemisphere(-1);
edgecolor('actc',true);
nodethresh(0.01,4.0);
nodecolor('actc',true);
end.

import gl
gl.resetdefaults()
gl.meshload('BrainMesh_ICBM152Left.mz3')
gl.edgeload('simple.edge')
gl.shaderxray(0.5,1)
gl.nodesize(6, 0)
gl.edgesize(3,0)
gl.nodehemisphere(-1)
gl.nodethresh(0.01,4.0)
gl.nodecolor('actc',1)
gl.edgecolor('actc',1)
gl.edgethresh(0, 1)

Attached Files:

Name Download
simple.edge Download
simple.node Download
node_edge_color.jpg Download

Changes:

Field Old Value Date By
File Added983: node_edge_color.jpg2018-09-14 18:15crlab
File Added982: simple.node2018-09-14 18:15crlab
File Added981: simple.edge2018-09-14 18:15crlab
New Message2018-09-14 18:15crlab