📄 ge_series2avw.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 ge_series2avw</title> <meta name="keywords" content="ge_series2avw"> <meta name="description" content="ge_series2avw - converts a GE series to Analyze"> <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> > ge_series2avw.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>ge_series2avw</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>ge_series2avw - converts a GE series to Analyze</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 ] = ge_series2avw(examPath,seriesPath) </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"> ge_series2avw - converts a GE series to Analyze
avw = ge_series2avw(examPath,seriesPath)
Converts a series of GE slices into an Analyze
avw struct (see avw_read), which can be output
as an Analyze .hdr/.img pair using avw_write.
examPath - string path to an exam directory,
which contains series directories
below it
seriesPath - the series to convert
(integer or string argument)
examPath is the name of the directory containing
the series subdirectories (e.g., series 1), which
contain the series image files (*.MR or I.*).
This function calls ge_series_read.
The function will attempt to reorient the GE
3D volume into radiological orientation
(axial LAS, which is the default Analyze
orientation). The resulting data should
be SPM compatible when output with avw_write.
This function is in alpha development (as of 03/2003)
although a prior version has been tested with
Ax,Sag,Cor slices (with slice direction going both
ways). It was also tested for oblique axial, but
not on double obliques or anything more complicated.
The function does not provide information for an
SPM compatible .mat file.
see also <a href="ge_series_read.html" class="code" title="function [ ge, lastfile ] = ge_series_read(examPath, series)">ge_series_read</a>, <a href="avw_view.html" class="code" title="function [ varargout ] = avw_view(avw,parent,command),">avw_view</a>, <a href="avw_read.html" class="code" title="function [ avw, machine ] = avw_read(fileprefix,IMGorient,machine)">avw_read</a>, <a href="avw_write.html" class="code" title="function avw_write(avw, fileprefix, IMGorient, machine)">avw_write</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)"><li><a href="ge_hdr2avw.html" class="code" title="function [ avw ] = ge_hdr2avw(ge)">ge_hdr2avw</a> ge_hdr2avw - extract Analyze header from ge struct</li><li><a href="ge_series2avw.html" class="code" title="function [ avw ] = ge_series2avw(examPath,seriesPath)">ge_series2avw</a> ge_series2avw - converts a GE series to Analyze</li><li><a href="ge_series_read.html" class="code" title="function [ ge, lastfile ] = ge_series_read(examPath, series)">ge_series_read</a> ge_series_read - reads a volume of images from a GE series</li></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="ge_series2avw.html" class="code" title="function [ avw ] = ge_series2avw(examPath,seriesPath)">ge_series2avw</a> ge_series2avw - converts a GE series to Analyze</li></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 [avw] = ge_reorient(ge, 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 ] = ge_series2avw(examPath,seriesPath)</a>0002 0003 <span class="comment">% ge_series2avw - converts a GE series to Analyze</span>0004 <span class="comment">%</span>0005 <span class="comment">% avw = ge_series2avw(examPath,seriesPath)</span>0006 <span class="comment">%</span>0007 <span class="comment">% Converts a series of GE slices into an Analyze</span>0008 <span class="comment">% avw struct (see avw_read), which can be output</span>0009 <span class="comment">% as an Analyze .hdr/.img pair using avw_write.</span>0010 <span class="comment">%</span>0011 <span class="comment">% examPath - string path to an exam directory,</span>0012 <span class="comment">% which contains series directories</span>0013 <span class="comment">% below it</span>0014 <span class="comment">% seriesPath - the series to convert</span>0015 <span class="comment">% (integer or string argument)</span>0016 <span class="comment">%</span>0017 <span class="comment">% examPath is the name of the directory containing</span>0018 <span class="comment">% the series subdirectories (e.g., series 1), which</span>0019 <span class="comment">% contain the series image files (*.MR or I.*).</span>0020 <span class="comment">% This function calls ge_series_read.</span>0021 <span class="comment">%</span>0022 <span class="comment">% The function will attempt to reorient the GE</span>0023 <span class="comment">% 3D volume into radiological orientation</span>0024 <span class="comment">% (axial LAS, which is the default Analyze</span>0025 <span class="comment">% orientation). The resulting data should</span>0026 <span class="comment">% be SPM compatible when output with avw_write.</span>0027 <span class="comment">%</span>0028 <span class="comment">% This function is in alpha development (as of 03/2003)</span>0029 <span class="comment">% although a prior version has been tested with</span>0030 <span class="comment">% Ax,Sag,Cor slices (with slice direction going both</span>0031 <span class="comment">% ways). It was also tested for oblique axial, but</span>0032 <span class="comment">% not on double obliques or anything more complicated.</span>0033 <span class="comment">% The function does not provide information for an</span>0034 <span class="comment">% SPM compatible .mat file.</span>0035 <span class="comment">%</span>0036 <span class="comment">% see also ge_series_read,</span>0037 <span class="comment">% avw_view, avw_read, avw_write</span>0038 <span class="comment">%</span>0039 0040 0041 <span class="comment">% $Revision: 1.4 $ $Date: 2004/02/07 01:41:51 $</span>0042 0043 <span class="comment">% Souheil J. Inati <souheil.inati@nyu.edu> at 03/2003</span>0044 <span class="comment">% Dartmouth College, May 2000</span>0045 <span class="comment">%</span>0046 <span class="comment">% Darren.Weber@flinders.edu.au, March 2003</span>0047 <span class="comment">% - Substantially redesigned file handling and function</span>0048 <span class="comment">% call structures for integration with mri_toolbox at</span>0049 <span class="comment">% http://eeg.sf.net</span>0050 <span class="comment">% - Requested permission to distribute code under GPL licence</span>0051 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0052 0053 <span class="keyword">if</span> (nargin < 2),0054 doc <a href="ge_series2avw.html" class="code" title="function [ avw ] = ge_series2avw(examPath,seriesPath)">ge_series2avw</a>;0055 error(<span class="string">'...not enough input arguments.'</span>)0056 <span class="keyword">return</span>0057 <span class="keyword">end</span>0058 0059 0060 0061 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0062 <span class="comment">% Read in the GE series header and image volume</span>0063 [ge, lastfile] = <a href="ge_series_read.html" class="code" title="function [ ge, lastfile ] = ge_series_read(examPath, series)">ge_series_read</a>(examPath, seriesPath);0064 0065 <span class="comment">% could try to use lastfile to create avw.fileprefix, but</span>0066 <span class="comment">% it is too variable to be reliable</span>0067 <span class="comment">% avw.fileprefix = lastfile</span>0068 0069 <span class="comment">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span>0070 <span class="comment">% Convert the GE series to an Analyze volume</span>0071 0072 <span class="comment">% Generate the Analyze header</span>0073 avw = <a href="ge_hdr2avw.html" class="code" title="function [ avw ] = ge_hdr2avw(ge)">ge_hdr2avw</a>(ge);0074 0075 version = <span class="string">'[$Revision: 1.4 $]'</span>;0076 fprintf(<span class="string">'\nGE_SERIES2AVW [v%s]\n'</span>,version(12:16)); tic;0077 0078 <span class="comment">% Check if ADW scan (not sure this is useful, DLW 03/2003)</span>0079 <span class="comment">%if ge.hdr.image.user9 == 0, adwcount = 1;</span>0080 <span class="comment">%else, adwcount = ge.hdr.image.user9;</span>0081 <span class="comment">%end</span>0082 0083 0084 <span class="comment">% Reorient the GE data into radiological orientation during assignment</span>0085 <span class="comment">% of ge.img into avw.img (leave ge.img in original orientation)</span>0086 avw = <a href="#_sub1" class="code" title="subfunction [avw] = ge_reorient(ge, avw)">ge_reorient</a>(ge, avw); <span class="comment">% see below</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -