资源描述:
《matlab实用程序百例5.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、例81:MRI数据的显示loadmriD=squeeze(D);h0=figure('toolbar','none',...'position',[19856450468],...'name','实例81');h1=axes('parent',h0,...'position',[0.30.450.50.5],...'visible','off');image_num=8;image(D(:,:,image_num))axisimagecolormap(map)x=xlim;y=ylim;b1=uicontrol('parent',h0,...'units','po
2、ints',...'tag','b1',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'position',[501006020],...'string','二维图',...'callback',[...'cla,',...'contourslice(D,[],[],image_num),',...'axisij,',...'xlim(x),',...'ylim(y),',...'daspect([1,1,1]),',...'colormap(''default'')']);b2=ui
3、control('parent',h0,...'units','points',...'tag','b2',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'position',[2501006020],...'string','三维图',...'callback',[...'cla,',...'phandles=contourslice(D,[],[],[1,12,19,27],8);,',...'view(3);,',...'axistight,',...'set(phandles,
4、''LineWidth'',2)']);b3=uicontrol('parent',h0,...'units','points',...'tag','b3',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'position',[50506020],...'string','立体图',...'callback',[...'cla,',...'Ds=smooth3(D);,',...'hiso=patch(isosurface(Ds,5),''FaceColor'',[1,.75,.65]
5、,''EdgeColor'',''none'');,',...'hcap=patch(isocaps(D,5),''FaceColor'',''interp'',''EdgeColor'',''none'');,',...'colormap(map),',...'view(45,30),',...'axistight,',...'daspect([1,1,.4]),',...'lightangle(45,30),',...'lightingphong,',...'isonormals(Ds,hiso),',...'set(hcap,''AmbientStrengt
6、h'',.6),',...'set(hiso,''SpecularColorReflectance'',0,''SpecularExponent'',50)']);b4=uicontrol('parent',h0,...'units','points',...'tag','b4',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'position',[250506020],...'string','关闭',...'callback','close');实例82:图像类型转换h0=figu
7、re('toolbar','none',...'position',[19856350468],...'name','实例82');h1=axes('parent',h0,...'position',[0.20.450.50.5],...'visible','off');loadearthclims=[1060];b1=uicontrol('parent',h0,...'units','points',...'tag','b1',...'style','pushbutton',...'string','强度图像',...'position',[301205020]
8、,...'