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

📄 avw_stats.html

📁 mri_toolbox是一个工具用来MRI. 来自于SourceForge, 我上传这个软件,希望能结识对医疗软件感兴趣的兄弟.
💻 HTML
字号:
<!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_stats</title>  <meta name="keywords" content="avw_stats">  <meta name="description" content="avw_stats - calculate region of interest stats for avw data">  <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_stats.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_stats</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>avw_stats - calculate region of interest stats for avw data</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 [stat] = avw_stats(stat) </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_stats - calculate region of interest stats for avw data

 [stat] = avw_stats(stat)

 stat is a struct with the following fields:
 
 stat.roi  - a region of interest from avw.img, see avw_roi.

 stat.function - cell array of strings, which can be any matlab
 descriptive stats function.  The defaults are:
 {'mean','std','min','max','median','sum'}
 
 For example,

 stat.roi.value = avw.img(1:10,1:10,1:10);
 stat.function = {'mean'};
 
 stat.value - output array of stats values, with length(stat.function).
 
 see also <a href="avw_roi.html" class="code" title="function [roi] = avw_roi(avw,position,shape)">avw_roi</a></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)"><li><a href="avw_view.html" class="code" title="function [ varargout ] = avw_view(avw,parent,command),">avw_view</a>	avw_view - create and navigate ortho views of Analyze 7.5 volume</li></ul><!-- crossreference --><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 [stat] = avw_stats(stat)</a>0002 0003 <span class="comment">% avw_stats - calculate region of interest stats for avw data</span>0004 <span class="comment">%</span>0005 <span class="comment">% [stat] = avw_stats(stat)</span>0006 <span class="comment">%</span>0007 <span class="comment">% stat is a struct with the following fields:</span>0008 <span class="comment">%</span>0009 <span class="comment">% stat.roi  - a region of interest from avw.img, see avw_roi.</span>0010 <span class="comment">%</span>0011 <span class="comment">% stat.function - cell array of strings, which can be any matlab</span>0012 <span class="comment">% descriptive stats function.  The defaults are:</span>0013 <span class="comment">% {'mean','std','min','max','median','sum'}</span>0014 <span class="comment">%</span>0015 <span class="comment">% For example,</span>0016 <span class="comment">%</span>0017 <span class="comment">% stat.roi.value = avw.img(1:10,1:10,1:10);</span>0018 <span class="comment">% stat.function = {'mean'};</span>0019 <span class="comment">%</span>0020 <span class="comment">% stat.value - output array of stats values, with length(stat.function).</span>0021 <span class="comment">%</span>0022 <span class="comment">% see also avw_roi</span>0023 <span class="comment">%</span>0024 0025 <span class="comment">% $Revision: 1.2 $ $Date: 2004/02/07 01:41:51 $</span>0026 0027 <span class="comment">% Licence:  GNU GPL, no express or implied warranties</span>0028 <span class="comment">% History:  08/2003, Darren.Weber_at_radiology.ucsf.edu</span>0029 <span class="comment">%</span>0030 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0031 0032 0033 version = <span class="string">'[$Revision: 1.2 $]'</span>;0034 fprintf(<span class="string">'\nAVW_STATS [v%s]\n'</span>,version(12:16));  tic;0035 0036 <span class="keyword">if</span> ~exist(<span class="string">'stat'</span>,<span class="string">'var'</span>),0037     msg = sprintf(<span class="string">'...no input stat struct.\n'</span>);0038     error(msg);0039 <span class="keyword">end</span>0040 <span class="keyword">if</span> ~isfield(stat,<span class="string">'function'</span>),0041   fprintf(<span class="string">'...no input stat.function, using defaults.\n'</span>);0042   stat.function = {<span class="string">'mean'</span>,<span class="string">'std'</span>,<span class="string">'min'</span>,<span class="string">'max'</span>,<span class="string">'median'</span>,<span class="string">'sum'</span>};0043 <span class="keyword">elseif</span> isempty(stat.function),0044   fprintf(<span class="string">'...empty input stat.function, using defaults.\n'</span>);0045   stat.function = {<span class="string">'mean'</span>,<span class="string">'std'</span>,<span class="string">'min'</span>,<span class="string">'max'</span>,<span class="string">'median'</span>,<span class="string">'sum'</span>};0046 <span class="keyword">end</span>0047 0048 0049 stat.value = zeros(1,length(stat.function));0050 0051 <span class="keyword">for</span> i = 1:length(stat.function),0052   0053   tmp = feval(stat.function{i},stat.roi.value);0054   0055   <span class="keyword">while</span> length(tmp) &gt; 1,0056     tmp = feval(stat.function{i},tmp);0057   <span class="keyword">end</span>0058   stat.value(i) = tmp;0059   0060 <span class="keyword">end</span> <span class="comment">% stat roi</span>0061 0062 stat0063 0064 <span class="keyword">return</span></pre></div><hr><address>Generated on Fri 21-May-2004 12:38:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address></body></html>

⌨️ 快捷键说明

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