📄 sliceomaticfigure.m
字号:
function appdata=sliceomaticfigure(d)% FIG=SLICEOMATICFIGURE (D) - % Create the figure window to be used by the sliceomatic GUI.% D is the app data to attach to the figure % Init sliceomatic figure('name','Sliceomatic','toolbar','none','NumberTitle','off','units','normal','pos',[.1 .1 .8 .8]); lim=[min(min(min(d.data))) max(max(max(d.data)))]; d.axmain = axes('units','normal','pos',[.2 .2 .6 .6],'box','on',... 'ylim',[1 size(d.data,1)],... 'xlim',[1 size(d.data,2)],... 'zlim',[1 size(d.data,3)],... 'clim',lim,... 'alim',lim,... 'Xticklabel',{},'Yticklabel',{},'Zticklabel',{},'tag','axmain'); view(3); axis tight vis3d; hold on; grid on; xlabel X; ylabel Y; zlabel Z; daspect([1 1 1]); % Set up the four controller axes. d.axx = axes('units','normal','pos',[.2 .81 .6 .1],'box','on',... 'ytick',[],'xgrid','on','xaxislocation','top',... 'zlim',[-2 1 ],... 'layer','top',... 'color','none','tag','Xslice'); d.pxx = patch('facecolor',[1 1 1],... 'facealpha',.6,... 'edgecolor','none',... 'hittest','off'); setappdata(d.axx,'motionpointer','SOM bottom'); d.axy = axes('units','normal','pos',[.05 .05 .1 .75],'box','on',... 'xtick',[],'ygrid','on',... 'zlim',[-2 1 ],... 'layer','top',... 'color','none','tag','Yslice'); d.pxy = patch('facecolor',[1 1 1],... 'facealpha',.6,... 'edgecolor','none',... 'hittest','off'); setappdata(d.axy,'motionpointer','SOM right'); d.axz = axes('units','normal','pos',[.85 .05 .1 .75],'box','on',... 'xtick',[],'ygrid','on','yaxislocation','right',... 'zlim',[-2 1 ],... 'layer','top',... 'color','none','tag','Zslice'); d.pxz = patch('facecolor',[1 1 1],... 'facealpha',.6,... 'edgecolor','none',... 'hittest','off'); setappdata(d.axz,'motionpointer','SOM left'); d.axiso = axes('units','normal','pos',[.2 .05 .6 .1],'box','on',... 'ytick',[],'xgrid','off','ygrid','off',... 'xaxislocation','bottom',... 'zlim',[-1 1],... 'color','none',... 'layer','top'); setappdata(d.axiso,'motionpointer','SOM top'); set([d.axx d.axy d.axz d.axiso],'handlevisibility','off'); setappdata(gcf,'sliceomatic',d); % Set up the default sliceomatic controllers slicecontrols(gcf,1); isocontrols(gcf,1); % Button Down Functions set(d.axx,'buttondownfcn','sliceomatic Xnew'); set(d.axy,'buttondownfcn','sliceomatic Ynew'); set(d.axz,'buttondownfcn','sliceomatic Znew'); set(d.axiso,'buttondownfcn','sliceomatic ISO'); % Set up our motion function before cameratoolbar is active. d.motionmetaslice = []; set(gcf,'windowbuttonmotionfcn',@sliceomaticmotion); % Try setting up the camera toolbar try cameratoolbar2;%/BL %cameratoolbar('togglescenelight'); %cameratoolbar('setmode','orbit'); end d = figmenus(d); %{'jet','hsv','cool','hot','pink','bone','copper','flag','prism %','rand','custom'}, % Color and alph maps uicontrol('style','text','string','ColorMap',... 'units','normal','pos',[0 .9 .19 .1]); uicontrol('style','popup','string',... {'spectral', 'spectral_inv','gray', 'gray_inv','spectralMNI', 'spectralMNI_inv',... 'hsv', 'hot', 'bone', 'copper','pink', 'white', 'flag', 'lines', 'colorcube', 'vga', ... 'jet', 'prism', 'cool', 'autumn', 'spring', 'winter','summer','custom'}, ... 'callback','sliceomatic colormap',... 'units','normal','pos',[0 .85 .19 .1]); uicontrol('style','text','string','AlphaMap',... 'units','normal','pos',[.81 .9 .19 .1]); uicontrol('style','popup','string',{'rampup','rampdown','vup','vdown','rand'},... 'callback','sliceomatic alphamap',... 'units','normal','pos',[.81 .85 .19 .1]); % Data tip thingydoo d.tip = text('visible','off','fontname','helvetica','fontsize',10,'color','black'); try % Try R13 new feature set(d.tip,'backgroundcolor',[1 1 .8],'edgecolor',[.5 .5 .5],'margin',5); end appdata = d;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -