[Nirfast] Failing while trying to graphically place sources/detectors

Vishwanath, Karthik vishwak at miamioh.edu
Wed May 9 14:14:54 EDT 2018


Hi All,

Was having trouble creating and placing sources/detectors in a standard
slab mesh using NIRFAST-9.0 on a linux system (Ubuntu 16.04.4 LTS;
4.4.0-122-generic x86_64 kernel). My MATLAB version is R2017a.

I've listed sequence of steps with the messages in the workspace window
shown and the fixes I attempted (in blue text)

==================================================

>> nirfast
Selected menu in GUI: Mesh->Create Mesh ->Simple Shapes -> Standard
Selected slab and set L/W/H to 20mm and click Done

Error using textscan
Unknown parameter 'bufsize'.

Error in read_nod_elm (line 45)
        data = textscan(fid,'%u32 %f %f %f%*[^\n]','bufsize',409500);

Error in checkerboard3d_mm (line 109)
    [telem tnode] = read_nod_elm(fnprefix,1);

Error in make_slab (line 89)
    mesh = checkerboard3d_mm(fullfile(outputdir,'test_node_ele.ele'),...


Error in create_mesh (line 25)
    eval(['mesh = make_' lower(shape) '(sizevar);']);

Error in gui_create_mesh>done_Callback (line 532)
    mesh = evalin('base',content{end});

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_create_mesh (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,
eventdata,guidata(hObject))
Error while evaluating UIControl Callback.


==================================================

Changed line 45 in "toolbox/meshing/tools/read_nod_elm.m" to: data =
textscan(fid,'%u32 %f %f %f%*[^\n]')

Selected menu in GUI: Mesh->Create Mesh ->Simple Shapes -> Standard
Selected slab and set L/W/H to 20mm and click Done


Added Shield: 0.0010 s
Delaunay Triangulation Time: 0.7141 s
Connectivity Time: 0.0359 s
Circumcenters Time: 0.0129 s
  47 th level was reached
100.0000 % of Tetraedroms were checked
Walking Time: 0.0399 s
Manifold extraction Time: 0.4239 s
Total Time: 1.2299 s
Writing data to file...Done writing mesh to:
    Path: /home/karthik/Research/Matlab/lib/nirfast
    Filename: test_node_ele.node/.ele


--> Beginning mesh generation process, please wait...
    Done with sub-volume separation.
===========================================
    Calculating desired length at boundary nodes.. done.
    Calculating prism normals and bounding boxes.. done.
    Sealing boundary buffer zone.. done.

     Tagging interior nodes... done
-----> Running BSP tree to filter out nodes.

-----> done.
Writing data to file.Done writing the nodes to:
    Path: /tmp
    Filename: input4delaunay.a.node

Writing data to file... Done writing surface to a poly file:
    Path: /tmp
    Filename: input4delaunay.poly

---------> Running Delaunay, please wait.../bin/bash:
/home/karthik/Research/Matlab/lib/nirfast/NIRFAST-9.0/toolbox/meshing/bin/delaunaygen-linux64.exe:
Permission denied
Warning:  Delaunay Generator failed. Trying again...
> In checkerboard3d (line 181)
  In checkerboard3d_mm (line 167)
  In make_slab (line 89)
  In create_mesh (line 25)
  In gui_create_mesh>done_Callback (line 532)
  In gui_mainfcn (line 95)
  In gui_create_mesh (line 42)
  In matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,eventdata,guidata(hObject))

/bin/bash: /home/karthik/Research/Matlab/lib/nirfast/NIRFAST-9.0/
toolbox/meshing/bin/delaunaygen-linux64.exe: Permission denied
Error using checkerboard3d (line 186)
 Delaunay Generator failed again. Check your input setting!

Error in checkerboard3d_mm (line 167)
[mesh.elements, mesh.nodes] = checkerboard3d(telem(:,1:3),tnode,myargs);

Error in make_slab (line 89)
    mesh = checkerboard3d_mm(fullfile(outputdir,'test_node_ele.ele'),...


Error in create_mesh (line 25)
    eval(['mesh = make_' lower(shape) '(sizevar);']);

Error in gui_create_mesh>done_Callback (line 532)
    mesh = evalin('base',content{end});

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_create_mesh (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback.

==================================================

In shell:
$ chmod +x /home/karthik/Research/Matlab/lib/nirfast/NIRFAST-9.0/
toolbox/meshing/bin/delaunaygen-linux64.exe

Selected menu in GUI: Mesh->Create Mesh ->Simple Shapes -> Standard
Selected slab and set L/W/H to 20mm and click Done

Added Shield: 0.0003 s
Delaunay Triangulation Time: 0.4179 s
Connectivity Time: 0.0214 s
Circumcenters Time: 0.0032 s
Warning: Brute continuation necessary
> In MyRobustCrust>Marking (line 408)
  In MyRobustCrust (line 134)
  In make_slab (line 85)
  In create_mesh (line 25)
  In gui_create_mesh>done_Callback (line 532)
  In gui_mainfcn (line 95)
  In gui_create_mesh (line 42)
  In matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,eventdata,guidata(hObject))

Warning: 1000 th level was reached\n
> In MyRobustCrust>Marking (line 440)
  In MyRobustCrust (line 134)
  In make_slab (line 85)
  In create_mesh (line 25)
  In gui_create_mesh>done_Callback (line 532)
  In gui_mainfcn (line 95)
  In gui_create_mesh (line 42)
  In matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,eventdata,guidata(hObject))

99.7824 % of Tetraedroms were checked
Walking Time: 0.0985 s
Manifold extraction Time: 0.2470 s
Total Time: 0.7971 s
Writing data to file...Done writing mesh to:
    Path: /home/karthik/Research/Matlab/lib/nirfast
    Filename: test_node_ele.node/.ele


--> Beginning mesh generation process, please wait...
    Done with sub-volume separation.
===========================================
    Calculating desired length at boundary nodes.. done.
    Calculating prism normals and bounding boxes.. done.
    Sealing boundary buffer zone.. done.

     Tagging interior nodes... done
-----> Running BSP tree to filter out nodes.

-----> done.
Writing data to file.Done writing the nodes to:
    Path: /tmp
    Filename: input4delaunay.a.node

Writing data to file... Done writing surface to a poly file:
    Path: /tmp
    Filename: input4delaunay.poly

---------> Running Delaunay, please wait... done. <---------



--> Finished mesh generation.
Undefined function or variable 'myflag'.

Error in optimize_mesh_gui>optimize_mesh_gui_OpeningFcn (line 78)
if myflag

Error in gui_mainfcn (line 220)
    feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure),
varargin{:});

Error in optimize_mesh_gui (line 40)
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in gui_create_mesh>done_Callback

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_create_mesh (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(
hObject,eventdata)gui_create_mesh('done_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback.

==================================================

Added line 64 in toolbox/meshing/tools/optimize_mesh_gui.m:

64 myflag='';
65 if(nargin > 3)

Selected menu in GUI: Mesh->Create Mesh ->Simple Shapes -> Standard
Selected slab and set L/W/H to 20mm and click Done

The mesh is generated and the figure dialog for "Place sources and
detectors" comes up.

The mesh is viewable, can be rotated and panned using the tools in the
figure window. However, clicking on the mesh generates the following error:

Error using matlab.graphics.axis.Axes/get
There is no x_RenderTransform property on the Axes class.

Error in select3d>local_Data2PixelTransform (line 361)
xform = get(ax,'x_RenderTransform');


Error in select3d (line 208)
xvert = local_Data2PixelTransform(ax,vert)';


Error in gui_place_sources_detectors>figure1_WindowButtonDownFcn (line 386)
    p = select3d;

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_place_sources_detectors (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_place_sources_detectors('figure1_WindowButtonDownFcn',hObject,eventdata,guidata(hObject))

Error while evaluating Figure WindowButtonDownFcn.

==================================================

Was not sure how to proceed from there. Let me know if there is any other
information needed to help track/fix this.


Thanks,

--
Karthik Vishwanath, PhD
James C. & Carole E. Garland Professorship
Office: 109 Kreger Hall
Dept. of Physics, Miami University, Oxford OH
Tel: (513) 529-2315
Web: OSIM Lab <http://users.miamioh.edu/vishwak/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/nirfast/attachments/20180509/771e6969/attachment.html>


More information about the Nirfast mailing list