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');