help > Problems loading and plotting node file
Showing 1-3 of 3 posts
Display:
Results per page:
Dec 31, 2019  04:12 AM | Andreas Voldstad - University of Oslo and LMU of Munich
Problems loading and plotting node file
Dear brainnet users,

I am having trouble plotting my nodes.

If I include a - in the 6th column, the nodes will not plot and I get the following error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Error in BrainNet_LoadFiles>NI_load (line 777)
sphere = [cell2mat(data(1)) cell2mat(data(2)) cell2mat(data(3)) cell2mat(data(4))
cell2mat(data(5))];
Error in BrainNet_LoadFiles>OK_button_Callback (line 167)
[surf.nsph surf.sphere surf.label]=NI_load(File.NI);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet_LoadFiles (line 56)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet_LoadFiles('OK_button_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.


If I delete the 6th column, it will plot, but only the first (lateral) view, and gives this error message:
Index exceeds array bounds.

Error in BrainNet>DrawSphere (line 2905)
if ~isequal(surf.label{j},'-') % Editied by Mingrui Xia, 20131226, fix the bug that the
label doesn't displayed when including '-'
Error in BrainNet>PlotNode5 (line 2351)
DrawSphere(surf,j,i,52,EC);
Error in BrainNet>FileView (line 4229)
PlotNode5(surf, a, flag, centerX, 2, EC);
Error in BrainNet>LoadFile_ClickedCallback (line 4961)
a=FileView;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet('LoadFile_ClickedCallback',hObject,eventdata,guidata(hObject))
Error while evaluating PushTool ClickedCallback.



Is there a solution to this?
I am using BrainNetViewer to demonstrate the findings of different studies, and only need to load the nodes.

My node file looks like this:
-18 14 4 1 1
-8 -10 6 1 1
24 -20 12 1 1
-22 -19 12 1 1
-18 -78 -20 1 1
8 -82 -22 1 1
-4 34 22 1 1
58 12 38 1 1 


Sincerely,
Andreas
Dec 31, 2019  10:12 PM | Mingrui Xia
RE: Problems loading and plotting node file
Hi Andreas,

Please try the attached node file.

Best,
Mingrui
Originally posted by Andreas Voldstad:
Dear brainnet users,

I am having trouble plotting my nodes.

If I include a - in the 6th column, the nodes will not plot and I get the following error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Error in BrainNet_LoadFiles>NI_load (line 777)
sphere = [cell2mat(data(1)) cell2mat(data(2)) cell2mat(data(3)) cell2mat(data(4))
cell2mat(data(5))];
Error in BrainNet_LoadFiles>OK_button_Callback (line 167)
[surf.nsph surf.sphere surf.label]=NI_load(File.NI);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet_LoadFiles (line 56)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet_LoadFiles('OK_button_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.


If I delete the 6th column, it will plot, but only the first (lateral) view, and gives this error message:
Index exceeds array bounds.

Error in BrainNet>DrawSphere (line 2905)
if ~isequal(surf.label{j},'-') % Editied by Mingrui Xia, 20131226, fix the bug that the
label doesn't displayed when including '-'
Error in BrainNet>PlotNode5 (line 2351)
DrawSphere(surf,j,i,52,EC);
Error in BrainNet>FileView (line 4229)
PlotNode5(surf, a, flag, centerX, 2, EC);
Error in BrainNet>LoadFile_ClickedCallback (line 4961)
a=FileView;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet('LoadFile_ClickedCallback',hObject,eventdata,guidata(hObject))
Error while evaluating PushTool ClickedCallback.



Is there a solution to this?
I am using BrainNetViewer to demonstrate the findings of different studies, and only need to load the nodes.

My node file looks like this:
-18 14 4 1 1
-8 -10 6 1 1
24 -20 12 1 1
-22 -19 12 1 1
-18 -78 -20 1 1
8 -82 -22 1 1
-4 34 22 1 1
58 12 38 1 1 


Sincerely,
Andreas
Attachment: test.node
Jan 2, 2020  12:01 AM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Problems loading and plotting node file
Thank you, it works!

I still have a problem plotting all views.
Single view and full view works, but if I choose "lateral and medial" view, I get the following error:
Error using text
X, Y, and Z must be the same length

Error in BrainNet>PlotMesh4 (line 1001)
text(0,max(Surfmatrix.coord{i}(:,2)),max(Surfmatrix.coord{i}(:,3)),'R','FontSize',20,'FontWeight','Bold','HorizontalAlignment','center');
Error in BrainNet>FileView (line 4074)
a=PlotMesh4(Viewer,Surfmatrix,1);
Error in BrainNet>LoadFile_ClickedCallback (line 4961)
a=FileView;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet('LoadFile_ClickedCallback',hObject,eventdata,guidata(hObject))
Error while evaluating PushTool ClickedCallback.
>>