New material appears

39 views
Skip to first unread message

Dipnoi

unread,
Apr 23, 2013, 6:50:10 AM4/23/13
to iso2mes...@googlegroups.com
Hi All,
Getting on well with the cgalv2m using the liver.inr data from the cgal website. One slight problem - it seems to generate an additional material (shown in blue on attached file) at the interface between existing materials? Is this something to do with the uini8 conversion?

fprintf(1,'loading segmented brain image...\n');
liver=readinr('liver.inr')
liver=uint8(liver);


fprintf(1,'meshing the segmented brain (this may take a few minutes) ...\n');

opt.angbound=30;
opt.radbound=6;
opt.distbound=4;
opt.reratio=3;
[node,elem]=cgalv2m(liver,opt,8);


plotmesh(node,elem,'y>100');
axis equal;
additional-material.jpg

Qianqian Fang

unread,
Apr 23, 2013, 10:31:26 AM4/23/13
to iso2mes...@googlegroups.com, Dipnoi
when you run the above line, you should see a warning:

'You have specified the node colors by both the 4th and 5th columns of
node and face inputs, respectively. The node input takes priority'

what you see is the nodal label, not the element label you
expected. to show those regions with the element label, you
should do

plotmesh(node(:,1:3),elem,'y>100');

let me know if this works for you.

Qianqian

> axis equal;

Dipnoi

unread,
Apr 23, 2013, 11:06:57 AM4/23/13
to iso2mes...@googlegroups.com, Dipnoi
Thanks Qianpian,
Worked perfectly and now i have managed to use the Analyze format. Only one problem, the Abaqus .inp file seems to crash Abaqus. Not sure why?

fprintf(1,'loading segmented image from Analyze format...\n');
info = analyze75info('liver.hdr');
liver = analyze75read(info);
liver = uint8(liver);

% call cgalmesher to mesh the segmented volume
% this will take 30 seconds on an Intel P4 2.4GHz PC

fprintf(1,'meshing the segmented image (this may take a few minutes) ...\n');


opt.angbound=30;
opt.radbound=6;
opt.distbound=4;
opt.reratio=3;
[node,elem]=cgalv2m(liver,opt,8);

plotmesh(node(:,1:3),elem,'y>100');
axis equal;

saveabaqus (node, elem,'liver2.inp');
Reply all
Reply to author
Forward
0 new messages