alpha function affect the things in four axes

1 view (last 30 days)
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 Comments
jacky chen
jacky chen on 4 Jan 2014
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 on 4 Jan 2014
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 .

Sign in to comment.

Accepted Answer

jacky chen
jacky chen on 4 Jan 2014
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 ).

More Answers (0)

Community Treasure Hunt

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

Start Hunting!