I have a question regarding the exportation of a 3D image made in Matlab to any other 3D format (u3D, collada, Fbx). I have a stack of images (ct images) and I used the isosurface method in Matlab in order to obtain the 3D volume rendering. The code is as follows:
p_bone=patch(isosurface(volume_gabbia,0));%create isosurface patch
isonormals(volume_gabbia,p_bone)%compute and set normals
set(p_bone,'FaceColor','m','EdgeColor','none')%set surface props
daspect([1 1 1])
view(3), axis vis3d tight, box on, grid on
camproj perspective
camlight, lighting phong, alpha(.2)
volume_gabbia
is a stack of images which contains only the ribcage. The result is an image (.fig) volume that I can rotate, move, ecc...
Now I need to export this 3D volume in a 3D file (u3D r similar). I've tried to use the Fig2u3d file ( http://it.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf ) but I get the following error:
fig2u3d No surfaces found. Preprocessing patch No.1 Undefined function 'ddisp' for input arguments of type 'char'.
Error in u3d_pre_patch>single_patch_preprocessor (line 115) ddisp('Patch: Fixing face color')
Error in u3d_pre_patch (line 70) [v, f, fvx, r] = single_patch_preprocessor(h);
Error in fig2u3d (line 195) [patch_vertices, patch_faces, patch_facevertexcdata, patch_renderers] = u3d_pre_patch(ax);
Does anyone know how can I export a 3D image from Matlab?
Try exporting as .stl (look at file exchange), it is much better supported. Then convert to u3d with meshlab.
I unintendedly introduced the call to ddisp
during maintenance. The function ddisp
is a local convenience wrapper for disp
that was using to filter debug output globally (in absence of any proper logging infrastructure in matlab
).
Fixed as of e15999 . Thanks for reporting it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.