📄 avw_view_test.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_view_test</title> <meta name="keywords" content="avw_view_test"> <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 © 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> > <a href="index.html">mri_toolbox</a> > avw_view_test.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td><td align="right"><a href="index.html">Index for mri_toolbox <img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>avw_view_test</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.
Fiducial points can be selected, which are returned
into mriFID or p.mriFID in the base workspace. These
points are given in meters, with an origin translated
from the center of the MRI volume to (0,0,0). +X is
right, +Y is anterior, +Z is superior, the default RAS
orientation of Analyze MRI files.
See also, <a href="avw_img_read.html" class="code" title="function [ avw, machine ] = avw_img_read(fileprefix,IMGorient,machine)">AVW_IMG_READ</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)"></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 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">% Fiducial points can be selected, which are returned</span>0012 <span class="comment">% into mriFID or p.mriFID in the base workspace. These</span>0013 <span class="comment">% points are given in meters, with an origin translated</span>0014 <span class="comment">% from the center of the MRI volume to (0,0,0). +X is</span>0015 <span class="comment">% right, +Y is anterior, +Z is superior, the default RAS</span>0016 <span class="comment">% orientation of Analyze MRI files.</span>0017 <span class="comment">%</span>0018 <span class="comment">% See also, AVW_IMG_READ</span>0019 <span class="comment">%</span>0020 0021 <span class="comment">% $Revision: 1.1 $ $Date: 2003/07/09 05:27:37 $</span>0022 0023 <span class="comment">% Licence: GNU GPL, no express or implied warranties</span>0024 <span class="comment">% History: 06/2002, Darren.Weber@flinders.edu.au</span>0025 <span class="comment">% 10/2002, Darren.Weber@flinders.edu.au</span>0026 <span class="comment">% added fiducial point determination</span>0027 <span class="comment">% changed plots from surf to imagesc commands</span>0028 <span class="comment">% added initial handling of datatype for avw.img</span>0029 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0030 0031 0032 <span class="keyword">if</span> ~exist(<span class="string">'avw'</span>,<span class="string">'var'</span>),0033 msg = sprintf(<span class="string">'...no input avw - see help avw_view\n'</span>);0034 error(msg);0035 <span class="keyword">end</span>0036 0037 0038 <span class="comment">% use the correct datatype of avw.img</span>0039 <span class="keyword">switch</span> double(avw.hdr.dime.bitpix),0040 <span class="keyword">case</span> 1,0041 fprintf(<span class="string">'...converting avw.img to uint8\n'</span>);0042 avw.img = uint8(avw.img);0043 <span class="keyword">case</span> 8,0044 fprintf(<span class="string">'...converting avw.img to uint8\n'</span>);0045 avw.img = uint8(avw.img);0046 <span class="keyword">case</span> 16,0047 fprintf(<span class="string">'...converting avw.img to uint16\n'</span>);0048 avw.img = uint16(avw.img);0049 <span class="keyword">case</span> {32,64},0050 fprintf(<span class="string">'...ensuring avw.img is double\n'</span>);0051 <span class="comment">% make sure it is double</span>0052 avw.img = double(avw.img);0053 <span class="keyword">otherwise</span>,0054 <span class="comment">% do nothing, leave it as is</span>0055 <span class="keyword">end</span>0056 0057 0058 0059 <span class="comment">% GUI General Parameters</span>0060 GUIwidth = 150;0061 GUIheight = 50;0062 <span class="keyword">if</span> isfield(avw,<span class="string">'fileprefix'</span>),0063 <span class="keyword">if</span> isempty(avw.fileprefix),0064 name = <span class="string">'AVW View'</span>;0065 <span class="keyword">else</span>0066 format = strcat(<span class="string">'%+'</span>,sprintf(<span class="string">'%d'</span>,length(avw.fileprefix)+1),<span class="string">'s'</span>);0067 name = strcat(<span class="string">'AVW View - '</span>,sprintf(format,avw.fileprefix));0068 <span class="keyword">end</span>0069 <span class="keyword">else</span>0070 name = <span class="string">'AVW View'</span>;0071 <span class="keyword">end</span>0072 0073 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>0074 <span class="string">'NumberTitle'</span>,<span class="string">'off'</span>,<span class="keyword">...</span>0075 <span class="string">'MenuBar'</span>,<span class="string">'figure'</span>,<span class="string">'Position'</span>,[1 1 GUIwidth GUIheight]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -