⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avw_view_old.html

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"                "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>  <title>Description of avw_view_old</title>  <meta name="keywords" content="avw_view_old">  <meta name="description" content="AVW_VIEW - Create and navigate ortho views of Analyze file">  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">  <meta name="robots" content="index, follow">  <link type="text/css" rel="stylesheet" href="../m2html.css"></head><body><a name="_top"></a><div><a href="../index.html">Home</a> &gt;  <a href="index.html">mri_toolbox</a> &gt; avw_view_old.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td><td align="right"><a href="index.html">Index for mri_toolbox&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>avw_view_old</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>AVW_VIEW - Create and navigate ortho views of Analyze file</strong></div><h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>function avw_view(avw), </strong></div><h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre class="comment"> AVW_VIEW - Create and navigate ortho views of Analyze file

 avw_view(avw)

 avw    -  a struct, created by avw_img_read

 The navigation is by sliders and mouse clicks on the
 images in any of the ortho views.</pre></div><!-- crossreference --><h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>This function calls:<ul style="list-style-image:url(../matlabicon.gif)"></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"></ul><!-- crossreference --><h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><ul style="list-style-image:url(../matlabicon.gif)"><li><a href="#_sub1" class="code">function slice_img(avw),</a></li></ul><h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function avw_view(avw),</a>0002 0003 <span class="comment">% AVW_VIEW - Create and navigate ortho views of Analyze file</span>0004 <span class="comment">%</span>0005 <span class="comment">% avw_view(avw)</span>0006 <span class="comment">%</span>0007 <span class="comment">% avw    -  a struct, created by avw_img_read</span>0008 <span class="comment">%</span>0009 <span class="comment">% The navigation is by sliders and mouse clicks on the</span>0010 <span class="comment">% images in any of the ortho views.</span>0011 <span class="comment">%</span>0012 0013 <span class="comment">% $Revision: 1.1 $ $Date: 2003/07/09 05:27:37 $</span>0014 0015 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0016 <span class="comment">% History:  06/2002, Darren.Weber@flinders.edu.au</span>0017 <span class="comment">%                    The Analyze format is copyright</span>0018 <span class="comment">%                    (c) Copyright, 1986-1995</span>0019 <span class="comment">%                    Biomedical Imaging Resource, Mayo Foundation</span>0020 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0021 0022 0023 <span class="keyword">if</span> ~exist(<span class="string">'avw'</span>,<span class="string">'var'</span>),0024     msg = sprintf(<span class="string">'AVW_VIEW: No input avw - see help avw_view\n'</span>);0025     error(msg);0026 <span class="keyword">end</span>0027 0028 0029 <span class="comment">% GUI General Parameters</span>0030 GUIwidth  = 150;0031 GUIheight = 50;0032 <span class="keyword">if</span> isfield(avw,<span class="string">'fileprefix'</span>),0033     <span class="keyword">if</span> isempty(avw.fileprefix),0034         name = <span class="string">'AVW View'</span>;0035     <span class="keyword">else</span>0036         format = strcat(<span class="string">'%+'</span>,sprintf(<span class="string">'%d'</span>,length(avw.fileprefix)+1),<span class="string">'s'</span>);0037         name = strcat(<span class="string">'AVW View - '</span>,sprintf(format,avw.fileprefix));0038     <span class="keyword">end</span>0039 <span class="keyword">else</span>0040     name = <span class="string">'AVW View'</span>;0041 <span class="keyword">end</span>0042 0043 GUI = figure(<span class="string">'Name'</span>,name,<span class="string">'Tag'</span>,<span class="string">'AVWVIEW'</span>,<span class="string">'units'</span>,<span class="string">'characters'</span>,<span class="keyword">...</span>0044              <span class="string">'NumberTitle'</span>,<span class="string">'off'</span>,<span class="keyword">...</span>0045              <span class="string">'MenuBar'</span>,<span class="string">'figure'</span>,<span class="string">'Position'</span>,[1 1 GUIwidth GUIheight]);0046 movegui(GUI,<span class="string">'center'</span>);0047 0048 AVWVIEW.gui = GUI;0049 0050 0051 Font.FontName   = <span class="string">'Helvetica'</span>;0052 Font.FontUnits  = <span class="string">'Pixels'</span>;0053 Font.FontSize   = 12;0054 Font.FontWeight = <span class="string">'normal'</span>;0055 Font.FontAngle  = <span class="string">'normal'</span>;0056 0057 0058 shading flat0059 0060 0061 xdim = size(avw.img,1);0062 ydim = size(avw.img,2);0063 zdim = size(avw.img,3);0064 0065 SagSlice = 1;0066 CorSlice = 1;0067 AxiSlice = 1;0068 <span class="keyword">if</span> xdim &gt; 1, SagSlice = floor(xdim/2); <span class="keyword">end</span>0069 <span class="keyword">if</span> ydim &gt; 1, CorSlice = floor(ydim/2); <span class="keyword">end</span>0070 <span class="keyword">if</span> zdim &gt; 1, AxiSlice = floor(zdim/2); <span class="keyword">end</span>0071 0072 AVWVIEW.origin = [SagSlice,CorSlice,AxiSlice];             <span class="comment">% vol origin</span>0073 AVWVIEW.scale  = double(avw.hdr.dime.pixdim(2:4)) ./ 1000; <span class="comment">% vol scale in meters</span>0074 0075 <span class="comment">% Initialise some window handles</span>0076 G.Ha = 0;0077 G.Hc = 0;0078 G.Hs = 0;0079 0080 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0081 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0082 0083 <span class="comment">% Axial Slice</span>0084 <span class="keyword">if</span> xdim &gt; 1 &amp; ydim &gt; 1,0085     0086     [x,y] = meshgrid(1:xdim,1:ydim);0087     Xaxial = x'; clear x;0088     Yaxial = y'; clear y;0089     Zaxial = zeros(xdim,ydim);0090     0091     G.Aa = subplot(<span class="string">'position'</span>,[0.05 0.56 0.4 0.4]);0092     colormap(<span class="string">'gray'</span>);0093     Saxial = uint8(squeeze(avw.img(:,:,AxiSlice)));0094     <span class="comment">%G.Ha = surf(Xaxial,Yaxial,Zaxial,Saxial,'EdgeColor','none');</span>0095     0096     G.Ha = imagesc([0, xdim],[0, ydim],Saxial);0097     0098     0099     axis square, daspect([1,1,1]);0100     xlabel(<span class="string">'(Left &lt;&lt;) X (&gt;&gt; Right)'</span>)0101     ylabel(<span class="string">'Y'</span>)0102     zlabel(<span class="string">'Z'</span>)0103     title(<span class="string">'Axial'</span>)0104     view([0,90]);0105     0106     <span class="comment">% This callback navigates with left click</span>0107     set(G.Ha,<span class="string">'ButtonDownFcn'</span>,<span class="keyword">...</span>0108         strcat(<span class="string">'AVWVIEW = get(gcbf,''Userdata''); '</span>,<span class="keyword">...</span>0109         <span class="string">'currentpoint = get(get(AVWVIEW.handles.Ha,''Parent''),''CurrentPoint''); '</span>,<span class="keyword">...</span>0110         <span class="string">'SagSlice = round(currentpoint(2,1)); '</span>,<span class="keyword">...</span>0111         <span class="string">'CorSlice = round(currentpoint(2,2)); '</span>,<span class="keyword">...</span>0112         <span class="string">'AxiSlice = round(str2num(get(AVWVIEW.handles.Taxi,''String''))); '</span>,<span class="keyword">...</span>0113         <span class="string">'imgvalue = AVWVIEW.avw.img(SagSlice,CorSlice,AxiSlice); '</span>,<span class="keyword">...</span>0114         <span class="string">'set(AVWVIEW.handles.imval,''String'',sprintf(''%8.2f'',imgvalue));'</span>,<span class="keyword">...</span>0115         <span class="string">'set(AVWVIEW.gui,''UserData'',AVWVIEW);'</span>,<span class="keyword">...</span>0116         <span class="string">'if ishandle(AVWVIEW.handles.Hs) &amp; AVWVIEW.handles.Hs, '</span>,<span class="keyword">...</span>0117         <span class="string">'   Ssag = squeeze(AVWVIEW.avw.img(SagSlice,:,:));'</span>,<span class="keyword">...</span>0118         <span class="string">'   set(AVWVIEW.handles.Hs,''CData'',Ssag); drawnow;'</span>,<span class="keyword">...</span>0119         <span class="string">'   set(AVWVIEW.handles.Tsag,''String'',num2str(SagSlice));'</span>,<span class="keyword">...</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -