필터 지우기
필터 지우기

why my 3D image is not extruded in 3D software?

조회 수: 1 (최근 30일)
Zaitul
Zaitul 2016년 11월 28일
댓글: Zaitul 2016년 12월 8일
Hello, i have 3D image but when I view the image in the 3D software to be printed, the image does not extrude. here i attached my code and images. can anyone check on my code. Many thanks.
a = imread ('stomachgray.tif');
mask = zeros(size(a));
mask(100:end-100,100:end-100) = 1;
bw = activecontour(a,mask,1000);
c = im2double(bw);
shading flat
d = imgaussfilt3 (c,4);
colormap(bone)
h = hgtransform;
mesh(d*100, 'Parent', h, 'FaceColor', 'r' )
view(3)
lighting gouraud
camlight right
% Make it taller
set (gca, 'units', 'cent')
set(h, 'Matrix', makehgtform('scale', [10 10 500]))
[X,Y] = meshgrid(1:length(h));
surf2stl('stomachSurf7.stl',X,Y,d);
end
  댓글 수: 12
KSSV
KSSV 2016년 12월 6일
Resizing will not help...I don't know about the software in which you are viewing.
Zaitul
Zaitul 2016년 12월 8일
I got the solution. but can i know if my code below is correct if i want to set the unit of the extrusion? unit that i want to use is cm.
[X,Y] = meshgrid(1:length(h));
set (gca, 'units', 'cent')
surf2stl('stomachSurfZ.stl',X,Y,d*100);

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by