alpha function affect the things in four axes

1 次查看(过去 30 天)
hi ,everyone ,when I use the alpha function in a axes(named axes1) in GUI figure , and there are another three axes (named axes2 axes3 axes4)in the GUI figure. then the alpha I used in axes1 affects the things in axes3 and axes4,but not affect the things in axes2,(I select the axes1 before using the alpha function)that's so weird ,my code followed :
axes(handles.axes1);
Ds = smooth3(picgather);
hiso3 = patch(isosurface(Ds,800),'FaceColor',[256/256 192/256 166/256],'EdgeColor','none');
isonormals(Ds,hiso3);
daspect([1,1,0.9]);
alpha(hiso3,0.7);
Please help me ,thanks
  4 个评论
jacky chen
jacky chen 2014-1-4
thanks,but it's need a large data(picgather ,showed in code),its size is 256*256*250, the whole code followed : Flag_show = 0;
if isempty(hiso1)
else
set(hiso1,'visible','off');
end
if isempty(hiso2)
else
set(hiso2,'visible','off');
end
if isempty(hiso3)
else
set(hiso3,'visible','off');
end
if isempty(L1)
else
set(L1,'visible','off');
end
if isempty(L2)
else
set(L2,'visible','off');
end
axes(handles.axes3);
imshow(tiao_chuang_hou_x(:,:,1),[]);
axes(handles.axes4);
imshow(tiao_chuang_hou_y(:,:,1),[]);
axes(handles.axes1);
%plot skin
Ds = smooth3(picgather);
hiso3 = patch(isosurface(Ds,800),'FaceColor',[256/256 192/256 166/256],'EdgeColor','none');
isonormals(Ds,hiso3);
daspect([1,1,0.9]);
alpha(hiso3,0.7);
%plot blood clot
Ds = smooth3(picxuekuai);
hiso1 = patch(isosurface(Ds,0),'FaceColor',[155/256,0,0],'EdgeColor','none');
isonormals(Ds,hiso1);
daspect([1,1,0.9]);
L1=light('position',[10000 0 10000]);
L2=light('position',[-10000 0 -10000]);
view(30,30);
jacky chen
jacky chen 2014-1-4
anyone interested in this question ,u can new a GUI project ,and then put 4 axes ,then one axes used to plot a three dimension object(maybe some code like this
Ds = smooth3(picgather);
hiso3 = patch(isosurface(Ds,800),'FaceColor',[256/256 192/256 166/256],'EdgeColor','none');
isonormals(Ds,hiso3);
daspect([1,1,0.9]);
alpha(hiso3,0.7);
),the other axes just use the imshow function ,then u maybe get the some problem like me .

请先登录,再进行评论。

采纳的回答

jacky chen
jacky chen 2014-1-4
finally ,I got it ,it's a horrible question ,the size of three dimension data is 128*128,but the image showed in axes2、3、4 are 512*512,so it changes when the three object created ,then I use the image 256*256,everything goes ok ,it's not the alpha function question ,just the problem of the data ,and the size of image is not larger twice then the three dimension data(one slice ).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by