📄 avw_view_v5.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_v5</title> <meta name="keywords" content="avw_view_v5"> <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_v5.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_v5</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="_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">% 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">% Licence: GNU GPL, no express or implied warranties</span>0022 <span class="comment">% History: 06/2002, Darren.Weber@flinders.edu.au</span>0023 <span class="comment">% 10/2002, Darren.Weber@flinders.edu.au</span>0024 <span class="comment">% added fiducial point determination</span>0025 <span class="comment">% changed plots from surf to imagesc commands</span>0026 <span class="comment">% added handling of datatype for avw.img</span>0027 <span class="comment">% altered daspect to use avw.hdr.dime.pixdim</span>0028 <span class="comment">% altered color scheme</span>0029 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0030 0031 ver = version;0032 ver = str2num(ver(1)); <span class="comment">% check for matlab version!</span>0033 <span class="keyword">if</span> ver < 6,0034 msg = sprintf(<span class="string">'...sorry, GUI will not work with matlab version < 6.\n'</span>);0035 error(msg);0036 <span class="keyword">end</span>0037 0038 <span class="keyword">if</span> ~exist(<span class="string">'avw'</span>,<span class="string">'var'</span>),0039 msg = sprintf(<span class="string">'...no input avw - see help avw_view\n'</span>);0040 error(msg);0041 <span class="keyword">end</span>0042 0043 <span class="comment">% determine the datatype of avw.img</span>0044 <span class="keyword">switch</span> double(avw.hdr.dime.bitpix),0045 <span class="keyword">case</span> 1,0046 fprintf(<span class="string">'...converting avw.img to uint8\n'</span>);0047 avw.img = uint8(avw.img);0048 <span class="keyword">case</span> 8,0049 fprintf(<span class="string">'...converting avw.img to uint8\n'</span>);0050 avw.img = uint8(avw.img);0051 <span class="keyword">case</span> 16,0052 fprintf(<span class="string">'...converting avw.img to uint16\n'</span>);0053 avw.img = uint16(avw.img);0054 <span class="keyword">case</span> {32,64},0055 <span class="comment">% make sure it is double, not single</span>0056 avw.img = double(avw.img);0057 <span class="keyword">otherwise</span>,0058 <span class="comment">% do nothing, leave it as is</span>0059 <span class="keyword">end</span>0060 0061 0062 <span class="comment">% GUI General Parameters</span>0063 GUIwidth = 150;0064 GUIheight = 50;0065 <span class="keyword">if</span> isfield(avw,<span class="string">'fileprefix'</span>),0066 <span class="keyword">if</span> isempty(avw.fileprefix),0067 name = <span class="string">'AVW View'</span>;0068 <span class="keyword">else</span>0069 format = strcat(<span class="string">'%+'</span>,sprintf(<span class="string">'%d'</span>,length(avw.fileprefix)+1),<span class="string">'s'</span>);0070 name = strcat(<span class="string">'AVW View - '</span>,sprintf(format,avw.fileprefix));0071 <span class="keyword">end</span>0072 <span class="keyword">else</span>0073 name = <span class="string">'AVW View'</span>;0074 <span class="keyword">end</span>0075 0076 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>0077 <span class="string">'NumberTitle'</span>,<span class="string">'off'</span>,<span class="string">'color'</span>,[0 0 0],<span class="keyword">...</span>0078 <span class="string">'MenuBar'</span>,<span class="string">'figure'</span>,<span class="string">'Position'</span>,[1 1 GUIwidth GUIheight]);0079 movegui(GUI,<span class="string">'center'</span>);0080 0081 AVWVIEW.gui = GUI;0082
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -