help > problems with using the command line options
Showing 1-2 of 2 posts
Display:
Results per page:
May 28, 2017  04:05 PM | fabianob
problems with using the command line options
Hello,

I'm trying to use BrainNet Viewer from the command line, since I'd like to generate corresponding figures for multiple subjects.

My code looks like

load('BrainNet_options.mat'); % this load EC field with default options

EC.nod.CM(1,:)=[1 0 0]; % I have nodes of 4 different types: red, green, blue and gray
EC.nod.CM(2,:)=[0 1 0];
EC.nod.CM(3,:)=[0 0 1];
EC.nod.CM(4,:)=0.8*ones(1,3);
EC.nod.size=0.5; % this is a good size for single sub plots, 0.3 for group-level
EC.msh.alpha=0.6;

save('BrainNet_myoptions','EC');

for iSub = vSub
subID=tmpSub{iSub};
BrainNet_MapCfg('BrainMesh_ICBM152.nv',[mapMatFileDir '/' subID '/' node_file_name],'BrainNet_myoptions.mat');
end

However it seems that the resulting visualization is not using the parameters set above. It is strange because if I follow the flow of the code within BrainNet_MapCfg, the structure EC actually has the desired field values, but they are not reflected in the resulting visualization.

It seems that the only way for achieving the desired visualization is through the GUI, which is not convenient when one wants to create multiple figures.

Also, I wonder if it is possible to set the desired layout (e.g., single-view sagittal from the right side) from the command line, since I haven't found any suitable field in EC for setting the layout. Maybe I should set the fields in FLAG for setting a desired layout from the command line?

Thank you, best

Fabiano
May 29, 2017  02:05 PM | Mingrui Xia
RE: problems with using the command line options
Hi Fabiano, 

You may also need to set the following variables: 

EC.nod.color = 3; % set nodal color according to different types.
EC.nod.size = 1; % set nodal size with same value.

The variables for layout are in EC.lot:
EC.lot.view = 1 % 1 for single view; 2 for full view; 3 for medial and lateral view; 4 for medial, lateral and ventral view; and 5 for medial, lateral and dorsal view. 
EC.lot.view_direction = 4; % 1 for left; 2 for top; 3 for front; and 4 for custom;
EC.lot.view_az = 90; % These two variables are azimuth and elevation for custom view, az=90 and el=0 is single-view sagittal from the right side.
EC.lot.view_el = 0;

I suggest to generate this configuration mat file from the option panel to avoid missing variables. 

Best,
Mingrui